/* Lecteur interactif « La chaux, le souffle du vieux bâti ».
   Toutes les couleurs et polices sont des variables : les adapter ici suffit à l'aligner sur la charte du site. */
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/eb-garamond-400.woff2) format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url(../fonts/eb-garamond-500.woff2) format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: italic; font-display: swap; src: url(../fonts/eb-garamond-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 300; font-style: normal; font-display: swap; src: url(../fonts/jost-300.woff2) format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/jost-400.woff2) format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 500; font-style: normal; font-display: swap; src: url(../fonts/jost-500.woff2) format("woff2"); }

:root {
  --vc-fond: #EBE5D9;          /* papier (charte valeriansauvage.fr) */
  --vc-carte: #F3EEE4;         /* chaux */
  --vc-encre: #221F1B;
  --vc-doux: #6B6359;
  --vc-accent: #A9543A;        /* terre */
  --vc-accent-fonce: #9A4830;
  --vc-accent-clair: #EAD8CC;
  --vc-eau: #3E4650;           /* ardoise, contour de focus */
  --vc-ligne: rgba(34, 31, 27, .16);
  --vc-titre: "EB Garamond", Garamond, "Times New Roman", serif;
  --vc-texte: "Jost", "Futura", "Avenir Next", "Segoe UI", Arial, sans-serif;
  --vc-main: "Jost", "Futura", "Avenir Next", "Segoe UI", Arial, sans-serif;
  --vc-rayon: 0px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--vc-fond); color: var(--vc-encre); font: 16px/1.5 var(--vc-texte); }
body { padding: clamp(0px, 2vw, 24px) 16px 24px; }
body.vc-integre { padding: 0; background: transparent; }

.vc { max-width: 1120px; margin: 0 auto; }
.vc-player { container: lecteur / inline-size; margin: 0; background: var(--vc-carte); border-radius: var(--vc-rayon); box-shadow: 0 18px 50px -24px rgba(60, 40, 20, .45), 0 0 0 1px var(--vc-ligne); overflow: hidden; }
.vc-player:fullscreen { display: flex; flex-direction: column; justify-content: center; align-items: center; background: var(--vc-carte); border-radius: 0; }
.vc-player:fullscreen .vc-ecran { width: min(100vw, calc((100vh - 130px) * 16 / 9)); }
.vc-player:fullscreen .vc-controls, .vc-player:fullscreen .vc-chapters { width: min(100vw, calc((100vh - 130px) * 16 / 9)); }

/* ---------- scène ---------- */
/* .vc-ecran regroupe la vidéo et les fenêtres posées dessus (fiche, quiz, boutons de fin) */
.vc-ecran { position: relative; container-type: inline-size; }
.vc-stage { position: relative; aspect-ratio: 16 / 9; background: var(--vc-fond); overflow: hidden; }
.vc-stage video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; background: var(--vc-fond); cursor: pointer; }

/* écran d'accueil */
.vc-start { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 1.2cqi; border: 0; padding: 0; cursor: pointer;
  background: linear-gradient(180deg, rgba(251, 247, 239, 0) 45%, rgba(47, 42, 46, .5) 100%), url(media/affiche.jpg) center / cover; color: #fff; font: inherit; text-align: center; }
.vc-start .vc-play-big { width: clamp(64px, 11cqi, 112px); aspect-ratio: 1; border-radius: 50%; background: var(--vc-accent); display: grid; place-items: center; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .5), 0 0 0 8px rgba(251, 247, 239, .35); transition: transform .2s, background .2s; margin-top: 16cqi; }
.vc-start .vc-play-big svg { width: 38%; margin-left: 8%; fill: #fff; }
.vc-start:hover .vc-play-big, .vc-start:focus-visible .vc-play-big { transform: scale(1.06); background: var(--vc-accent-fonce); }
.vc-start .vc-start-titre { font: 600 clamp(20px, 3.4cqi, 38px)/1.15 var(--vc-titre); text-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
.vc-start .vc-start-sous { font-weight: 700; font-size: clamp(13px, 1.7cqi, 18px); letter-spacing: .02em; opacity: .95; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.vc-start[hidden] { display: none; }

/* bulles « En savoir plus » */
.vc-hotspot { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; border: 0; padding: 0; background: none; cursor: pointer; font: inherit; color: var(--vc-encre);
  opacity: 0; pointer-events: none; transition: opacity .35s; }
.vc-hotspot.on { opacity: 1; pointer-events: auto; }
.vc-hotspot .vc-dot { position: relative; width: clamp(34px, 4.2cqi, 48px); aspect-ratio: 1; border-radius: 50%; background: var(--vc-carte); color: var(--vc-accent-fonce); display: grid; place-items: center;
  font: 800 clamp(20px, 2.6cqi, 28px)/1 var(--vc-texte); box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .45), 0 0 0 3px var(--vc-accent); }
.vc-hotspot .vc-dot::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid var(--vc-accent); animation: vc-pulse 1.8s ease-out infinite; }
.vc-hotspot .vc-hint { background: var(--vc-carte); border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: clamp(12px, 1.35cqi, 15px); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .4); white-space: nowrap; }
@keyframes vc-pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }

