/* Accueil — blocs « Soins / Formations / Recherches » sur fond photo flouté.
   L'image de chaque bloc est passée par la variable --fond (attribut style dans index.html). */

.smit_iconbox_fond {
  position: relative;
  overflow: hidden;
  isolation: isolate;               /* les calques ::before / ::after restent sous le contenu */
  border-color: rgba(48, 123, 196, .45);
}

/* Photo floutée + voile clair : opaque côté titre pour la lisibilité, plus léger à droite pour laisser voir la photo */
.smit_iconbox_fond::before {
  content: "";
  position: absolute;
  inset: -16px;                     /* déborde pour que le flou n'éclaircisse pas les bords */
  z-index: -2;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, .90) 0%, rgba(255, 255, 255, .72) 45%, rgba(255, 255, 255, .30) 100%),
    var(--fond) center / cover no-repeat;
  filter: blur(3px) saturate(1.05);
  transform: scale(1.02);
  transition: filter .5s ease, transform .6s ease;
}

/* Voile bleu du site, révélé au survol (reprend le survol d'origine du thème) */
.smit_iconbox_fond::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(48, 123, 196, .94) 0%, rgba(48, 123, 196, .80) 50%, rgba(39, 71, 96, .58) 100%);
  opacity: 0;
  transition: opacity .4s ease;
}

.smit_iconbox_fond:hover::before {
  filter: blur(1px) saturate(1.1);
  transform: scale(1.07);
}
.smit_iconbox_fond:hover::after { opacity: 1; }

.smit_iconbox_fond .cs_iconbox_icon .h1 {
  filter: drop-shadow(0 2px 6px rgba(39, 71, 96, .25));
}

@media (prefers-reduced-motion: reduce) {
  .smit_iconbox_fond::before, .smit_iconbox_fond::after { transition: none; }
  .smit_iconbox_fond:hover::before { transform: scale(1.02); }
}

/* --- Carrousel d'en-tête (4 diapositives avec texte) ------------------------- */
.smit_carrousel {
  position: relative;
  height: clamp(460px, 78vh, 820px);
  overflow: hidden;
  background: #0d2137;
  isolation: isolate;
  color: #fff;
}
.smit_carrousel_piste { position: absolute; inset: 0; }

/* Les diapositives sont superposées et se relaient en fondu */
.smit_slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  isolation: isolate;               /* garde image et dégradé à l'intérieur de la diapositive */
  opacity: 0; visibility: hidden;
  transition: opacity 1s ease, visibility 0s linear 1s;
}
.smit_slide.actif { opacity: 1; visibility: visible; transition: opacity 1s ease; z-index: 1; }

.smit_slide_image {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  max-width: none;                 /* indépendant de la règle générale « img { max-width } » du thème */
  object-fit: cover; object-position: center 30%;   /* garde les visages des photos de groupe */
  transform: scale(1.08);
}
.smit_slide.actif .smit_slide_image { animation: smit_zoom_lent 7s ease-out forwards; }
@keyframes smit_zoom_lent { from { transform: scale(1.08); } to { transform: scale(1); } }

/* Dégradé sombre côté texte pour la lisibilité */
.smit_slide::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(13, 33, 55, .82) 0%, rgba(13, 33, 55, .55) 45%, rgba(13, 33, 55, .08) 80%),
    linear-gradient(0deg, rgba(13, 33, 55, .55) 0%, rgba(13, 33, 55, 0) 40%);
}

.smit_slide_contenu { position: relative; }
.smit_slide_titre {
  max-width: 760px; margin: 0 0 14px;
  font-size: clamp(30px, 4.4vw, 62px); font-weight: 700; line-height: 1.12;
  color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .3);
}
.smit_slide_titre::before {
  content: ""; display: block; width: 64px; height: 4px; border-radius: 4px;
  background: #5fa8ee; margin-bottom: 22px;
}
.smit_slide_sous_titre {
  max-width: 640px; margin: 0;
  font-size: clamp(18px, 2vw, 28px); line-height: 1.4; color: rgba(255, 255, 255, .92);
}

/* Le texte de la diapositive active apparaît en glissant légèrement */
.smit_slide_titre, .smit_slide_sous_titre { opacity: 0; transform: translateY(24px); }
.smit_slide.actif .smit_slide_titre { animation: smit_texte_entree .9s .35s ease-out forwards; }
.smit_slide.actif .smit_slide_sous_titre { animation: smit_texte_entree .9s .6s ease-out forwards; }
@keyframes smit_texte_entree { to { opacity: 1; transform: none; } }

/* Flèches groupées en bas à droite : elles ne croisent jamais le texte, aligné à gauche */
.smit_carrousel_fleche {
  position: absolute; bottom: 24px; z-index: 3;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .55); background: rgba(13, 33, 55, .25); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  backdrop-filter: blur(4px);
  transition: background-color .25s ease, border-color .25s ease;
}
.smit_carrousel_fleche:hover, .smit_carrousel_fleche:focus-visible { background: #307bc4; border-color: #307bc4; }
.smit_carrousel_prec { right: 88px; }
.smit_carrousel_suiv { right: 24px; }

.smit_carrousel_controles {
  position: absolute; left: 50%; bottom: 28px; z-index: 3; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
}
.smit_carrousel_point {
  width: 12px; height: 12px; padding: 0; border-radius: 999px;
  border: 0; background: rgba(255, 255, 255, .5);
  transition: width .3s ease, background-color .3s ease;
}
.smit_carrousel_point.actif { width: 34px; background: #fff; }
.smit_carrousel_pause {
  width: 30px; height: 30px; margin-left: 6px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .55); background: transparent; color: #fff; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}
.smit_carrousel button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (max-width: 767px) {
  .smit_carrousel { height: clamp(420px, 70vh, 560px); }
  .smit_slide { align-items: flex-end; padding-bottom: 86px; }
  .smit_slide::before { background: linear-gradient(0deg, rgba(13, 33, 55, .88) 0%, rgba(13, 33, 55, .45) 55%, rgba(13, 33, 55, .1) 100%); }
  .smit_carrousel_fleche { display: none; }   /* sur mobile : glisser au doigt ou utiliser les points */
}

@media (prefers-reduced-motion: reduce) {
  .smit_slide, .smit_slide.actif { transition: none; }
  .smit_slide.actif .smit_slide_image { animation: none; transform: none; }
  .smit_slide_titre, .smit_slide_sous_titre { opacity: 1; transform: none; }
  .smit_slide.actif .smit_slide_titre, .smit_slide.actif .smit_slide_sous_titre { animation: none; }
}
