/* Chenggong Study — feuille de style principale
   Palette reprise du site d'origine (style-liberty.css) :
   --brand-primary (cyan)   #43faee : boutons, badges, accents sur fond sombre
   --brand-primary-hover     #f12e38 : rouge réservé aux accents d'urgence/notification
                                       (badge "bientôt fermée", pastille de nav), jamais
                                       comme état de survol d'un bouton, cf. --brand-primary-active
   --brand-primary-active   #066b64 : survol du bouton principal (cyan assombri) — contraste
                                       6,4:1 avec du texte blanc, largement au-dessus des 4,5:1
                                       requis ; remplace l'ancien survol rouge, qui tombait à
                                       4,05:1 et entrait en collision avec la sémantique "danger"
   --brand-secondary (bleu)  #1545cb : liens actifs, kickers, icônes sur fond clair
   --brand-heading           #3f3a64 : couleur des titres
   --brand-navy              #182c44 : fonds sombres (en-tête, pied de page, hero)
   --text-muted              #666    : texte courant
*/

/* Transition douce entre les pages (site public + admin) : chaque navigation fait un léger
   fondu au lieu d'un changement sec. Support natif du navigateur, aucun JS requis, et sans
   effet (dégradation silencieuse) sur les navigateurs qui ne le prennent pas encore en charge. */
@view-transition {
  navigation: auto;
}

:root {
  --brand-primary: #43faee;
  --brand-primary-hover: #f12e38;
  --brand-primary-active: #066b64;
  --brand-secondary: #1545cb;
  --brand-heading: #3f3a64;
  --brand-navy: #182c44;
  --brand-navy-soft: #21395a;
  --bg-soft: #f7f7f7;
  --text-muted: #666;
  --radius-lg: 18px;
  --radius-md: 12px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-muted);
  background: #fff;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 600;
  color: var(--brand-heading);
}

a {
  text-decoration: none;
}

/* ---------- Anneau de focus clavier (couleurs de la marque, jamais supprimé) ---------- */
:focus-visible {
  outline: 2px solid var(--brand-secondary);
  outline-offset: 3px;
}
/* Sur les fonds sombres (hero, bandeau de page, pied de page), le bleu se fond dans le fond :
   on bascule sur le cyan de marque, prévu pour les accents sur fond sombre. */
.hero :focus-visible,
.breadcrumb-hero :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--brand-primary);
}

/* ---------- Lien d'évitement ("Aller au contenu") : masqué tant qu'il n'a pas le focus ---------- */
.skip-link {
  padding: 10px 18px;
  background: var(--brand-navy);
  color: #fff;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}

/* ---------- Boutons ---------- */
.btn-brand-primary {
  background: var(--brand-primary);
  border: 1px solid var(--brand-primary);
  color: var(--brand-heading);
  font-weight: 600;
}
.btn-brand-primary:hover {
  background: var(--brand-primary-active);
  border-color: var(--brand-primary-active);
  color: #fff;
}
.btn-brand-outline {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  font-weight: 600;
}
.btn-brand-outline:hover {
  background: #fff;
  color: var(--brand-navy);
}
.btn-brand-secondary {
  background: var(--brand-secondary);
  border: 1px solid var(--brand-secondary);
  color: #fff;
  font-weight: 600;
}
.btn-brand-secondary:hover {
  filter: brightness(0.92);
  color: #fff;
}

/* Retour au clic sur tous les boutons (site public + admin) : on étend la transition
   déjà posée par Bootstrap sur .btn plutôt que de l'écraser. */
.btn {
  transition: color .15s ease-in-out, background-color .15s ease-in-out,
    border-color .15s ease-in-out, box-shadow .15s ease-in-out,
    transform 160ms var(--ease-out);
}
.btn:active {
  transform: scale(0.97);
}

/* Indicateur de chargement sur le bouton d'envoi d'un formulaire (contact, RDV, connexion,
   upload d'image, envoi de campagne newsletter...) : évite un bouton qui semble "mort" pendant
   l'aller-retour serveur, et empêche au passage un double clic/double envoi. */
.btn.is-loading {
  pointer-events: none;
  opacity: .75;
}
.btn.is-loading .btn-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: .5em;
  vertical-align: -0.15em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btnSpin .65s linear infinite;
}
@keyframes btnSpin {
  to { transform: rotate(360deg); }
}

