/* Dessin Vivant : cahier d'écolier (réglure Seyès), encre bleue, feutre jaune. */
:root {
  --papier: #ffffff;
  --encre: #1d2a6b;
  --stylo: #2747d9;
  --feutre: #ffd43b;
  --feutre-fonce: #f2b705;
  --marge: #e8505b;
  --vert: #2e9e4f;
  --ligne: #9db6e3;
  --ligne-fine: #dfe8f7;
  --gris: #5b6386;
  --texte: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --main: "Playwrite FR Moderne", "Chalkboard SE", cursive;
  --largeur: 1120px;
  --pos-marge: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--stylo); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--stylo); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

/* Page de cahier : petites lignes tous les 8 px, grandes lignes tous les 32 px, marge rouge */
.cahier {
  background-color: var(--papier);
  background-image:
    linear-gradient(90deg, transparent calc(var(--pos-marge) - 1px), var(--marge) calc(var(--pos-marge) - 1px), var(--marge) calc(var(--pos-marge) + 1px), transparent calc(var(--pos-marge) + 1px)),
    repeating-linear-gradient(180deg, transparent 0 31px, var(--ligne) 31px 32px),
    repeating-linear-gradient(180deg, transparent 0 7px, var(--ligne-fine) 7px 8px),
    repeating-linear-gradient(90deg, transparent 0 31px, var(--ligne-fine) 31px 32px);
}

.conteneur { width: min(100% - 40px, var(--largeur)); margin-inline: auto; }

/* ---------- En-tête ---------- */
.entete { position: relative; z-index: 5; }
/* En-tête : logo à gauche, les deux rubriques au centre, en boutons de feutre jaune */
.entete .conteneur { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px 20px; padding-block: 18px; }
.logo { white-space: nowrap; justify-self: start; }
.logo {
  font-family: var(--main);
  font-size: 24px;
  color: var(--encre);
  text-decoration: none;
  line-height: 1.6;
}
.entete nav { display: flex; align-items: center; justify-content: center; gap: 16px; }
.entete nav a {
  display: inline-flex; align-items: center; min-height: 50px; padding: 10px 22px; white-space: nowrap;
  border: 2.5px solid var(--encre); border-radius: 14px 18px 12px 20px / 18px 12px 20px 14px;
  background: var(--feutre); color: var(--encre); font: 700 17px/1.2 var(--texte); text-decoration: none;
  box-shadow: 4px 4px 0 var(--encre); transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.entete nav a:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--encre); }
@media (max-width: 760px) {
  .entete .conteneur { grid-template-columns: 1fr; justify-items: center; }
  .logo { justify-self: center; }
}
@media (max-width: 520px) {
  .logo { font-size: 20px; }
  .entete nav { gap: 12px; }
  .entete nav a { min-height: 46px; padding: 8px 14px; font-size: 15px; }
}

/* ---------- Boutons ---------- */
.bouton {
  --fond: var(--feutre);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 14px 26px;
  border: 2.5px solid var(--encre);
  border-radius: 14px 18px 12px 20px / 18px 12px 20px 14px;
  background: var(--fond);
  color: var(--encre);
  font: 700 18px/1.2 var(--texte);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--encre);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.bouton:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--encre); }
