@font-face {
  font-family: Goudy;
  src: url("../fonts/Sorts_Mill_Goudy/SortsMillGoudy-Regular.ttf");
}

@font-face {
  font-family: Goudy;
  font-style: italic;
  src: url("../fonts/Sorts_Mill_Goudy/SortsMillGoudy-Italic.ttf");
}

/* === CHARTE GRAPHIQUE GLOBALE === */
:root {
  --primary-color: #0d6dfd;
  --primary-dark: #0a58cd;
  --secondary-color: #1f2937;
  --primary-light: #a8cbff;
  --light-bg: #f8f9fa;
  --white: #ffffff;
  --gray-light: #e5e7eb;
  --gray-medium: #6b7280;
  --gray-dark: #374151;

  --article-bg: var(--cyan);
  --article-text: var(--white);
  --inscription-bg: var(--green);
  --inscription-text: var(--white);
  --media-bg: var(--indigo);
  --media-text: var(--white);
  --palmares-bg: var(--orange);
  --palmares-text: var(--white);
  --personnel-bg: var(--purple);
  --personnel-text: var(--white);
  --revue-bg: var(--teal);
  --revue-text: var(--white);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100vh;
  background-color: var(--light-bg);
  color: var(--secondary-color);
  /* font-family: Goudy, serif; */
  font-size: 1rem;
}

/* === LOGO === */
.logo {
  max-width: min(4.5em, 18.25vmin);
}

.logo img {
  width: 100%;
  height: auto;
}

/* === BOUTONS & LIENS (Override Bootstrap) === */
a {
  color: var(--primary-color);
  transition: 0.3s;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-color) !important;
  color: var(--white) !important;
  border-color: var(--primary-color) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--white) !important;
  color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Ajouter après .btn-outline-primary:hover */
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--primary-color);
  color: var(--white);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Pour tous les liens */
a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Formulaire */
.filter-form {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.form-control {
  height: auto !important;
  background: var(--white) !important;
  color: var(--gray-dark) !important;
  font-size: 14px;
  border-radius: 4px;
  box-shadow: none !important;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
}

.msg-info {
  text-align: center;
  font-style: italic;
  color: var(--gray-medium);
  margin-top: 1rem;
  user-select: none;
}

/* Upload de fichier */
.file-upload-container {
  display: flex;
  justify-content: space-around;
  gap: 1.25em;
  margin: 1.25em 0;
  font-size: 1em;
}

.file-input-wrapper {
  flex: 1 0 12.5em;
  position: relative;
  max-width: 80%;
}

.btn.btn-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6em 0.9em;
  border-radius: 0.5em;
  background-color: var(--white);
  border-color: currentColor;
}

.btn.btn-upload.image-upload {
  color: var(--primary-color);
}

.btn.btn-upload.pdf-upload {
  color: #e27d4a;
}

.btn.btn-upload:hover {
  opacity: 0.9;
  transform: translateY(-0.125em);
}

.file-input {
  display: none;
}

.file-name {
  max-width: 100%;
  margin-top: 0.5em;
  font-size: 0.9em;
  color: var(--gray-medium);
  word-break: break-all;
  text-align: center;
}

.image-name {
  color: var(--primary-color);
}

.pdf-name {
  color: #e27d4a;
}

.media-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1em 0;
  width: 100%;
  border-radius: 0.5em;
  animation: fadeIn 0.3s ease;
}

.media-preview:empty {
  display: none;
}

.media-preview .media {
  width: clamp(12.5em, 100%, 25em);
  max-width: 100%;
  max-height: 25em;
  margin-top: 0.5em;
  box-shadow: 0 0 0.25em currentColor;
  border-radius: inherit;
}

/* === TABLE === */