/* Retour visuel sur les cases à cocher / radios (filtres du site public, bascules "actif" /
   "mise en avant" du back-office...) : Bootstrap ne pose aucune transition par défaut. */
.form-check-input {
  transition: background-color 150ms ease-in-out, border-color 150ms ease-in-out,
    box-shadow 150ms ease-in-out;
}

/* ---------- Header ---------- */
.top-bar {
  background: var(--brand-navy);
  color: #cfd7e6;
  font-size: 0.85rem;
  padding: 6px 0;
}
.top-bar a {
  color: #cfd7e6;
}
.top-bar a:hover {
  color: #fff;
}
.top-bar-info a,
.top-bar-info span {
  margin-right: 22px;
}

/* Bandeau défilant "message urgent", occupe l'espace restant à droite des contacts. */
.top-bar-marquee {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  margin-left: 24px;
}
.top-bar-marquee-track {
  display: inline-block;
  padding-left: 100%;
  animation-name: topBarMarquee;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.top-bar-marquee:hover .top-bar-marquee-track {
  animation-play-state: paused;
}
.top-bar-marquee span {
  color: var(--brand-primary);
  font-weight: 600;
}
@keyframes topBarMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.site-header .navbar {
  box-shadow: 0 2px 12px rgba(16, 32, 58, 0.06);
  padding: 10px 0;
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled .navbar {
  box-shadow: 0 6px 22px rgba(16, 32, 58, 0.14);
}
.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--brand-heading);
  margin: 0 7px;
  position: relative;
}
.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
  color: var(--brand-secondary);
}

/* ---------- Effets d'appel sur un lien du menu (démo — 4 variantes) ---------- */
/* 1. Pulsation : légère respiration en échelle + couleur */
@keyframes navEffetPulse {
  0%, 100% { transform: scale(1); color: var(--brand-heading); }
  50%      { transform: scale(1.08); color: var(--brand-secondary); }
}
.nav-effet-pulse { display: inline-block; animation: navEffetPulse 1.8s ease-in-out infinite; }