/* fenêtres posées sur la vidéo (fiche, quiz, fin) */
.vc-layer { position: absolute; inset: 0; display: grid; place-items: center; padding: 3cqi; background: rgba(47, 42, 46, .38); backdrop-filter: blur(2px); opacity: 0; transition: opacity .3s; }
.vc-layer.on { opacity: 1; }
.vc-layer[hidden] { display: none; }
.vc-box { width: min(560px, 92%); max-height: 92%; overflow: auto; background: var(--vc-carte); border-radius: 16px; padding: clamp(16px, 3cqi, 30px); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .55); transform: translateY(8px); transition: transform .3s; }
.vc-layer.on .vc-box { transform: none; }
.vc-kicker { font: 600 clamp(20px, 2.6cqi, 28px)/1 var(--vc-main); color: var(--vc-accent-fonce); margin: 0 0 4px; }
.vc-box h2 { font: 600 clamp(19px, 2.8cqi, 30px)/1.2 var(--vc-titre); margin: 0 0 10px; }
.vc-box p { margin: 0 0 16px; font-size: clamp(14px, 1.7cqi, 17px); color: var(--vc-encre); }
.vc-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.vc-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border: 0; border-radius: 999px; padding: 10px 20px; font: 800 clamp(14px, 1.6cqi, 16px)/1.2 var(--vc-texte); cursor: pointer; text-decoration: none;
  background: var(--vc-accent); color: #fff; transition: background .2s, transform .15s; }
.vc-btn:hover { background: var(--vc-accent-fonce); }
.vc-btn:active { transform: scale(.98); }
.vc-btn.vc-sec { background: transparent; color: var(--vc-encre); box-shadow: inset 0 0 0 2px var(--vc-ligne); }
.vc-btn.vc-sec:hover { background: var(--vc-fond); }

