/* ===== Page d’accueil : animations propres à « Mes cours de droit » ===== */
.accueil { overflow-x: hidden; }
.marque-page { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 40; pointer-events: none; }
.marque-page i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--kaki), var(--sable)); transform: scaleX(0); transform-origin: left; }
.sur-titre { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--kaki); }

/* --- Hero --- */
.h2o { padding: 64px 0 50px; position: relative; }
.h2o::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(transparent 31px, rgba(20,33,61,.06) 32px); background-size: 100% 32px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); pointer-events: none; }
.h2o::after { content: ""; position: absolute; top: 0; bottom: 0; left: max(16px, calc(50% - 600px)); width: 2px; background: rgba(177,74,58,.18); pointer-events: none; }
.h2o-grille { display: grid; grid-template-columns: 1.2fr .9fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
.titre-ecrit { font-size: clamp(40px, 5.8vw, 68px); margin: 18px 0 18px; }
.ligne-t { display: block; overflow: hidden; padding: 0 0 .16em; margin-bottom: -.12em; }
.fini .ligne-t { overflow: visible; }
.ligne-t > span { display: inline-block; transform: translateY(110%); transition: transform .9s var(--ease); }
.pret .ligne-t > span { transform: none; }
.pret .ligne-t:nth-child(2) > span { transition-delay: .15s; }
.pret .ligne-t:nth-child(3) > span { transition-delay: .3s; }
.ligne-t:nth-child(3) { color: var(--navy); }
mark.surligne { color: inherit; background: linear-gradient(transparent 58%, rgba(201,169,110,.7) 58%, rgba(201,169,110,.7) 92%, transparent 92%) no-repeat 0 0 / 0% 100%; padding: 0 .08em; transition: background-size 1s cubic-bezier(.6,.1,.3,1) 1.2s; }
.pret mark.surligne { background-size: 100% 100%; }
.h2o .lead { font-size: 19px; color: var(--texte-2); margin: 0 0 26px; max-width: 540px; }
.h2o .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.h2o .rassure { margin-top: 18px; font-size: 14px; color: var(--gris); }

/* Cartes de l’app, en escalier : aucune ne cache le texte d’une autre */
.eventail { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 10px 0 30px; }
.carte-app { position: relative; width: 290px; padding: 20px; border-radius: 20px; background: var(--blanc); box-shadow: var(--ombre-forte); display: grid; gap: 9px; font-size: 13.5px; color: var(--texte-2);
  opacity: 0; transform: translateY(24px); transition: transform .8s var(--ease), opacity .8s; }
.carte-app .sur { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--kaki); }
.carte-app > b { font-family: var(--serif); font-size: 18px; color: var(--navy); line-height: 1.25; }
.carte-app .lignes { display: none; }
.def-mini { padding: 10px 12px; border-radius: 12px; background: var(--kaki-clair); border-left: 4px solid var(--kaki); }
.def-mini b { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--kaki); }
.rep-mini { padding: 9px 12px; border-radius: 12px; border: 1.5px solid var(--ligne); font-weight: 600; color: var(--navy); }
.rep-mini.bon { background: var(--ok-clair); border-color: var(--ok); color: var(--ok); }
.mini-carte { width: 100%; height: 70px; color: var(--navy-3); }
.c3 { text-align: center; }
.c1 { align-self: flex-start; }
.c2 { align-self: flex-end; }
.c3 { align-self: flex-start; margin-left: 40px; width: 240px; }
.pret .carte-app { opacity: 1; transform: none; }
.pret .c1 { transition-delay: .4s; }
.pret .c2 { transition-delay: .6s; }
.pret .c3 { transition-delay: .8s; }
.tampon { position: absolute; right: 0; bottom: 70px; z-index: 6; padding: 10px 20px; border: 4px solid var(--ko); border-radius: 14px; color: var(--ko); font: 800 24px/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; text-align: center; background: rgba(247,245,239,.92);
  transform: rotate(-10deg); opacity: 0; transition: opacity .6s 1.3s; }