/* 2. Clignotement doux : variation d'opacité (jamais à 0, pour rester lisible) */
@keyframes navEffetClignote {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
.nav-effet-clignote { animation: navEffetClignote 1.2s ease-in-out infinite; }

/* 3. Lueur : halo pulsé dans la couleur d'accent de la marque */
@keyframes navEffetLueur {
  0%, 100% { text-shadow: 0 0 0 rgba(241, 46, 56, 0); color: var(--brand-heading); }
  50%      { text-shadow: 0 0 10px rgba(241, 46, 56, 0.85); color: var(--brand-primary-hover); }
}
.nav-effet-lueur { animation: navEffetLueur 1.6s ease-in-out infinite; }

/* 4. Pastille animée : point façon "notification" à côté du libellé, texte inchangé */
.nav-effet-badge { position: relative; padding-right: 14px; }
.nav-effet-badge::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-primary-hover);
  box-shadow: 0 0 0 rgba(241, 46, 56, 0.6);
  animation: navEffetBadgePing 1.6s ease-out infinite;
}
@keyframes navEffetBadgePing {
  0%   { box-shadow: 0 0 0 0 rgba(241, 46, 56, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(241, 46, 56, 0); }
  100% { box-shadow: 0 0 0 0 rgba(241, 46, 56, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .nav-effet-pulse, .nav-effet-clignote, .nav-effet-lueur, .nav-effet-badge::after {
    animation: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-soft) 60%, #101d30 100%);
  color: #fff;
  padding: 90px 0 110px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(67, 250, 238, 0.22), transparent 70%);
}
.hero h1 {
  color: #fff;
  font-size: 2.6rem;
  line-height: 1.25;
}
.hero .badge-success-rate {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(67, 250, 238, 0.12);
  border: 1px solid rgba(67, 250, 238, 0.45);
  color: var(--brand-primary);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  margin-bottom: 22px;
}
.hero p.lead {
  color: #cfd7e6;
  max-width: 560px;
}
.hero-stats {
  margin-top: 40px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.hero-stats .stat-number {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}
.hero-stats .stat-label {
  color: #9fabc2;
  font-size: 0.9rem;
}
.hero-image-wrap {
  position: relative;
}
/* Cadre à taille fixe et identique pour les 3 images : la hauteur est verrouillée sur les
   TROIS niveaux (carousel, carousel-inner, carousel-item), pas seulement sur l'image, sinon
   le cadre se recalcule pendant la transition (quand l'image sortante et l'entrante sont
   visibles en même temps) et ce qui dépasse se fait couper par le overflow:hidden. */
.hero-image-wrap .carousel,
.hero-image-wrap .carousel-inner,
.hero-image-wrap .carousel-item {
  height: 420px;
}
.hero-image-wrap .carousel {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
  background: #fff;
}
/* Les images du hero sont toutes recadrées à la même taille exacte à l'envoi (voir
   AdminImageHeroController) : object-fit: cover les remplit entièrement sans zone vide,
   et comme leur ratio correspond déjà à celui du cadre, il ne rogne en pratique presque rien. */
.hero-image-wrap .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 767px) {
  .hero-image-wrap .carousel,
  .hero-image-wrap .carousel-inner,
  .hero-image-wrap .carousel-item {
    height: 260px;
  }
}

/* Entrée en cascade du hero au chargement (toujours au-dessus de la ligne de flottaison,
   donc pas besoin d'IntersectionObserver ici). */
@keyframes heroFadeRiseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-content > * {
  opacity: 0;
  animation: heroFadeRiseIn 600ms var(--ease-out) forwards;
}
.hero-content > *:nth-child(1) { animation-delay: 0ms; }
.hero-content > *:nth-child(2) { animation-delay: 80ms; }
.hero-content > *:nth-child(3) { animation-delay: 160ms; }
.hero-content > *:nth-child(4) { animation-delay: 240ms; }
.hero-content > *:nth-child(5) { animation-delay: 320ms; }
.hero-image-wrap {
  opacity: 0;
  animation: heroFadeRiseIn 700ms var(--ease-out) 260ms forwards;
}

/* ---------- Sections génériques ---------- */
.section {
  padding: 80px 0;
}
.section-soft {
  background: var(--bg-soft);
}
.section-title {
  margin-bottom: 12px;
}
.section-kicker {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-secondary);
  margin-bottom: 10px;
  display: inline-block;
}
.section-subtitle {
  color: var(--text-muted);
  max-width: 620px;
}

/* ---------- Cartes domaines ---------- */
.card-domaine {
  border: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(16, 32, 58, 0.08);
  transition: transform .2s ease, box-shadow .2s ease;
  height: 100%;
}
.card-domaine:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(16, 32, 58, 0.14);
}
.card-domaine .card-domaine-img {
  height: 170px;
  object-fit: cover;
  width: 100%;
}
.media-photo-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.mediatheque-filtre {
  background: #fff;
  border: 1px solid #edf0f5;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.mediatheque-filtre-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-left: 3px solid transparent;
  background: none;
  text-align: left;
  color: var(--brand-heading);
  font-size: 14px;
}
.mediatheque-filtre-item i {
  width: 18px;
  text-align: center;
  color: #999;
}
.mediatheque-filtre-item small {
  display: block;
  color: #999;
  font-size: 12px;
}
.mediatheque-filtre-item.active {
  border-left-color: var(--brand-secondary);
  background: #eaf0fd;
  color: var(--brand-secondary);
}
.mediatheque-filtre-item.active i,
.mediatheque-filtre-item.active small {
  color: var(--brand-secondary);
}
.galerie-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}
.galerie-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}
.galerie-prev { left: 12px; }
.galerie-next { right: 12px; }