.thead-primary th {
  background: var(--primary-color);
  color: var(--white);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* === BADGE === */

.badge-info {
  background-color: rgba(13, 110, 253, 0.15);
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.85rem;
}

/* === NAVIGATION (Menu actif) === */
.ftco-navbar-light .navbar-nav > .nav-item.active > .nav-link {
  color: var(--primary-color) !important;
}

/* === LOADER (Le cercle de chargement) === */
#ftco-loader .path {
  stroke: var(--primary-color) !important;
}

/* === TITRES & SECTIONS === */
.heading-section h2 {
  color: var(--secondary-color);
}

.heading-section span {
  color: var(--primary-color);
  /* Pour les mots mis en évidence */
}

/* === PAGINATION === */
.block-27 ul li.active a,
.block-27 ul li.active span {
  background: var(--primary-color);
  border: 1px solid var(--primary-color);
}

/* Carousel */
.owl-carousel .owl-stage-outer {
  touch-action: pan-y pinch-zoom;
}

.owl-carousel {
  -webkit-overflow-scrolling: touch;
}

.home-slider,
.carousel-testimony {
  pointer-events: auto;
}

/* === ICON === */
.icon-2x {
  font-size: 2em;
}

.icon-3x {
  font-size: 3em;
}

.icon-4x {
  font-size: 4em;
}

.icon-5x {
  font-size: 5em;
}

.icon-success {
  color: var(--success);
}

.icon-danger {
  color: var(--danger);
}

.icon-warning {
  color: var(--warning);
}

.icon-info {
  color: var(--info);
}

/* === MODAL === */
.modal.fade .modal-dialog {
  animation: modalPulse 0.3s ease-out;
}

/* utlistaires */
.bg-article {
  background-color: var(--article-bg) !important;
}

.bg-inscription {
  background-color: var(--inscription-bg) !important;
}

.bg-media {
  background-color: var(--media-bg) !important;
}

.bg-palmares {
  background-color: var(--palmares-bg) !important;
}

.bg-personnel {
  background-color: var(--personnel-bg) !important;
}

.bg-revue {
  background-color: var(--revue-bg) !important;
}

.text-article {
  color: var(--article-bg) !important;
}

.text-inscription {
  color: var(--inscription-bg) !important;
}

.text-media {
  color: var(--media-bg) !important;
}

.text-palmares {
  color: var(--palmares-bg) !important;
}

.text-personnel {
  color: var(--personnel-bg) !important;
}

.text-revue {
  color: var(--revue-bg) !important;
}

.card-article {
  background-color: var(--article-bg) !important;
  color: var(--article-text) !important;
}

.card-inscription {
  background-color: var(--inscription-bg) !important;
  color: var(--inscription-text) !important;
}

.card-media {
  background-color: var(--media-bg) !important;
  color: var(--media-text) !important;
}

.card-palmares {
  background-color: var(--palmares-bg) !important;
  color: var(--palmares-text) !important;
}

.card-personnel {
  background-color: var(--personnel-bg) !important;
  color: var(--personnel-text) !important;
}

.card-revue {
  background-color: var(--revue-bg) !important;
  color: var(--revue-text) !important;
}

[class*="outline-"] {
  border-color: currentColor;
}

.outline-article {
  background: transparent !important;
  color: var(--article-bg) !important;
}

.outline-article:hover {
  background: var(--article-bg) !important;
  color: var(--article-text) !important;
}

.outline-inscription {
  background: transparent !important;
  color: var(--inscription-bg) !important;
}

.outline-inscription:hover {
  background: var(--inscription-bg) !important;
  color: var(--inscription-text) !important;
}

.outline-media {
  background: transparent !important;
  color: var(--media-bg) !important;
}

.outline-media:hover {
  background: var(--media-bg) !important;
  color: var(--media-text) !important;
}

.outline-palmares {
  background: transparent !important;
  color: var(--palmares-bg) !important;
}

.outline-palmares:hover {
  background: var(--palmares-bg) !important;
  color: var(--palmares-text) !important;
}

.outline-personnel {
  background: transparent !important;
  color: var(--personnel-bg) !important;
}

