/* A++ : 4 versions de mise en avant (A écran coupé, B cartes, C pastilles, D onglets) */
.vsw { display: inline-flex; gap: 4px; margin-left: 10px; vertical-align: middle; }
.vsw a { display: inline-grid !important; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff !important; text-decoration: none; font-weight: 800; margin: 0 !important; }
.vsw a.on { background: #ffd36b; color: #111827 !important; }
.vdoor { display: none; }
body[data-v="a"] .v-a, body[data-v="b"] .v-b, body[data-v="d"] .v-d { display: block; }
body[data-v="c"] .v-c { display: flex; }
body[data-v="d"] .dtabs.v-d { display: flex; }
.vdoor-wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px clamp(48px, 7vw, 90px); }
body[data-v="a"] .h3-hero .x-hero, body[data-v="b"] .h3-hero .x-hero { padding-bottom: clamp(36px, 6vh, 70px); }
a.door { color: #fff; text-decoration: none; }
.door-go i { display: inline-block; font-style: normal; transition: transform .3s; }
a.door:hover .door-go i { transform: translateY(4px); }

/* A */
.split { display: flex !important; gap: 14px; min-height: 280px; }
body[data-v="a"] .split.v-a { display: flex !important; }
body:not([data-v="a"]) .split.v-a { display: none !important; }
.split a { flex: 1; position: relative; border-radius: 20px; padding: 26px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; transition: flex .55s cubic-bezier(.2,.7,.2,1), box-shadow .3s; box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.split a:hover, .split a:focus-visible { flex: 2; box-shadow: 0 40px 80px -30px rgba(0,0,0,.9); }
.split .s1 { background: linear-gradient(160deg, #4766e8, #22337f); }
.split .s2 { background: linear-gradient(160deg, #f0a43a, #c4552b); }
.split h3 { font-size: clamp(1.35rem, 2.6vw, 2rem); margin: 0; color: #fff; }
.split small { display: block; margin-top: 6px; font-size: 1rem; opacity: .92; }
.split .door-go { margin-top: 12px; font-weight: 800; }
.split .big { position: absolute; top: 12px; right: 20px; font: 900 clamp(3.2rem, 8vw, 6.4rem)/1 var(--font-title); opacity: .2; letter-spacing: -.05em; }
.mini-fan { position: absolute; top: 26px; left: 26px; display: flex; gap: 8px; flex-wrap: wrap; max-width: 75%; }
.mini-fan span { background: #fffefb; color: #16213d; font-weight: 700; font-size: .85rem; padding: 6px 10px; border-radius: 6px; transform: rotate(-3deg); box-shadow: 0 8px 18px -8px rgba(0,0,0,.5); transition: transform .4s; }
.mini-fan span:nth-child(2) { transform: rotate(2deg); } .mini-fan span:nth-child(3) { transform: rotate(-1deg); }
.split a:hover .mini-fan span { transform: rotate(0) translateY(-3px); }
.split .pizza { position: absolute; top: 18px; right: 22px; width: 112px; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.split a:hover .pizza { transform: rotate(135deg); }
.split .ticket { position: absolute; top: 26px; left: 26px; background: #fffefb; color: #16213d; font: 600 .85rem/1.5 ui-monospace, monospace; padding: 10px 12px; border-radius: 4px; transform: rotate(-4deg); white-space: pre; }

/* B */
.cards-b { display: none; grid-template-columns: 1fr 1fr; gap: 16px; }
body[data-v="b"] .cards-b { display: grid; }
.cards-b a { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; padding: 18px; display: grid; grid-template-columns: 104px 1fr auto; gap: 16px; align-items: center; transition: transform .25s, background .25s; }
.cards-b a:hover { transform: translateY(-4px); background: rgba(255,255,255,.12); }
.cards-b .pv { height: 104px; border-radius: 12px; display: grid; place-items: center; text-align: center; font: 900 1.6rem/1.15 var(--font-title); }
.cards-b .pv1 { background: #fffefb; color: #3b5bdb; }
.cards-b .pv2 { background: #ffe58a; color: #3b2f00; font-size: .95rem; }
.cards-b h3 { margin: 0; font-size: 1.2rem; color: #fff; }
.cards-b p { margin: 4px 0 0; color: #c9d0ea; font-size: .95rem; }
.cards-b .arr { width: 42px; height: 42px; border-radius: 50%; background: #3b5bdb; display: grid; place-items: center; font-weight: 900; transition: transform .3s; }
.cards-b a:hover .arr { transform: translateY(4px); }

/* C */
.pills { display: none; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.pills a { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); font-weight: 700; transition: background .2s, transform .2s; }
.pills a:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }
.pills i { font-style: normal; display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 999px; background: #fffefb; color: #3b5bdb; font-weight: 900; font-size: .85rem; }

/* D */
.dtabs { display: none; gap: 6px; flex-wrap: wrap; margin: -10px 0 14px; position: relative; z-index: 3; }
.dtabs button { width: auto !important; margin: 0 !important; border: 0 !important; border-radius: 999px !important; padding: 6px 12px !important; min-height: 0 !important; font: 700 .85rem var(--font-title) !important; cursor: pointer; color: #22337f !important; background: #e3e7f6 !important; }
.dtabs button[aria-selected="true"] { background: #3b5bdb !important; color: #fff !important; }
.dpane { display: none; position: absolute; inset: 70px 20px 20px 76px; z-index: 2; background: transparent; color: #16213d; }
.dpane.on { display: block; animation: dup .4s both; }
.dpane p { margin: 0 0 10px; font-size: 1.1rem; }
.dpane .hand { color: #2340b0; font-size: 1.6rem; }
.dpane a { color: #3b5bdb; font-weight: 800; }
.sheet.d-hide > :not(.dtabs):not(.dpane) { visibility: hidden; }
@keyframes dup { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 760px) {
  body[data-v="a"] .split.v-a { flex-direction: column; } .split a { min-height: 210px; } .split a:hover { flex: 1; }
  body[data-v="b"] .cards-b { grid-template-columns: 1fr; }
  .dpane { inset: 64px 14px 14px 52px; }
}
@media (prefers-reduced-motion: reduce) { .split a, .split .pizza, .mini-fan span, .cards-b a, .pills a, .dpane { transition: none; animation: none; } }
.x-stage.d-other .sticky { opacity: 0; transition: opacity .3s; }

/* Grands écrans : la page s'élargit et les côtés servent */
.side { display: none; }
@media (min-width: 1500px) {
  .x3 .h3-hero .x-hero, .vdoor-wrap { max-width: 1320px; }
}
@media (min-width: 1820px) {
  .h3-hero { position: relative; }
  .side { display: block; position: absolute; top: clamp(120px, 14vh, 180px); width: 220px; z-index: 2; color: #dfe4f7; animation: rise .9s .6s both; }
  .side-l { left: calc((100% - 1320px) / 4 - 110px); }
  .side-r { right: calc((100% - 1320px) / 4 - 110px); }
  .side-k { font: 800 .8rem var(--font-title); letter-spacing: .12em; text-transform: uppercase; color: #ffd36b; margin: 0 0 12px; }
  .side-levels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .side-levels button, .mflash-b button { width: auto !important; margin: 0 !important; min-height: 0 !important; cursor: pointer; border-radius: 12px !important; border: 1px solid rgba(255,255,255,.18) !important; background: rgba(255,255,255,.07) !important; color: #fff !important; font: 800 1.05rem var(--font-title) !important; padding: 12px 0 !important; transition: background .2s, transform .2s; }
  .side-levels button:hover, .mflash-b button:hover { background: #3b5bdb !important; transform: translateY(-2px); }
  .side-s { font-size: .9rem; line-height: 1.45; margin: 12px 0 0; color: #b9c1e0; }
  .side-more { display: inline-block; margin-top: 16px; color: #fff; font-weight: 700; font-size: .92rem; text-decoration: none; border-bottom: 1.5px solid rgba(255,211,107,.7); }
  .side-more:hover { color: #ffd36b; }
  .mflash { background: #fffefb; color: #16213d; border-radius: 14px; padding: 22px 16px; text-align: center; transform: rotate(2deg); box-shadow: 0 24px 50px -20px rgba(0,0,0,.7);
    background-image: linear-gradient(rgba(59,91,219,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(59,91,219,.13) 1px, transparent 1px); background-size: 18px 18px; }
  .mflash-q { display: block; font: 800 1.5rem var(--font-title); }
  .mflash-a { display: block; font: 700 1.6rem var(--hand); color: var(--red); min-height: 2.2rem; opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
  .mflash.show .mflash-a { opacity: 1; transform: none; }
  .mflash-b { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
  .mflash-b button { font-size: .85rem !important; padding: 10px 4px !important; }
}
@media (min-width: 1820px) and (prefers-reduced-motion: reduce) { .side { animation: none; } .mflash-a { transition: none; } }
/* Réorganisation grands écrans : côtés en haut, panneaux du bas sur toute la largeur */
@media (min-width: 1820px) {
  .side { top: clamp(32px, 7vh, 88px); }
  .side-s { font-size: .82rem; color: #9aa3c7; }
  .vdoor-wrap { max-width: none; padding-left: calc((100% - 1320px) / 4 - 110px); padding-right: calc((100% - 1320px) / 4 - 110px); }
  body[data-v="a"] .split.v-a { min-height: 300px; }
}

/* Encart bulletin tout en haut */
.bulletin-top { background: #ffe58a; }
.x3 .bulletin-top .bulletin { max-width: 1240px; margin: 0 auto; padding: 14px 16px; border-radius: 0; background: transparent; }
.bulletin-top .bulletin p { font-size: 1rem; }
.bulletin-top .bulletin b { font-size: 1.1rem; }
.h3-rail::before { background: linear-gradient(90deg, var(--accent) 0 100%) !important; }
@media (min-width: 1500px) { .x3 .bulletin-top .bulletin { max-width: 1320px; } }
@media (min-width: 1820px) { .side-levels { grid-template-columns: 1fr 1fr 1fr; } .side-levels button { font-size: .95rem !important; padding: 10px 0 !important; } }
/* 12 classes du CP à la terminale */
.x3 .h3-rail { grid-template-columns: repeat(12, 1fr); }
.x3 .h3-rail b { width: clamp(44px, 4.6vw, 68px); height: clamp(44px, 4.6vw, 68px); font-size: clamp(.9rem, 1.2vw, 1.2rem); }
@media (max-width: 900px) { .x3 .h3-rail { grid-template-columns: repeat(6, 1fr); row-gap: 26px; } }
@media (min-width: 1820px) { .side-levels { grid-template-columns: repeat(4, 1fr); gap: 6px; } .side-levels button { font-size: .85rem !important; } }

/* Grands écrans : les côtés suivent le défilement */
@media (min-width: 1820px) {
  .side { position: fixed; top: 120px; width: 250px; z-index: 20; padding: 18px; border-radius: 18px; background: rgba(15, 22, 48, .94); box-shadow: 0 24px 50px -24px rgba(15,22,48,.6); backdrop-filter: blur(6px); }
  .side-l { left: max(16px, calc((100% - 1320px) / 4 - 128px)); }
  .side-r { right: max(16px, calc((100% - 1320px) / 4 - 128px)); }
  .vdoor-wrap { padding-left: calc((100% - 1320px) / 4 - 128px); padding-right: calc((100% - 1320px) / 4 - 128px); }
}

/* Fondu du bleu nuit du haut vers le fond clair */
.hero-fade { height: clamp(200px, 24vw, 340px); margin-top: -1px; margin-bottom: calc(-1 * clamp(90px, 10vw, 150px)); position: relative; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, #0f1630 0%, #18224d 18%, #27377a 38%, rgba(70, 95, 190, .55) 58%, rgba(170, 185, 235, .3) 80%, rgba(238, 240, 247, 0) 100%); }
.x3 .h3-in.h3-inc { position: relative; z-index: 1; }
/* Deux encarts côte à côte : cours manqué, bulletin (l'un sous l'autre sur téléphone). */
.bulletin-duo { display: grid; grid-template-columns: 1fr 1fr; padding-inline: max(0px, calc((100% - 1240px) / 2)); }
.x3 .bulletin-duo .bulletin { max-width: none; margin: 0; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.bulletin-duo .bulletin + .bulletin { border-left: 1px solid rgba(59, 47, 0, .18); }
@media (max-width: 760px) {
  .bulletin-duo { grid-template-columns: 1fr; }
  .bulletin-duo .bulletin + .bulletin { border-left: 0; border-top: 1px solid rgba(59, 47, 0, .18); }
}
@media (min-width: 1500px) { .bulletin-duo { padding-inline: max(0px, calc((100% - 1320px) / 2)); } }