/* Pagination de la médiathèque publique : style minimaliste (pas de boîtes/bordures Bootstrap). */
#mediathequePagination .pagination {
  gap: 18px;
}
#mediathequePagination .page-link {
  border: none;
  background: none;
  color: var(--brand-heading);
  padding: 4px 0;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  margin-left: 0;
}
#mediathequePagination .page-link:hover {
  color: var(--brand-secondary);
  background: none;
}
#mediathequePagination .page-item.active .page-link {
  color: var(--brand-secondary);
  font-weight: 600;
  border-bottom-color: var(--brand-secondary);
}
#mediathequePagination .page-item.disabled .page-link {
  color: #bbb;
}
.card-domaine .card-body {
  padding: 20px;
}
.card-domaine h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

/* Cartes bourses : plus compactes pour la grille à 3 par ligne aux côtés de la colonne de filtres */
.card-bourse .card-domaine-img {
  height: 120px;
}
.card-bourse .card-body {
  padding: 14px 16px;
}
.card-bourse h3 {
  font-size: 0.92rem;
  line-height: 1.3;
}

/* ---------- Bourses en vedette (accueil) : spotlight + bande de vignettes cliquables ---------- */
.bourses-vedette-spotlight {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(16, 32, 58, 0.12);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 340px;
}
.bourses-vedette-img {
  background-size: cover;
  background-position: center;
  transition: opacity 250ms var(--ease-out);
}
.bourses-vedette-content {
  background: var(--brand-navy);
  color: #fff;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity 250ms var(--ease-out);
}
.bourses-vedette-content h3 {
  font-size: 1.6rem;
  margin: 12px 0;
  color: #fff;
}
.bourses-vedette-content p {
  color: #b7c0d6;
}
.bourses-vedette-fading { opacity: 0; }
@media (max-width: 767px) {
  .bourses-vedette-spotlight { grid-template-columns: 1fr; }
  .bourses-vedette-img { min-height: 180px; }
}

