/* ---------------------------------------------------------------------------
   V3.7, couche de style ajoutée par-dessus v37.css. Chargée en dernier.
   Contenu :
     1. Menu déroulant « Diaporamas » dans l'en-tête
     2. Section Diaporamas remontée, montages en pile de diapositives
     3. Page Programmes : hero raccourci, bandeau quiz compact,
        réordonnancement et cadrage des visuels
     4. Réglages d'images pour mobile, tablette et bureau
--------------------------------------------------------------------------- */

/* ============ 1. MENU DEROULANT DIAPORAMAS ============ */

.v38-navdrop { position: relative; }

.v38-navdrop > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.biotwin-nav .v38-navdrop > button {
  color: var(--v37-green, #0d8f96);
  font-weight: 800;
}

.v38-navdrop > button::after {
  content: "⌄";
  position: relative;
  top: -2px;
  font-size: .8em;
}

.v38-navdrop-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  z-index: 60;
  width: 306px;
  padding: 8px;
  border: 1px solid rgba(7, 27, 45, .12);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(7, 27, 45, .18);
  transform: translateX(-50%);
}

.v38-navdrop-menu[hidden] { display: none; }

.v38-navdrop-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--v31-navy, #0b2a3d);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
  text-decoration: none;
}

.v38-navdrop-menu a:hover { background: #f1f7f8; }

.v38-navdrop-menu small {
  display: block;
  margin-top: 3px;
  color: #6a7d89;
  font-size: 11.5px;
  font-weight: 600;
}

/* ============ 2. SECTION DIAPORAMAS ============ */

/* Section volontairement courte : elle sert de porte d'entrée, pas de chapitre.
   Quatre images en couleur pleine, puis le texte sur carte blanche en dessous.
   Le texte n'est plus posé sur les images : les visuels restent lisibles et le
   titre reste net. */
.v38-decks-section { padding: clamp(34px, 4vw, 58px) 0; }

.v38-decks-heading {
  max-width: none;
  margin-bottom: clamp(16px, 2vw, 24px);
  text-align: left;
}

.v38-decks-heading h2 {
  font-size: clamp(20px, 2.1vw, 26px);
  letter-spacing: -.02em;
}

.v38-decks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 26px);
}

.v38-deck {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(7, 27, 45, .12);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.v38-deck:hover {
  transform: translateY(-2px);
  border-color: rgba(13, 143, 150, .4);
  box-shadow: 0 18px 44px rgba(7, 27, 45, .12);
}

/* Montage : quatre vignettes, pleine couleur, aucun voile */
.v38-deck-montage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px 4px 0;
  background: #fff;
}

.v38-deck-montage img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 3px;
}

.v38-deck-body { padding: 16px 20px 20px; }

.v38-deck-kicker {
  display: block;
  margin-bottom: 6px;
  color: #6a7d89;
  font-size: 12.5px;
  font-weight: 650;
}