/* quiz : sur grand écran, la fenêtre se range à droite pour laisser voir les deux seaux */
@container (min-width: 700px) { #vc-quiz { place-items: center end; padding-right: 4cqi; background: linear-gradient(90deg, rgba(47, 42, 46, 0) 30%, rgba(47, 42, 46, .45)); backdrop-filter: none; } #vc-quiz .vc-box { width: min(520px, 50%); } }
.vc-choix { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.vc-choix button { display: grid; justify-items: center; gap: 8px; border: 2px solid var(--vc-ligne); border-radius: 14px; background: #fff; padding: 14px 10px; cursor: pointer; font: 800 clamp(14px, 1.7cqi, 17px)/1.2 var(--vc-texte); color: var(--vc-encre); transition: border-color .2s, transform .15s; }
.vc-choix button:hover { border-color: var(--vc-accent); transform: translateY(-2px); }
.vc-choix svg { width: clamp(44px, 7cqi, 64px); height: auto; }
.vc-choix button.bon { border-color: #6E9F58; background: #F1F7EC; }
.vc-choix button.faux { border-color: #C0643F; background: #FBEFE9; }
.vc-retour { min-height: 1.5em; margin: 12px 0 0 !important; font-weight: 800; color: var(--vc-accent-fonce) !important; }

/* écran de fin : des boutons sous le message peint dans la vidéo */
.vc-end { position: absolute; left: 4.5%; bottom: 7%; display: flex; flex-wrap: wrap; gap: 10px; opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .4s; }
.vc-end.on { opacity: 1; transform: none; }
.vc-end[hidden] { display: none; }
.vc-end .vc-btn { box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45); }
.vc-end .vc-btn.vc-sec { background: var(--vc-carte); }

/* ---------- commandes ---------- */
.vc-controls { display: flex; align-items: center; gap: 10px; padding: 10px 14px 4px; }
.vc-ic { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--vc-encre); display: grid; place-items: center; cursor: pointer; }
.vc-ic:hover { background: var(--vc-fond); }
.vc-ic svg { width: 22px; height: 22px; fill: currentColor; }
.vc-ic svg[hidden] { display: none; }
.vc-time { font: 700 13px/1 var(--vc-texte); font-variant-numeric: tabular-nums; color: var(--vc-doux); min-width: 76px; text-align: center; }
.vc-bar { position: relative; flex: 1; height: 28px; cursor: pointer; touch-action: none; }
.vc-seg { position: absolute; top: 11px; height: 6px; border-radius: 3px; background: var(--vc-ligne); overflow: hidden; }
.vc-seg i { position: absolute; inset: 0; width: 0; background: var(--vc-accent); border-radius: 3px; }
.vc-knob { position: absolute; top: 7px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--vc-accent-fonce); box-shadow: 0 0 0 3px var(--vc-carte); pointer-events: none; }
.vc-quiz-mark { position: absolute; top: 5px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--vc-carte); box-shadow: 0 0 0 2px var(--vc-accent); font: 900 11px/18px var(--vc-texte); text-align: center; color: var(--vc-accent-fonce); pointer-events: none; }

/* chapitres */
.vc-chapters { display: flex; gap: 8px; padding: 6px 14px 14px; overflow-x: auto; scrollbar-width: thin; }
.vc-chap { flex: 1 0 auto; min-width: 130px; display: grid; gap: 2px; text-align: left; border: 0; border-radius: 12px; padding: 8px 12px; background: var(--vc-fond); color: var(--vc-encre); cursor: pointer; font: inherit; transition: background .2s, box-shadow .2s; }
.vc-chap:hover { background: var(--vc-accent-clair); }
.vc-chap b { font: 800 14px/1.2 var(--vc-texte); }
.vc-chap small { font: 700 12px/1.2 var(--vc-texte); color: var(--vc-doux); }
.vc-chap.on { background: var(--vc-accent-clair); box-shadow: inset 0 0 0 2px var(--vc-accent); }

/* texte de la vidéo */
.vc-transcript { margin: 18px auto 0; max-width: 1120px; background: var(--vc-carte); border-radius: 14px; box-shadow: 0 0 0 1px var(--vc-ligne); padding: 0 18px; }
.vc-transcript summary { cursor: pointer; padding: 14px 0; font-weight: 800; }
.vc-transcript h3 { font: 600 18px/1.3 var(--vc-titre); margin: 14px 0 4px; }
.vc-transcript p { margin: 0 0 8px; }
.vc-transcript .vc-plus { color: var(--vc-doux); font-size: 15px; }

:focus-visible { outline: 3px solid var(--vc-eau); outline-offset: 2px; }
.vc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* petits écrans : la fiche, le quiz et les boutons de fin passent sous la vidéo au lieu de la couvrir */
@container (max-width: 560px) {
  .vc-hotspot .vc-hint { display: none; }
  .vc-layer { position: static; display: block; padding: 10px 12px 0; background: none; backdrop-filter: none; }
  .vc-layer .vc-box { width: 100%; max-height: none; transform: none; box-shadow: 0 0 0 1px var(--vc-ligne); }
  .vc-choix { grid-template-columns: 1fr 1fr; }
  .vc-choix button { padding: 10px 6px; }
  .vc-end { position: static; transform: none; padding: 10px 12px 0; }
  .vc-end.on { transform: none; }
}
@container lecteur (max-width: 560px) {
  .vc-controls { flex-wrap: wrap; gap: 4px 8px; padding: 8px 12px 2px; }
  .vc-bar { order: -1; flex: 1 0 100%; }
  .vc-time { margin-right: auto; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .vc-hotspot .vc-dot::after { animation: none; }
  .vc-layer, .vc-box, .vc-end { transition: none; }
}

/* ---------- charte valeriansauvage.fr : angles nets, Jost en capitales espacées, boutons sombres ---------- */
.vc-player { box-shadow: 0 0 0 1px var(--vc-ligne); }
.vc-kicker { font: 500 12px/1.2 var(--vc-texte); letter-spacing: .16em; text-transform: uppercase; color: var(--vc-accent-fonce); margin: 0 0 10px; }
.vc-box { border-radius: 0; }
.vc-box h2 { font-weight: 500; }
.vc-btn { border-radius: 0; font: 500 12px/1.2 var(--vc-texte); letter-spacing: .14em; text-transform: uppercase; padding: 14px 22px; background: var(--vc-encre); color: var(--vc-carte); }
.vc-btn:hover { background: var(--vc-accent-fonce); }
.vc-btn.vc-sec { background: transparent; color: var(--vc-encre); box-shadow: inset 0 0 0 1px var(--vc-encre); }
.vc-end .vc-btn.vc-sec { background: var(--vc-carte); }
.vc-choix button { border-radius: 0; border-width: 1px; font: 500 15px/1.25 var(--vc-texte); }
.vc-retour { font-weight: 500; }
.vc-chap { border-radius: 0; }
.vc-chap b { font: 500 14px/1.2 var(--vc-texte); }
.vc-chap small { font: 400 12px/1.2 var(--vc-texte); }
.vc-time { font-weight: 400; }
.vc-quiz-mark, .vc-hotspot .vc-dot { font-weight: 500; }
.vc-hotspot .vc-hint { border-radius: 0; font-weight: 500; }
.vc-start .vc-start-sous { font-weight: 500; letter-spacing: .06em; }
.vc-transcript { border-radius: 0; }
.vc-transcript summary { font-weight: 500; }
.vc-transcript h3 { font-weight: 500; }