.bourses-vedette-filmstrip {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.bourses-vedette-item {
  flex: 0 0 200px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 10px;
  box-shadow: 0 8px 20px rgba(16, 32, 58, 0.06);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: border-color 200ms, transform 200ms var(--ease-out);
}
.bourses-vedette-item:hover { transform: translateY(-2px); }
.bourses-vedette-item.active { border-color: var(--brand-primary); }
.bourses-vedette-item img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.bourses-vedette-item h4 {
  font-size: 0.85rem;
  margin: 0 0 2px;
  color: var(--brand-heading);
  transition: color 250ms var(--ease-out);
}
.bourses-vedette-item small {
  color: var(--text-muted);
  font-size: 0.78rem;
  transition: color 250ms var(--ease-out);
}
.bourses-vedette-voirplus {
  background: var(--bg-soft);
  border: 2px dashed #ccd3e0;
  cursor: pointer;
  transition: border-color 250ms var(--ease-out), background 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
}
.bourses-vedette-voirplus:hover {
  border-color: var(--brand-secondary);
  background: var(--brand-secondary);
  box-shadow: 0 10px 28px rgba(21, 69, 203, 0.35);
}
/* Le cercle s'étire en barre pleine largeur, avec "Voir plus" qui apparaît à gauche et la
   flèche étirée poussée à droite ; le texte d'origine s'efface pour lui laisser la place. */
.bourses-vedette-voirplus-cercle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-secondary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 0;
  flex-shrink: 0;
  overflow: hidden;
  transition: background 250ms var(--ease-out), color 250ms var(--ease-out),
    flex-grow 400ms var(--ease-out), border-radius 400ms var(--ease-out), padding 400ms var(--ease-out);
}
.bourses-vedette-voirplus-cercle i {
  flex-shrink: 0;
  transition: transform 400ms var(--ease-out);
}
.bourses-vedette-voirplus-label {
  color: var(--brand-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity 200ms var(--ease-out), max-width 400ms var(--ease-out);
}
.bourses-vedette-voirplus-texte {
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 200ms var(--ease-out), flex-basis 400ms var(--ease-out), margin-left 400ms var(--ease-out);
}
.bourses-vedette-voirplus:hover .bourses-vedette-voirplus-cercle {
  flex-grow: 1;
  border-radius: 22px;
  justify-content: space-between;
  padding: 0 16px 0 18px;
  background: #fff;
  color: var(--brand-secondary);
}
.bourses-vedette-voirplus:hover .bourses-vedette-voirplus-cercle i {
  transform: scaleX(1.6);
}
.bourses-vedette-voirplus:hover .bourses-vedette-voirplus-label {
  opacity: 1;
  max-width: 150px;
  transition-delay: 100ms;
}
.bourses-vedette-voirplus:hover .bourses-vedette-voirplus-texte {
  opacity: 0;
  flex-basis: 0;
  margin-left: -10px;
  pointer-events: none;
}
.bourses-vedette-voirplus:hover h4 { color: #fff; }
.bourses-vedette-voirplus:hover small { color: rgba(255, 255, 255, 0.75); }
/* Le cadre wobble en continu (toutes les 3s) pour attirer l'œil ; le survol coupe
   l'animation et cède la place au léger soulèvement partagé avec les autres vignettes. */
@keyframes voirplusWobble {
  0%, 100% { transform: rotate(0deg) translateX(0); }
  4%   { transform: rotate(-2.5deg) translateX(-3px); }
  8%   { transform: rotate(2deg) translateX(3px); }
  12%  { transform: rotate(-1.5deg) translateX(-2px); }
  16%  { transform: rotate(0.8deg) translateX(1px); }
  20%  { transform: rotate(0deg) translateX(0); }
}
.bourses-vedette-voirplus {
  animation: voirplusWobble 3s ease-in-out infinite;
}
.bourses-vedette-voirplus:hover {
  animation: none;
}

/* Apparition au scroll : le spotlight monte en fondu, puis la bande de vignettes suit en cascade.
   Animée via .stagger-grid/.in-view (IntersectionObserver dans main.js), même mécanisme que les
   grilles de cartes du reste du site. */
.stagger-grid .bourses-vedette-spotlight,
.stagger-grid .bourses-vedette-filmstrip > * {
  opacity: 0;
  transform: translateY(18px);
}
.stagger-grid.in-view .bourses-vedette-spotlight {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 550ms var(--ease-out), transform 550ms var(--ease-out);
}
.stagger-grid.in-view .bourses-vedette-filmstrip > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out);
}
.stagger-grid.in-view .bourses-vedette-filmstrip > *:nth-child(1) { transition-delay: 220ms; }
.stagger-grid.in-view .bourses-vedette-filmstrip > *:nth-child(2) { transition-delay: 280ms; }
.stagger-grid.in-view .bourses-vedette-filmstrip > *:nth-child(3) { transition-delay: 340ms; }
.stagger-grid.in-view .bourses-vedette-filmstrip > *:nth-child(4) { transition-delay: 400ms; }
.stagger-grid.in-view .bourses-vedette-filmstrip > *:nth-child(5) { transition-delay: 460ms; }
/* Une fois entrée en vue, la vignette "Voir plus" doit aussi transitionner sa bordure/son halo
   au survol, sans ça, le "transition" de l'apparition (opacity/transform) écraserait le sien. */
.stagger-grid.in-view .bourses-vedette-filmstrip > .bourses-vedette-voirplus {
  transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out),
    border-color 250ms var(--ease-out), background 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
}

/* ---------- Catalogue de bourses : colonne de filtres + bandeau d'urgence ---------- */
.bourses-sidebar {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(16, 32, 58, 0.08);
  padding: 20px;
  position: sticky;
  top: 90px;
}
.filtre-groupe { margin-bottom: 22px; }
.filtre-groupe:last-of-type { margin-bottom: 16px; }
.filtre-titre {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--brand-heading);
  margin-bottom: 10px;
}
.filtre-option {
  margin-bottom: 8px;
  padding-left: 1.6em;
}
.filtre-option .form-check-input {
  accent-color: var(--brand-secondary);
  margin-left: -1.6em;
}
.filtre-option .form-check-label {
  color: #55597a;
  font-size: 0.92rem;
}

.bourses-urgence {
  background: linear-gradient(120deg, var(--brand-navy) 0%, var(--brand-navy-soft) 100%);
  border-radius: var(--radius-md);
  color: #fff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.bourses-urgence-tag {
  background: var(--brand-primary-hover);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  flex-shrink: 0;
}
.bourses-urgence-info { flex: 1; min-width: 200px; }
.bourses-urgence-info .titre {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 2px;
}
.bourses-urgence-info .sous-titre {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}
.bourses-urgence-compte {
  text-align: center;
  flex-shrink: 0;
}
.bourses-urgence-compte b {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  color: var(--brand-primary);
  line-height: 1.1;
}
.bourses-urgence-compte span {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}