.v38-deck-body h3 {
  margin: 0 0 6px;
  color: var(--v31-navy, #0b2a3d);
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.25;
}

.v38-deck-body p {
  margin: 0 0 14px;
  color: #5a6f7c;
  font-size: 14px;
  line-height: 1.5;
}

.v38-deck-body strong {
  color: var(--v37-green, #0d8f96);
  font-size: 14px;
  font-weight: 800;
}

/* ============ 3. PAGE PROGRAMMES ============ */

/* Hero moins haut, il occupait presque tout l'écran d'entrée */
.start-page .start-hero { min-height: clamp(340px, 44vh, 470px); }
.start-page .start-hero-content { padding-top: 60px; padding-bottom: 44px; }
.start-page .back-link { margin-bottom: clamp(22px, 4vw, 44px); }
.start-page .start-hero p:not(.eyebrow) { font-size: clamp(15px, 1.7vw, 18px); }

/* Bandeau quiz : une seule ligne, mais assez présent pour être vu */
.v38-quiz-strip {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(18px, 2.4vw, 26px);
  padding: 12px 16px;
  border: 1px solid rgba(7, 27, 45, .12);
  border-radius: 14px;
  background: #f7fafb;
  color: inherit;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease;
}

.v38-quiz-strip:hover { border-color: rgba(13, 143, 150, .5); background: #f1f8f8; }

.v38-quiz-thumb {
  overflow: hidden;
  width: 74px;
  height: 54px;
  border-radius: 9px;
}

.v38-quiz-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }

.v38-quiz-copy { min-width: 0; }
.v38-quiz-copy b {
  display: block;
  color: var(--v31-navy, #0b2a3d);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
}
.v38-quiz-copy span {
  display: block;
  margin-top: 2px;
  color: #566f7e;
  font-size: 13.5px;
  line-height: 1.4;
}

.v38-quiz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--v37-green, #0d8f96);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.v38-quiz-strip:hover .v38-quiz-btn { background: #087b82; }

/* Variante agrandie, utilisée sur la page Programmes où le quiz doit se voir */
.v38-quiz-large {
  grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 22px;
  margin-bottom: clamp(24px, 3vw, 34px);
  padding: 18px 22px;
  border-color: rgba(13, 143, 150, .32);
  background: linear-gradient(180deg, #f2fafa 0%, #f7fafb 100%);
}

.v38-quiz-large .v38-quiz-thumb { width: 132px; height: 92px; border-radius: 12px; }
.v38-quiz-large .v38-quiz-copy b { font-size: clamp(18px, 2vw, 22px); line-height: 1.22; }
.v38-quiz-large .v38-quiz-copy span { margin-top: 5px; font-size: 15px; }
.v38-quiz-large .v38-quiz-btn { min-height: 48px; padding: 12px 26px; font-size: 15px; }

/* ---- Bandeau à cheval sur le bord supérieur du rectangle ----
   Même principe que le badge « Plan recommandé » des cartes de cadence EHOP :
   centré, moitié dehors, moitié dedans, pour se lire comme rattaché au cadre. */

.v38-progs { display: grid; gap: clamp(20px, 2.6vw, 30px); }

.v36-prog-featured.v38-prog-badged {
  position: relative;
  overflow: visible;
  margin-bottom: 0;
  padding-top: clamp(30px, 3.2vw, 42px);
}

.v38-prog-badge {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 3;
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--v36-teal, #0d8f96);
  color: #fff;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 18px rgba(6, 26, 44, .2);
}

.v38-prog-badge-premium {
  background: linear-gradient(90deg, #0b2a3d 0%, #135e69 100%);
}

.v36-prog-featured.v38-prog-premium {
  border-color: rgba(11, 42, 61, .3);
  background: linear-gradient(120deg, #fff, #eef4f7);
}

.v38-prog-cards-two { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

/* ============ 3 bis. CE QUE VOUS OBTENEZ ============ */

.v38-get-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(22px, 3vw, 44px);
  align-items: center;
}

.v38-getlist { margin: 0; }

.v38-get-figure {
  position: relative;
  margin: 0;
  border-radius: 18px;
}

/* Capture réelle du portail : cadre, ombre et filigrane obligatoire */
.v38-get-figure-shot img {
  border: 1px solid rgba(7, 27, 45, .14);
  box-shadow: 0 18px 46px rgba(6, 26, 44, .12);
}

.v38-demo-watermark {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(6, 26, 44, .82);
  color: #fff;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.v38-get-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

.v38-get-figure figcaption {
  margin-top: 9px;
  color: #6a7d89;
  font-size: 12.5px;
  line-height: 1.45;
  text-align: center;
}

.v38-get-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
  margin-top: clamp(24px, 3vw, 38px);
}

.v38-get-count {
  padding: 20px 22px;
  border: 1px solid rgba(7, 27, 45, .12);
  border-radius: 18px;
  background: #fff;
}

.v38-get-count .eyebrow { margin: 0 0 14px; }

.v38-get-count ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.v38-get-count li {
  padding: 12px 10px;
  border-radius: 12px;
  background: #f4f9fa;
  text-align: center;
}

.v38-get-count b {
  display: block;
  color: var(--v37-green, #0d8f96);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
}

.v38-get-count li span {
  display: block;
  margin-top: 5px;
  color: #566f7e;
  font-size: 12.5px;
  line-height: 1.3;
}

.v38-get-count .text-link { color: var(--v37-green, #0d8f96); font-weight: 800; }

/* Rangées de programme resserrées : visuels moins hauts sur grand écran */
.v38-prog-row { padding-block: clamp(20px, 2.6vw, 32px); }
.v38-prog-row .v34-prog-media img { height: clamp(190px, 20vw, 268px); }
.v38-prog-row .v34-prog-copy h3 { font-size: clamp(23px, 2.5vw, 30px); }
.v38-prog-row .v34-prog-copy > p { font-size: 15.5px; }

/* Les deux programmes ciblés, côte à côte */
.v38-prog-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 26px);
  padding-top: clamp(22px, 3vw, 34px);
  border-top: 1px solid rgba(7, 27, 45, .1);
}

.v38-prog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(7, 27, 45, .12);
  border-radius: 18px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.v38-prog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(7, 27, 45, .1);
}

.v38-prog-media { overflow: hidden; }
.v38-prog-media img {
  display: block;
  width: 100%;
  height: clamp(150px, 15vw, 200px);
  object-fit: cover;
  transition: transform .5s ease;
}
.v38-prog-card:hover .v38-prog-media img { transform: scale(1.03); }

.v38-prog-copy { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 20px; }
.v38-prog-copy h3 { margin: 5px 0 8px; font-size: clamp(20px, 2vw, 25px); }
.v38-prog-copy > p { margin: 0 0 12px; color: #506879; font-size: 14.5px; line-height: 1.55; }
.v38-prog-copy .v34-prog-note { margin: 0 0 12px; font-size: 12.5px; }
.v38-prog-copy .text-link { margin-top: auto; color: var(--v37-green, #0d8f96); font-weight: 800; }

/* ============ 4. TABLETTE ET MOBILE ============ */

@media (max-width: 1080px) {
  .v38-navdrop-menu { position: static; width: auto; transform: none; box-shadow: none; }
}

@media (max-width: 980px) {
  .v38-get-layout { grid-template-columns: 1fr; }
  .v38-get-figure { order: -1; }
}

@media (max-width: 900px) {
  .v38-prog-row .v34-prog-media img { height: clamp(180px, 30vw, 240px); }
  .v38-get-counts { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .v38-decks { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .v38-quiz-strip {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 13px;
  }
  .v38-quiz-thumb { width: 58px; height: 44px; }
  .v38-quiz-copy b { font-size: 14px; }
  .v38-quiz-copy span { font-size: 12.5px; }
  .v38-quiz-btn { grid-column: 1 / -1; width: 100%; min-height: 40px; }

  .v38-quiz-large {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
    padding: 14px 15px;
  }
  .v38-quiz-large .v38-quiz-thumb { width: 84px; height: 62px; }
  .v38-quiz-large .v38-quiz-copy b { font-size: 17px; }
  .v38-quiz-large .v38-quiz-copy span { font-size: 13.5px; }
  .v38-quiz-large .v38-quiz-btn { min-height: 44px; font-size: 14px; }

  .v38-prog-duo { grid-template-columns: 1fr; padding-top: 20px; }
  .v38-prog-media img { height: clamp(160px, 42vw, 210px); }
  .v38-prog-row .v34-prog-media img { height: clamp(165px, 46vw, 220px); }
  .v38-prog-cards-two { grid-template-columns: 1fr !important; }

  .start-page .start-hero { min-height: clamp(300px, 52vh, 400px); }
  .start-page .start-hero-content { padding-top: 46px; padding-bottom: 32px; }

  .v38-deck-body { padding: 14px 16px 18px; }
  .v38-deck-body p { font-size: 13.5px; }
  .v38-get-count ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .v38-get-count li { padding: 10px 6px; }
  .v38-get-count li span { font-size: 11.5px; }

  .v36-prog-featured.v38-prog-badged { padding-top: 28px; }
  .v38-prog-badge {
    max-width: calc(100% - 28px);
    padding: 6px 14px;
    font-size: 10px;
    white-space: normal;
    text-align: center;
  }
  .v38-demo-watermark { top: 8px; right: 8px; padding: 4px 9px; font-size: 9.5px; }
}

/* Le mobile ne doit jamais déborder horizontalement */
@media (max-width: 620px) {
  .v38-prog-duo,
  .v38-quiz-strip,
  .v38-get-layout,
  .v38-get-counts,
  .v36-decks { max-width: 100%; }
}

/* ------------------------------------------------------------------ *
 * V3.8, carte EHOP cliquable pilier par pilier.
 * La carte etait un seul lien englobant, ce qui interdisait de rendre
 * les six vignettes cliquables : un lien dans un lien est invalide.
 * La carte devient un conteneur, et trois cibles de clic coexistent :
 * le visuel, le titre, et chacune des six vignettes vers sa page.
 * ------------------------------------------------------------------ */

.v32-pillar-grid a {
  min-height: 86px;
  display: grid;
  align-content: end;
  overflow: hidden;
  position: relative;
  padding: 10px;
  border-radius: 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}

.v32-pillar-grid a:hover,
.v32-pillar-grid a:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(6, 26, 44, .22);
}

.v32-pillar-grid a:hover img {
  transform: scale(1.06);
}

.v32-pillar-grid a b {
  position: relative;
  z-index: 1;
}

.v38-prog-title {
  color: inherit;
  text-decoration: none;
}

.v38-prog-title:hover,
.v38-prog-title:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.v38-prog-medialink {
  display: block;
}