.tampon small { font-size: 14px; letter-spacing: .14em; }
.pret .tampon { opacity: 1; }

/* --- Ruban des chapitres --- */
.ruban { overflow: hidden; background: var(--navy); color: var(--creme); padding: 16px 0; transform: rotate(-1.4deg) scale(1.03); margin: 10px 0 30px; }
.ruban-piste { display: flex; width: max-content; gap: 0; animation: ruban 140s linear infinite; }
.ruban-piste span { font-family: var(--serif); font-size: 21px; white-space: nowrap; padding: 0 22px; }
.ruban-piste span::after { content: "§"; color: var(--sable); margin-left: 44px; }
@keyframes ruban { to { transform: translateX(-50%); } }

/* --- Blocus --- */
.blocus-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.blocus h2 { font-size: clamp(30px, 4vw, 44px); margin: 10px 0 14px; }
.blocus h2 em { color: var(--kaki); }
.blocus p { font-size: 17.5px; color: var(--texte-2); }
.semaine { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.semaine li { position: relative; display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-radius: 16px; background: var(--blanc); box-shadow: var(--ombre); font-weight: 600; color: var(--texte); opacity: 0; transform: translateX(40px); transition: opacity .5s, transform .6s var(--ease), background .4s, color .4s; }
.semaine li span { width: 86px; flex-shrink: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gris); }
.semaine li i { margin-left: auto; font-style: normal; font-weight: 800; color: var(--ko); opacity: 0; transform: scale(2); transition: opacity .2s, transform .3s cubic-bezier(.5,1.8,.6,1); }
.semaine li::after { content: ""; position: absolute; left: 118px; right: 60px; top: 50%; height: 2px; background: var(--ko); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.semaine li.vu { opacity: 1; transform: none; }
.semaine li.barre { color: var(--gris); }
.semaine li.barre::after { transform: scaleX(1); }
.semaine li.barre i { opacity: 1; transform: none; }
.semaine li.ici { background: var(--navy); color: var(--blanc); }
.semaine li.ici span { color: var(--sable); }
.semaine li.ici::after { display: none; }
.semaine li.ici i { color: var(--sable); }

@keyframes brille { 50% { box-shadow: 0 0 0 6px rgba(201,169,110,.35), var(--ombre); } }

/* --- Tous les cours --- */
.gros-chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 760px; margin: 0 auto 40px; text-align: center; }
.gc b { display: block; font-family: var(--serif); font-size: clamp(44px, 6vw, 64px); color: var(--navy); line-height: 1; }
.gc b.mot-gc { font-style: italic; }
.gc span { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--kaki); }
.livres { display: flex; gap: 14px; justify-content: center; align-items: flex-end; perspective: 1200px; flex-wrap: wrap; }
.livre { width: 200px; min-height: 290px; border-radius: 10px 18px 18px 10px; background: var(--c); color: var(--blanc); padding: 22px 18px 18px 26px; position: relative; display: flex; flex-direction: column; justify-content: space-between; box-shadow: inset 8px 0 0 rgba(0,0,0,.18), var(--ombre-forte);
  transform-origin: bottom center; transform: rotateX(80deg) translateY(30px); opacity: 0; transition: transform .9s cubic-bezier(.3,1.4,.5,1), opacity .5s; }
.livre::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.18); }
.livre.vu { transform: none; opacity: 1; }
.livre:hover { transform: translateY(-12px) rotate(-1.5deg); }
.livre .dos b { display: block; font-family: var(--serif); font-size: 22px; line-height: 1.15; }
.livre .dos span { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,.16); font-size: 12.5px; font-weight: 700; }
.livre p { margin: 16px 0 0; font-size: 13.5px; line-height: 1.5; opacity: .9; }