.bouton:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--encre); }
.bouton[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: 4px 4px 0 var(--encre); }
.bouton.discret { --fond: #fff; box-shadow: none; border-width: 2px; min-height: 48px; font-size: 16px; }
.bouton.discret:hover { background: var(--ligne-fine); transform: none; }
.bouton.petit { min-height: 44px; padding: 10px 18px; font-size: 16px; }

/* ---------- Accueil : en-tête de page ---------- */
.ouverture { padding: 8px 0 72px; overflow: hidden; }
.ouverture .conteneur { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.ouverture h1 { font-size: clamp(44px, 6.4vw, 84px); font-weight: 800; letter-spacing: -0.035em; max-width: 11ch; }
.ouverture .chapo { margin-top: 24px; font-size: 21px; max-width: 34ch; color: var(--encre); }
.ouverture .actions { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; }
.ouverture .rassurance { font-size: 16px; color: var(--gris); }
.texte-ouverture { padding-left: calc(var(--pos-marge) - 20px + 24px); }
@media (max-width: 900px) {
  .ouverture .conteneur { grid-template-columns: 1fr; gap: 36px; }
  .texte-ouverture { padding-left: 52px; }
}
@media (max-width: 520px) {
  :root { --pos-marge: 28px; }
  .texte-ouverture { padding-left: 20px; }
  .ouverture h1 { font-size: 44px; }
  .ouverture .chapo { font-size: 19px; }
}

/* Le format "réel" : la créature en haut, le dessin en bas */
.reel-scene { position: relative; display: grid; justify-items: center; }
.reel {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 9 / 16;
  border: 3px solid var(--encre);
  border-radius: 28px;
  overflow: hidden;
  background: #fff;
  box-shadow: 10px 10px 0 var(--encre);
  transform: rotate(1.5deg);
  cursor: pointer;
}
.reel .haut, .reel .bas { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; }
.reel .haut { top: 0; background: #e9eef8; }
.reel .bas { bottom: 0; background: #fff; display: grid; place-items: center; }
.reel .haut img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 60%; }
.reel .bas img { width: 92%; height: 92%; object-fit: contain; }
.reel .couture { position: absolute; left: -2%; right: -2%; top: calc(50% - 6px); height: 12px; z-index: 2; }
.reel .developpe { animation: developper 1.6s cubic-bezier(.2,.7,.2,1) 0.5s both; }
.reel .respire { animation: respirer 9s ease-in-out 2.1s infinite alternate; }
@keyframes developper {
  from { clip-path: inset(100% 0 0 0); filter: saturate(0) brightness(1.4); }
  to { clip-path: inset(0 0 0 0); filter: none; }
}
@keyframes respirer { from { transform: scale(1); } to { transform: scale(1.08) translateY(-1.5%); } }
.annotation {
  position: absolute;
  font-family: var(--main);
  font-size: 19px;
  line-height: 1.5;
  color: var(--stylo);
  white-space: nowrap;
  pointer-events: none;
}
.annotation svg { display: block; }
.annotation.vrai { top: 12%; right: calc(50% + 205px); text-align: right; }
.annotation.dessin { bottom: 14%; left: calc(50% + 205px); }
@media (max-width: 1080px) { .annotation { display: none; } }
@media (max-width: 520px) { .reel { width: min(84%, 320px); box-shadow: 7px 7px 0 var(--encre); } }
.points { display: flex; gap: 10px; margin-top: 30px; }
.points button {
  width: 44px; height: 44px; border: 0; padding: 0; background: none; cursor: pointer; display: grid; place-items: center;
}
.points button span { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--encre); background: #fff; transition: background .2s; }
.points button[aria-pressed="true"] span { background: var(--encre); }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section + .section { border-top: 2px dashed var(--ligne); }
.titre-section { font-size: clamp(34px, 4.6vw, 54px); font-weight: 800; max-width: 18ch; }
.intro-section { margin-top: 16px; font-size: 19px; max-width: 52ch; color: var(--gris); }

/* Exemples : le dessin scotché, la photo posée dessus */
.exemples { margin-top: 56px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 64px 48px; }
.exemple { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: end; }
.exemple .feuille {
  position: relative;
  background: #fff;
  border: 1.5px solid #e3e6ef;
  padding: 10px;
  transform: rotate(-3deg);
  box-shadow: 0 1px 0 #e3e6ef, 2px 4px 10px rgba(29, 42, 107, 0.12);
}
.exemple .feuille::before {
  content: "";
  position: absolute; top: -12px; left: 50%; width: 74px; height: 24px; transform: translateX(-50%) rotate(-4deg);
  background: rgba(255, 212, 59, 0.75);
  border-left: 2px dotted rgba(255,255,255,.6);
  border-right: 2px dotted rgba(255,255,255,.6);
}
.exemple .photo {
  position: relative;
  margin-left: -10%;
  margin-bottom: -16px;
  background: #fff;
  padding: 10px 10px 8px;
  border: 2px solid var(--encre);
  transform: rotate(2.5deg);
  box-shadow: 6px 6px 0 var(--encre);
}
.exemple .photo img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.exemple .photo figcaption {
  margin-top: 6px; padding-inline: 4px;
  font-family: var(--main); font-size: clamp(12px, 3.4vw, 15px); line-height: 1.7; color: var(--encre);
}
.exemple:nth-child(even) .feuille { transform: rotate(2deg); }
.exemple:nth-child(even) .photo { transform: rotate(-2deg); }
@media (max-width: 820px) { .exemples { grid-template-columns: 1fr; gap: 72px; } }

/* Accueil : la section « Vos coloriages », texte à gauche, page A4 scotchée à droite */
.coloriages-accueil { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.surtitre { font-family: var(--main); font-size: 20px; line-height: 1.8; color: var(--stylo); }
.mini-etapes { margin: 32px 0 0; padding: 0; list-style: none; display: grid; gap: 18px; counter-reset: mini; max-width: 46ch; }
.mini-etapes li { counter-increment: mini; position: relative; padding-left: 58px; min-height: 44px; color: var(--gris); font-size: 17px; }
.mini-etapes li strong { display: block; color: var(--encre); font-size: 19px; }
.mini-etapes li::before {
  content: counter(mini);
  position: absolute; top: -2px; left: 0;
  width: 44px; height: 44px; display: grid; place-items: center;
  font-family: var(--main); font-size: 20px; color: var(--encre);
  background: url("img/rond.svg") center / contain no-repeat;
}
.coloriages-accueil .actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; }
.coloriages-accueil .rassurance { font-size: 16px; color: var(--gris); }
.page-coloriage { position: relative; margin: 0; width: min(100%, 380px); justify-self: center; background: #fff; padding: 14px; border: 1.5px solid #e3e6ef; box-shadow: 2px 6px 16px rgba(29, 42, 107, 0.14); transform: rotate(2deg); }
.page-coloriage::before { content: ""; position: absolute; top: -12px; left: 50%; width: 80px; height: 24px; transform: translateX(-50%) rotate(-3deg); background: rgba(255, 212, 59, 0.75); }
.annotation.prenom { bottom: 6.5%; right: calc(100% + 4px); text-align: right; }
@media (max-width: 1080px) { .annotation.prenom { display: none; } }
@media (max-width: 900px) { .coloriages-accueil { grid-template-columns: 1fr; gap: 48px; } }
@media (max-width: 520px) { .page-coloriage { width: min(86%, 340px); } }

/* Étapes : vraie séquence, donc numérotée */
.etapes { margin: 56px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: etape; }
.etapes li { counter-increment: etape; position: relative; padding-top: 76px; }
.etapes li::before {
  content: counter(etape);
  position: absolute; top: 0; left: 0;
  width: 60px; height: 60px; display: grid; place-items: center;
  font-family: var(--main); font-size: 26px; color: var(--encre);
  background: url("img/rond.svg") center / contain no-repeat;
}
.etapes h3 { font-size: 22px; font-weight: 700; }
.etapes p { margin-top: 8px; color: var(--gris); font-size: 17px; }
@media (max-width: 900px) { .etapes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .etapes { grid-template-columns: 1fr; } }

/* Tarifs */
.offres { margin-top: 48px; display: grid; grid-template-columns: 1.12fr 1fr; gap: 28px; align-items: stretch; max-width: 880px; }
.offre { border: 2.5px solid var(--encre); border-radius: 22px 14px 24px 16px / 16px 24px 14px 22px; padding: 30px; display: flex; flex-direction: column; background: #fff; }
.offre.vedette { background: #fffbea; box-shadow: 8px 8px 0 var(--encre); }
.offre h3 { font-size: 24px; }
.offre .prix { margin-top: 14px; font-size: 46px; font-weight: 800; letter-spacing: -0.03em; }
.offre .prix small { font-size: 17px; font-weight: 500; color: var(--gris); letter-spacing: 0; }
.offre ul { margin: 18px 0 26px; padding: 0; list-style: none; display: grid; gap: 10px; }
.offre li { padding-left: 32px; position: relative; }
.offre li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; background: url("img/coche.svg") center / contain no-repeat; }
.offre .bouton { margin-top: auto; }
.offre .mot { font-family: var(--main); color: var(--stylo); font-size: 17px; line-height: 1.6; margin-top: 4px; }
@media (max-width: 720px) { .offres { grid-template-columns: 1fr; } }

/* Questions */
.questions { margin-top: 40px; max-width: 760px; }
.questions details { border-bottom: 2px solid var(--ligne-fine); }
.questions summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; font-weight: 700; font-size: 20px;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-family: var(--main); font-size: 28px; color: var(--stylo); transition: transform .2s;
}
.questions details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.questions details p { padding: 0 0 22px; color: var(--gris); max-width: 62ch; }

/* Appel final */
.appel { text-align: left; }
.appel .conteneur { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.appel h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 800; max-width: 16ch; }

.pied { padding: 40px 0 56px; font-size: 15px; color: var(--gris); border-top: 2px dashed var(--ligne); }
.pied .conteneur { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.pied a { color: var(--gris); }

/* ---------- Formulaire de création ---------- */
.page-appli { min-height: 100vh; }
.feuille-appli { padding: 12px 0 96px; }
.feuille-appli .conteneur { max-width: 760px; padding-left: calc(var(--pos-marge) - 20px + 24px); }
@media (max-width: 520px) { .feuille-appli .conteneur { padding-left: 16px; } }
.feuille-appli h1 { font-size: clamp(36px, 5vw, 54px); font-weight: 800; }
.feuille-appli .chapo { margin-top: 12px; font-size: 19px; color: var(--gris); max-width: 48ch; }
.champ { margin-top: 36px; }
.champ > label, .champ > .etiquette { display: block; font-weight: 700; font-size: 20px; }
.champ .aide { margin-top: 4px; font-size: 16px; color: var(--gris); }
.champ input[type="text"], .champ input[type="email"], .champ textarea {
  margin-top: 12px; width: 100%; padding: 14px 16px; font: 400 18px/1.4 var(--texte); color: var(--encre);
  background: #fff; border: 2px solid var(--encre); border-radius: 12px;
}
.champ textarea { min-height: 112px; resize: vertical; }
.champ input::placeholder, .champ textarea::placeholder { color: #8b92b3; }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 600px) { .deux { grid-template-columns: 1fr; } }
.facultatif-mot { font-weight: 400; color: var(--gris); font-size: 16px; }

.champ > .depot {
  font-weight: 400; font-size: 18px;
  margin-top: 14px; position: relative; display: grid; place-items: center; text-align: center;
  min-height: 260px; padding: 24px; border: 2.5px dashed var(--encre); border-radius: 18px; background: rgba(255,255,255,.85);
  cursor: pointer; transition: background .15s;
}
.depot:hover, .depot.survol { background: #fffbea; }
.depot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.depot .invite strong { display: block; font-size: 20px; }
.depot .invite span { display: block; margin-top: 6px; color: var(--gris); font-size: 16px; }
.depot img.vignette { max-height: 340px; width: auto; border: 1.5px solid #e3e6ef; box-shadow: 2px 4px 10px rgba(29,42,107,.12); transform: rotate(-1.5deg); }
.depot .changer { margin-top: 14px; font-size: 15px; color: var(--stylo); text-decoration: underline; }
.conseils { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; color: var(--gris); }
.conseils li::before { content: "✓ "; color: var(--vert); font-weight: 700; }

.pastilles { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.pastilles label { position: relative; }
.pastilles input { position: absolute; opacity: 0; pointer-events: none; }
.pastilles span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 2px solid var(--encre); border-radius: 999px;
  background: #fff; font-weight: 500; font-size: 16px; cursor: pointer; transition: background .12s, color .12s;
}
.pastilles input:checked + span { background: var(--encre); color: #fff; }
.pastilles input:focus-visible + span { outline: 3px solid var(--stylo); outline-offset: 2px; }
.envoi { margin-top: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; }
.envoi .rassurance { font-size: 15px; color: var(--gris); max-width: 34ch; }
.message-erreur { margin-top: 18px; padding: 14px 16px; border-left: 4px solid var(--marge); background: #fff1f2; color: #8a1c25; border-radius: 4px; font-size: 16px; }
[hidden] { display: none !important; }

/* ---------- Page commande ---------- */
.duo { margin-top: 32px; display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 28px; align-items: start; }
@media (max-width: 680px) { .duo { grid-template-columns: 1fr; } }
.duo figure { margin: 0; }
.duo .feuille-dessin { background: #fff; padding: 10px; border: 1.5px solid #e3e6ef; transform: rotate(-2deg); box-shadow: 2px 4px 10px rgba(29,42,107,.12); }
.duo figcaption { margin-top: 10px; font-family: var(--main); font-size: 16px; line-height: 1.8; color: var(--stylo); }
.resultat { position: relative; background: #fff; border: 2.5px solid var(--encre); border-radius: 18px; overflow: hidden; box-shadow: 8px 8px 0 var(--encre); }
.resultat img, .resultat video { width: 100%; height: auto; }
.attente { aspect-ratio: 1; display: grid; place-items: center; text-align: center; padding: 28px; background: #f4f7fd; position: relative; overflow: hidden; }
.attente::before {
  content: ""; position: absolute; left: 0; right: 0; height: 40%; top: -40%;
  background: linear-gradient(180deg, transparent, rgba(255, 212, 59, 0.45), transparent);
  animation: balayer 2.4s ease-in-out infinite;
}
@keyframes balayer { to { top: 100%; } }
.attente p { position: relative; font-size: 18px; max-width: 26ch; }
.attente .main { font-family: var(--main); font-size: 22px; color: var(--stylo); line-height: 1.7; display: block; margin-bottom: 6px; }
.choix-offres { margin-top: 40px; display: grid; gap: 14px; }
.choix { position: relative; display: block; }
.choix input { position: absolute; opacity: 0; pointer-events: none; }
.choix .carte {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 18px 20px;
  border: 2.5px solid var(--encre); border-radius: 16px; background: #fff; cursor: pointer;
}
.choix .carte strong { font-size: 19px; }
.choix .carte .prix { grid-row: span 2; font-size: 28px; font-weight: 800; }
.choix .carte small { color: var(--gris); font-size: 15px; }
.choix input:checked + .carte { background: #fffbea; box-shadow: 5px 5px 0 var(--encre); }
.choix input:focus-visible + .carte { outline: 3px solid var(--stylo); outline-offset: 3px; }
#options-video { margin-top: 8px; }
.compteur { font-size: 14px; text-align: right; }
.idees.themes button { border-style: solid; }
.idees button[aria-pressed="true"], .idees button[aria-pressed="true"]:hover { background: var(--encre); color: #fff; }
.idees { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.idees button {
  min-height: 40px; padding: 6px 14px; border: 1.5px dashed var(--encre); border-radius: 999px;
  background: #fff; color: var(--encre); font: 500 15px/1.2 var(--texte); cursor: pointer;
}
.idees button:hover { background: #fffbea; }
.bandeau { margin-top: 24px; padding: 14px 18px; border-radius: 12px; background: #eef3ff; border: 1.5px solid var(--ligne); font-size: 16px; }
.bandeau.essai { background: #fff8db; border-color: var(--feutre-fonce); }
.livrables { margin-top: 40px; display: grid; gap: 40px; }
.livrable h2 { font-size: 26px; font-weight: 800; }
.livrable p { margin-top: 6px; color: var(--gris); font-size: 16px; }
.livrable .media { margin-top: 16px; }
.livrable .actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 12px; }
.livrable.reel-livrable .media { max-width: 340px; }
.lien-commande { margin-top: 28px; font-size: 15px; color: var(--gris); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lien-commande code { background: #f4f7fd; padding: 6px 10px; border-radius: 8px; font-size: 14px; word-break: break-all; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Avant l'ouverture des commandes (voir ouverture.js) */
.bandeau-ouverture { margin: 0; padding: 10px 20px; background: var(--feutre); color: var(--encre); border-bottom: 2.5px solid var(--encre); text-align: center; font-weight: 700; font-size: 16px; }
.ferme { margin-top: 28px; padding: 24px 26px; max-width: 620px; background: #fffbea; border: 2.5px dashed var(--encre); border-radius: 18px; font-size: 19px; }
.ferme .main { display: block; font-family: var(--main); font-size: 24px; line-height: 1.7; color: var(--stylo); }