.outline-personnel:hover {
  background: var(--personnel-bg) !important;
  color: var(--personnel-text) !important;
}

.outline-revue {
  background: transparent !important;
  color: var(--revue-bg) !important;
}

.outline-revue:hover {
  background: var(--revue-bg) !important;
  color: var(--revue-text) !important;
}

/* === EXTENSIONS POUR LES BIBLIOTHÈQUES TIERCES === */

/* === ANIMATE.CSS - Personnalisation des couleurs === */
.animated {
  animation-duration: 0.8s;
}

/* === OWL CAROUSEL === */
.owl-carousel .owl-nav button.owl-prev,
.owl-carousel .owl-nav button.owl-next {
  color: var(--primary-color) !important;
}

.owl-carousel .owl-dots .owl-dot.active span,
.owl-carousel .owl-dots .owl-dot:hover span {
  background: var(--primary-color) !important;
}

.owl-carousel .owl-dots .owl-dot span {
  border-color: var(--primary-color) !important;
}

/* === MAGNIFIC POPUP === */
.mfp-bg {
  background: var(--secondary-color);
  opacity: 0.8;
}

.mfp-title {
  color: var(--light-bg);
}

.mfp-close {
  color: var(--white) !important;
}

.mfp-close:hover {
  color: var(--primary-color) !important;
}

/* === AOS (Animate On Scroll) === */
[data-aos] {
  transition-timing-function: ease-in-out;
}

/* === FLATICON & ICONMOON === */
.flaticon,
.icon {
  color: currentColor;
}

.flaticon:hover,
.icon:hover {
  color: var(--primary-dark);
}

/* === COMPOSANTS BOOTSTRAP SPÉCIFIQUES === */

/* Cartes */
.card {
  border-color: rgba(13, 110, 253, 0.1);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.1);
}

/* Alertes */
.alert-primary {
  background-color: rgba(13, 110, 253, 0.1);
  border-color: var(--primary-color);
  color: var(--secondary-color);
}

/* Badges */
.badge-primary {
  background-color: var(--primary-color);
}

/* Progress bars */
.progress-bar {
  background-color: var(--primary-color);
}

/* Navbar */
.navbar-light .navbar-nav .nav-link {
  color: var(--secondary-color);
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
  color: var(--primary-color);
}

/* Dropdown */
.dropdown-item:focus,
.dropdown-item:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* === COMPOSANTS SPÉCIFIQUES AU TEMPLATE === */

.ftco-navbar-light.scrolled .container {
  background: transparent;
}

/* Sections avec fond alterné */
.ftco-section {
  background-color: var(--light-bg);
}

.ftco-section.ftco-section-alt {
  background-color: var(--white);
}

/* Overlay des héros */
.hero-overlay {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  opacity: 0.9;
}

/* Pied de page */
.ftco-footer {
  background-color: var(--secondary-color);
  color: var(--light-bg);
}

.ftco-footer a {
  color: var(--light-bg);
}

.ftco-footer a:hover {
  color: var(--primary-color);
}

/* === RESPONSIVE - Ajustements supplémentaires === */
@media (max-width: 768px) {
  .logo {
    max-width: min(3.5em, 18.25vmin);
  }

  .navbar-collapse {
    /*background: var(--white);*/
    /*color: var(--secondary-color);*/
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }
}

/* === ANIMATIONS PERSONNALISÉES === */
@keyframes fadeInUpCustom {
  from {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.fadeInUpCustom {
  animation-name: fadeInUpCustom;
}

@keyframes modalPulse {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }

  0% {
    transform: scale(1.02);
  }

  0% {
    transform: scale(1);
    opacity: 1;
  }
}

/* === ÉTATS DE CHARGEMENT === */
.loading-spinner {
  border: 4px solid var(--gray-light);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Prévenir les animations sur le scroll */
@media (prefers-reduced-motion: reduce) {

  .animated,
  [data-aos] {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}