/* Bandeau d'urgence, variante carrousel (plusieurs bourses bientôt fermées) : même contenu que
   la variante à 1 bourse (titre/sous-titre/compte à rebours/CTA), qui tourne automatiquement. */
.bourses-urgence-track {
  display: grid;
  flex: 1;
  min-width: 200px;
}
.bourses-urgence-slide {
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}
.bourses-urgence-slide.active { opacity: 1; pointer-events: auto; }
.bourses-urgence-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.bourses-urgence-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  padding: 0;
  cursor: pointer;
}
.bourses-urgence-dots .dot.active { background: var(--brand-primary); }

@media (max-width: 991px) {
  .bourses-sidebar { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .bourses-urgence-slide { transition: none; }
}

/* ---------- Cartes services ---------- */
.card-service {
  border: 1px solid #edf0f5;
  border-radius: var(--radius-md);
  padding: 28px 24px;
  height: 100%;
  background: #fff;
  transition: box-shadow .2s ease, transform .2s ease;
}
.card-service:hover {
  box-shadow: 0 16px 34px rgba(16, 32, 58, 0.1);
  transform: translateY(-4px);
}
.card-service .icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(21, 69, 203, 0.08);
  color: var(--brand-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
}
.card-service h3 {
  font-size: 1.1rem;
}
.card-service p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ---------- À propos ---------- */
.about-media img {
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(16,32,58,.12);
}

/* ---------- Témoignages ---------- */
.card-temoignage {
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 4px 4px 14px rgba(16, 32, 58, 0.1);
  padding: 26px;
  height: 100%;
}
.card-temoignage .stars {
  color: #ffc107;
  margin-bottom: 10px;
}
.card-temoignage .temoignage-texte p {
  margin-bottom: 0.5rem;
}
.card-temoignage .temoignage-texte p:last-child {
  margin-bottom: 0;
}
.card-temoignage .temoignage-texte p:first-child::before {
  content: '« ';
}
.card-temoignage .temoignage-texte p:last-child::after {
  content: ' »';
}
.card-temoignage .temoignage-auteur {
  margin-top: 14px;
}
.card-temoignage .temoignage-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.card-temoignage .nom {
  font-weight: 600;
  color: var(--brand-heading);
}
.card-temoignage .fonction {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Défilement horizontal des témoignages */
.temoignages-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.temoignages-scroll::-webkit-scrollbar {
  display: none;
}
.temoignage-item {
  flex: 0 0 320px;
  scroll-snap-align: start;
}
.temoignage-item .card-temoignage {
  height: 100%;
}
.temoignages-nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: var(--brand-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, color .2s ease;
}
.temoignages-nav:hover {
  background: var(--brand-secondary);
  color: #fff;
  border-color: var(--brand-secondary);
}
@media (max-width: 576px) {
  .temoignage-item {
    flex-basis: 85%;
  }
}

/* ---------- CTA bandeau ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--brand-navy), #101d30);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 50px;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #cfd7e6; }

/* ---------- Formulaires (contact / rdv) ---------- */
.form-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(16,32,58,.1);
  padding: 40px;
}
.faq-contact-sticky {
  padding: 24px;
}
@media (min-width: 992px) {
  .faq-contact-sticky {
    position: sticky;
    top: 90px;
  }
}
.form-label {
  font-weight: 600;
  color: var(--brand-heading);
}
.form-control, .form-select {
  border-radius: 10px;
  padding: 10px 14px;
  border: 1px solid #dfe3ea;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand-secondary);
  box-shadow: 0 0 0 0.2rem rgba(21,69,203,.15);
}
.invalid-feedback-static {
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ---------- Calendrier de prise de RDV (remplace l'input date natif) ---------- */
.rdv-calendrier {
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}
.rdv-calendrier.is-invalid { border-color: #dc3545; }
.rdv-calendrier-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.rdv-calendrier-entete .btn:disabled { opacity: .3; }
.rdv-calendrier-jours-noms,
.rdv-calendrier-grille {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}
.rdv-calendrier-jours-noms {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.rdv-calendrier-jour {
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 12px 0;
  font-size: .88rem;
  color: var(--brand-heading);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.rdv-calendrier-jour:hover:not(:disabled) { background: var(--bg-soft); }
.rdv-calendrier-jour:disabled {
  color: #c7cddb;
  cursor: not-allowed;
  text-decoration: line-through;
}
.rdv-calendrier-jour.rdv-jour-vide { visibility: hidden; }
.rdv-calendrier-jour.rdv-jour-selectionne {
  background: var(--brand-secondary);
  color: #fff;
  font-weight: 600;
}
.rdv-calendrier-jour.rdv-jour-aujourdhui:not(.rdv-jour-selectionne) {
  box-shadow: inset 0 0 0 1.5px var(--brand-secondary);
}
@media (prefers-reduced-motion: reduce) {
  .rdv-calendrier-jour { transition: none; }
}

/* ---------- Créneaux horaires de prise de RDV (remplace le select natif) ---------- */
.rdv-heures {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
  min-height: 54px;
  align-items: center;
}
.rdv-heures.is-invalid { border-color: #dc3545; }
.rdv-heure-chip {
  position: relative;
  border: 1px solid #dfe3ea;
  background: #fff;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--brand-heading);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.rdv-heure-chip:hover:not(:disabled) { border-color: var(--brand-secondary); background: var(--bg-soft); }
.rdv-heure-chip.rdv-heure-selectionnee {
  background: var(--brand-secondary);
  border-color: var(--brand-secondary);
  color: #fff;
}
/* Créneau déjà pris : nettement grisé, non cliquable, avec repère visuel dédié (pas seulement
   la couleur) pour rester clair même sans percevoir les couleurs. */
.rdv-heure-chip:disabled {
  background: var(--bg-soft);
  border-color: #e5e8ee;
  color: #adb3c2;
  cursor: not-allowed;
  text-decoration: line-through;
}
.rdv-heure-chip-pastille {
  display: block;
  text-decoration: none;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #adb3c2;
  margin-top: 1px;
}
@media (prefers-reduced-motion: reduce) {
  .rdv-heure-chip { transition: none; }
}

/* ---------- Actualités ---------- */
.card-actualite img {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  height: 190px;
  object-fit: cover;
  width: 100%;
}
.card-actualite {
  border: 1px solid #edf0f5;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card-actualite:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(16, 32, 58, 0.1);
}
.card-actualite .card-body {
  padding: 22px;
}
.card-actualite .date {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- Fil d'ariane ---------- */
.breadcrumb-hero {
  background: var(--brand-navy);
  color: #fff;
  padding: 50px 0;
}
.breadcrumb-hero h1 { color: #fff; margin-bottom: 6px; }
.breadcrumb-hero .breadcrumb a { color: #9fabc2; }
.breadcrumb-hero .breadcrumb .active { color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-navy);
  color: #cfd7e6;
}
.newsletter-bar {
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.newsletter-bar .form-control {
  border: none;
}
.footer-title {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 16px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 10px;
  color: #b8c2d6;
}
.footer-links a {
  display: flex;
  align-items: center;
  padding: 8px 0;
  color: #b8c2d6;
}
.footer-links a:hover {
  color: var(--brand-primary);
}
.social-links a {
  display: inline-flex;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}
.social-links a:hover {
  background: var(--brand-secondary);
}
.footer-bottom {
  background: #101d30;
  color: #8b96ac;
  font-size: 0.85rem;
}

/* ---------- Apparition en cascade des grilles de cartes ---------- */
/* .in-view est ajoutée par main.js via IntersectionObserver quand la grille entre dans le viewport. */
.stagger-grid > [class*="col-"] {
  opacity: 0;
  transform: translateY(10px);
}
.stagger-grid.in-view > [class*="col-"] {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out);
}
.stagger-grid.in-view > [class*="col-"]:nth-child(1) { transition-delay: 0ms; }
.stagger-grid.in-view > [class*="col-"]:nth-child(2) { transition-delay: 40ms; }
.stagger-grid.in-view > [class*="col-"]:nth-child(3) { transition-delay: 80ms; }
.stagger-grid.in-view > [class*="col-"]:nth-child(4) { transition-delay: 120ms; }
.stagger-grid.in-view > [class*="col-"]:nth-child(5) { transition-delay: 160ms; }
.stagger-grid.in-view > [class*="col-"]:nth-child(6) { transition-delay: 200ms; }
.stagger-grid.in-view > [class*="col-"]:nth-child(7) { transition-delay: 240ms; }
.stagger-grid.in-view > [class*="col-"]:nth-child(8) { transition-delay: 280ms; }

/* ---------- Entrée des messages flash (contact, RDV, back-office) ---------- */
@keyframes alertSlideIn {
  from { transform: translateY(-8px); }
  to { transform: translateY(0); }
}
.alert.fade.show {
  animation: alertSlideIn 220ms var(--ease-out);
}

/* ---------- Pages d'état (maintenance, bientôt disponible, erreur 500) ---------- */
/* Page autonome (layouts/etat.php) : ni navbar ni footer, volontairement — pour la maintenance,
   aucun lien du site ne doit rester joignable. */
.page-etat-body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
}
.page-etat {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-soft) 60%, #101d30 100%);
}
.page-etat-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 60px rgba(0,0,0,.3);
  padding: 48px 40px;
  max-width: 560px;
  width: 100%;
  text-align: center;
}
.page-etat-logo {
  display: inline-block;
  margin-bottom: 28px;
}
.page-etat-logo img {
  height: 40px;
}
.page-etat-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: rgba(21,69,203,.08);
  color: var(--brand-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
}
.page-etat-card h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--brand-heading);
  margin-bottom: 12px;
}
.page-etat-card p {
  color: var(--text-muted);
  line-height: 1.6;
}
.page-etat-contact {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #edf0f5;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  font-size: 0.92rem;
}
.page-etat-contact a {
  color: var(--brand-secondary);
  text-decoration: none;
  font-weight: 600;
}
.page-etat-contact a:hover { text-decoration: underline; }

.compte-a-rebours {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 28px 0 8px;
  flex-wrap: wrap;
}
.compte-a-rebours .bloc {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 14px 18px;
  min-width: 76px;
}
.compte-a-rebours .valeur {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--brand-heading);
  font-variant-numeric: tabular-nums;
}
.compte-a-rebours .libelle {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Bannière d'avertissement dans le back-office quand le site public est en maintenance/bientôt disponible */
.admin-alerte-etat {
  background: #fff3cd;
  color: #664d03;
  padding: 10px 20px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #ffe69c;
}
.admin-alerte-etat a {
  color: #664d03;
  font-weight: 700;
  text-decoration: underline;
  margin-left: auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .hero { padding: 60px 0 80px; text-align: center; }
  .hero .hero-stats { justify-content: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .section { padding: 56px 0; }
  .cta-band { padding: 32px; text-align: center; }
}

/* ---------- Réduction des animations (préférence système) ---------- */
/* On garde les fondus (moins perturbants), on retire les translations/zooms. */
@media (prefers-reduced-motion: reduce) {
  .hero-content > *,
  .hero-image-wrap {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .stagger-grid > [class*="col-"] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .card-domaine:hover,
  .card-service:hover,
  .card-actualite:hover,
  .bourses-vedette-item:hover {
    transform: none;
  }
  .bourses-vedette-voirplus {
    animation: none;
  }
  .bourses-vedette-voirplus:hover .bourses-vedette-voirplus-cercle i {
    transform: none;
  }
  .stagger-grid .bourses-vedette-spotlight,
  .stagger-grid .bourses-vedette-filmstrip > * {
    opacity: 1;
    transform: none;
  }
  .btn:active {
    transform: none !important;
  }
  .alert.fade.show {
    animation: none;
  }
  .top-bar-marquee-track {
    animation: none;
    padding-left: 0;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
  .btn.is-loading .btn-spinner {
    animation: none;
  }
}

/* Durée resserrée de la transition de navigation (le navigateur applique ~250ms par défaut) */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 180ms;
}