/* --- Pile de cartes « en plus » --- */
.pile { max-width: 760px; margin: 0 auto; }
.fiche-plus { position: sticky; top: calc(96px + var(--i) * 12px); display: grid; grid-template-columns: 130px 1fr 54px; gap: 22px; align-items: center; margin-bottom: 26px; padding: 30px; min-height: 170px; border-radius: 26px; background: var(--blanc); box-shadow: 0 -2px 0 var(--ligne), var(--ombre-forte); transform-origin: top center; will-change: transform; }
.fiche-plus:nth-child(even) { background: #fffdf7; }
.fp-num { white-space: nowrap; font-family: var(--serif); font-size: 46px; font-weight: 700; color: var(--kaki); line-height: 1; text-align: center; }
.fiche-plus h3 { margin: 0 0 6px; font-size: 24px; }
.fiche-plus p { margin: 0; color: var(--texte-2); font-size: 15.5px; }
.fp-ico { font-size: 34px; text-align: center; }
.aussi { text-align: center; color: var(--texte-2); margin-top: 30px; font-size: 16px; }

/* --- Vidéo --- */
.video-cadre { max-width: 960px; margin: 0 auto; border-radius: 26px; overflow: hidden; box-shadow: var(--ombre-forte); background: var(--navy); }
.video-cadre video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--navy); }
.quiz-demo.solo { max-width: 680px; margin: 0 auto; }
.final h2 em { color: var(--sable-clair); }

/* --- Petits écrans --- */
@media (max-width: 860px) {
  .h2o-grille, .blocus-grille { grid-template-columns: 1fr; gap: 30px; }
  .eventail { max-width: 440px; }
  .carte-app { width: 80%; padding: 16px; }
  .c3 { margin-left: 0; width: 64%; }
  .tampon { right: 0; bottom: 70px; padding: 8px 12px; font-size: 17px; }
  .tampon small { font-size: 11px; }
  .fiche-plus { grid-template-columns: 84px 1fr; padding: 22px; gap: 14px; top: calc(80px + var(--i) * 8px); }
  .fp-num { font-size: 26px; }
  .fp-ico { display: none; }
  .fiche-plus h3 { font-size: 20px; }
  .livre { width: calc(50% - 8px); min-height: 230px; }
  .h2o::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .ruban-piste { animation: none; }
}

/* En-tête sur téléphone : la marque tient sur une ligne, le bouton S’abonner reste visible */
@media (max-width: 560px) {
  .accueil .marque { font-size: 17px; white-space: nowrap; gap: 8px; }
  .accueil .marque-logo { width: 32px; height: 32px; }
  .accueil .entete nav a[href="connexion.html"] { display: none; }
  .accueil .entete .conteneur { gap: 10px; }
}

/* Le texte du hero passe toujours au-dessus des cartes et du fond animé */
.h2o-grille > div:first-child { position: relative; z-index: 3; }
.eventail { z-index: 1; }
.titre-ecrit { position: relative; z-index: 3; }

/* Fond : deux lueurs très douces qui se déplacent lentement, sans rien qui bouge au premier plan */
.accueil::before { content: ""; position: fixed; inset: -20%; z-index: 0; pointer-events: none;
  background: radial-gradient(38% 32% at 22% 28%, rgba(201,169,110,.16), transparent 70%), radial-gradient(34% 30% at 78% 70%, rgba(111,113,72,.12), transparent 70%);
  animation: lueur 38s ease-in-out infinite alternate; }
@keyframes lueur { to { transform: translate(6%, -5%) rotate(8deg); } }
.accueil > section, .accueil > .ruban, .accueil > .conteneur, .accueil > footer { position: relative; z-index: 1; }
.accueil .entete { z-index: 20; }

@media (max-width: 560px) {
  .livre .dos b { font-size: 18px; overflow-wrap: anywhere; hyphens: auto; }
  .livre { padding: 18px 14px 16px 22px; }
}

/* Vidéo placée juste sous le titre (16 novembre 2026) */
.bloc.video-haut { padding-top: 10px; }
@media (max-width: 760px) { .bloc.video-haut { padding-top: 0; } .video-haut .video-cadre { border-radius: 18px; } }
/* Vidéo verticale sur téléphone */
.video-cadre.verticale { max-width: min(100%, 380px, 44vh); } /* 44vh de large = 78 % de la hauteur de l’écran en 9:16 */
.video-cadre.verticale video { aspect-ratio: 9 / 16; }
