/* Accueil en couleurs : les quatre couleurs des crayons en grands aplats,
   et des mouvements qui continuent même sans défiler. Chargé après parcours.css. */
:root { --c-rouge: #B3202A; --c-bleu: #1B55B5; --c-vert: #167A46; --c-gris: #3A3F46; }

/* ---------- Ouverture : le fond et le crayon changent de couleur ---------- */
.ouverture { background: var(--c-rouge); color: #fff; isolation: isolate; }
.ouverture .etiquette, .ouverture__sous, .ouverture__descendre { color: #fff; }
.ouverture__descendre span { background: #fff; }
.ouverture .btn { background: #fff; border-color: #fff; color: var(--accent, var(--c-rouge)); height: 56px; padding: 0 2rem; font-size: 17px; box-shadow: 0 12px 26px rgba(0, 0, 0, .28); }
.ouverture .btn:hover { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.ouverture__promo { background: #fff; color: var(--graphite); }
main { overflow-x: clip; }
.ouverture__texte { position: relative; z-index: 3; }
.ouverture__crayon { position: relative; z-index: 2; margin-top: 3.5rem; }
.ouverture__crayon::before, .couleurs__crayon::before { content: ""; position: absolute; left: -8%; right: -8%; top: 50%; height: 150px; transform: translateY(-50%); background: radial-gradient(closest-side, rgba(255, 255, 255, .96), rgba(255, 255, 255, .6) 45%, rgba(255, 255, 255, 0)); z-index: -1; }
.ouverture__descendre { z-index: 2; }
.vague { position: absolute; inset: 0; z-index: 0; clip-path: circle(0 at 50% 74%); animation: vague .9s cubic-bezier(.6, 0, .3, 1) forwards; }
@keyframes vague { to { clip-path: circle(150% at 50% 74%); } }
.arrive { animation: fonce .85s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes fonce { from { opacity: 0; transform: translateX(-75vw) rotate(-200deg) scale(.4); } }
.ouverture__points { position: relative; z-index: 2; display: flex; gap: .8rem; margin-top: 2rem; }
.ouverture__points button { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: var(--c); cursor: pointer; transition: transform .3s; }
.ouverture__points button[aria-pressed="true"] { transform: scale(1.5); }

/* Crayons qui traversent et mines qui flottent */
.decor { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.decor__crayon { position: absolute; left: 0; width: clamp(240px, 34vw, 520px); height: auto; max-width: none; opacity: .55; animation: traverse var(--duree) linear infinite; animation-delay: var(--retard); }
@keyframes traverse { from { transform: translateX(-110%) rotate(var(--angle)); } to { transform: translateX(105vw) rotate(var(--angle)); } }
.decor__mine { position: absolute; width: var(--taille); height: auto; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .3)); animation: bulle var(--duree) ease-in-out infinite alternate; animation-delay: var(--retard); }
@keyframes bulle { from { transform: translateY(30px) rotate(-25deg); } to { transform: translateY(-45px) rotate(35deg); } }

/* ---------- Le logo qui se dessine : le fond change à chaque phrase ---------- */
.trace { transition: background-color .7s; }
.trace .scene__colle { isolation: isolate; }
.anime .phase.active { animation: tape .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes tape { from { transform: scale(1.5); opacity: 0; } }

/* ---------- Les quatre couleurs : fond franc ---------- */
.couleurs .scene__colle { color: #fff; isolation: isolate; }
.couleurs .etiquette { color: #fff; }
.couleurs__geant { color: #fff; opacity: .2; }
.couleurs__crayon { isolation: isolate; }
.couleurs__titre { z-index: 2; }
.couleurs .btn { background: #fff; border-color: #fff; color: var(--graphite); }
.couleurs__points button { border: 2px solid #fff; }
.couleurs__points button[aria-pressed="true"] { box-shadow: 0 0 0 4px #fff; }
.anime .couleurs .change { animation: fonce .75s cubic-bezier(.2, 1.4, .4, 1) both; }
.anime .couleurs__geant.saute { animation: geant .7s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes geant { from { opacity: 0; scale: 1.7; } }

/* ---------- Les mines : une carte par couleur, elles dansent ---------- */
.chute li:nth-child(1) a { background: var(--c-gris); }
.chute li:nth-child(2) a { background: var(--c-rouge); }
.chute li:nth-child(3) a { background: var(--c-bleu); }
.chute li:nth-child(4) a { background: var(--c-vert); }
.chute a { color: #fff; padding: 1.5rem .5rem; }
.chute img { background: #fff; border-radius: 50%; padding: 14px; }
.anime .chute img { animation: danse 1.9s ease-in-out infinite; }
.anime .chute li:nth-child(2) img { animation-delay: -.45s; }
.anime .chute li:nth-child(3) img { animation-delay: -.9s; }
.anime .chute li:nth-child(4) img { animation-delay: -1.35s; }
@keyframes danse { 0%, 100% { transform: translateY(6px) rotate(-14deg); } 50% { transform: translateY(-14px) rotate(14deg); } }

/* ---------- Les gestes : cartes en couleurs ---------- */
.piste li { color: #fff; }
.piste li:nth-child(1) { background: var(--c-rouge); }
.piste li:nth-child(2) { background: var(--c-bleu); }
.piste li:nth-child(3) { background: var(--c-vert); }
.piste li:nth-child(4) { background: var(--c-gris); }
.piste li > span, .piste p { color: #fff; }
.piste svg { stroke: #fff; stroke-width: 2; }
.anime .gestes .piste li { opacity: .55; transform: scale(.86) rotate(5deg); }
.anime .gestes .piste li.active { opacity: 1; transform: scale(1.04) rotate(-1.5deg); }
.anime .piste li.active svg { animation: danse 1.6s ease-in-out infinite; }

/* ---------- Fonds qui changent tout seuls ---------- */
@keyframes boucle { 0%, 100% { background-color: #B3202A; } 25% { background-color: #1B55B5; } 50% { background-color: #167A46; } 75% { background-color: #3A3F46; } }
.section--graphite[aria-labelledby], .section--graphite[aria-label] { color: #fff; }
.anime .section--graphite { animation: boucle 12s ease-in-out infinite; }
.section--graphite .chiffres strong, .section--graphite .etiquette { color: #fff; }
.anime .chiffres strong { width: max-content; animation: bat 1.4s ease-in-out infinite; transform-origin: left center; }
@keyframes bat { 50% { transform: scale(1.12) rotate(-3deg); } }

.revele .scene__colle { background: var(--c-bleu); color: #fff; }
.anime .revele .scene__colle { animation: boucle 10s ease-in-out infinite; animation-delay: -3s; }
.revele .note { color: #fff; }
.revele__cadre { box-shadow: 0 30px 60px rgba(0, 0, 0, .3); }

.final .scene__colle { background: var(--c-rouge); color: #fff; isolation: isolate; }
.anime .final .scene__colle { animation: boucle 9s ease-in-out infinite; }
.final__texte { z-index: 2; }
.final__texte p { color: #fff; }
.final .btn { background: #fff; border-color: #fff; color: var(--graphite); }
.final__main { position: relative; z-index: 2; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }

/* ---------- Photos : elles flottent sur des aplats de couleur ---------- */
.ambiance li { position: relative; isolation: isolate; }
.ambiance figcaption { margin-top: .9rem; padding: .75rem 1rem .85rem; background: #fff; border-radius: 12px; box-shadow: 0 8px 18px rgba(30, 34, 38, .14); }
.ambiance li::before { content: ""; position: absolute; inset: -10px -10px 40px; border-radius: 22px; background: var(--c-rouge); z-index: -1; transform: rotate(-4deg); }
.ambiance li:nth-child(2)::before { background: var(--c-vert); transform: rotate(4deg); }
.ambiance li:nth-child(3)::before { background: var(--c-bleu); }
.anime .ambiance li::before { animation: balance 4s ease-in-out infinite alternate; }
@keyframes balance { from { rotate: -3deg; } to { rotate: 4deg; } }
.anime .ambiance figure { animation: flotter 3.6s ease-in-out infinite; }
.anime .ambiance li:nth-child(2) figure { animation-delay: -1.2s; }
.anime .ambiance li:nth-child(3) figure { animation-delay: -2.4s; }
@keyframes flotter { 50% { transform: translateY(-16px); } }
.anime .garder img { animation: penche 5s ease-in-out infinite; }
@keyframes penche { 0%, 100% { transform: rotate(-3deg) scale(1); } 50% { transform: rotate(3deg) scale(1.05); } }
.anime .changer li.vu img { animation: respire 3s ease-in-out infinite; }
@keyframes respire { 50% { transform: scale(1.07); } }
.changer li:nth-child(1) { border-bottom: 8px solid var(--c-rouge); }
.changer li:nth-child(2) { border-bottom: 8px solid var(--c-bleu); }
.changer li:nth-child(3) { border-bottom: 8px solid var(--c-vert); }
.changer li:nth-child(4) { border-bottom: 8px solid var(--c-gris); }

.equivaut h2 [data-monte] { display: inline-block; min-width: 1.9em; color: var(--c-rouge); font-size: 1.5em; }

/* Collection et avis */
.collection li:nth-child(1) .carte { background: #F6D5D2; }
.collection li:nth-child(2) .carte { background: #D3E0F6; }
.collection li:nth-child(3) .carte { background: #D2EBDD; }
.collection li:nth-child(4) .carte { background: #DDDEE1; }
.carte { transition: transform .3s cubic-bezier(.2, 1.6, .4, 1), box-shadow .3s; }
a.carte:hover { transform: translateY(-10px) rotate(-1.5deg); box-shadow: 0 18px 30px rgba(30, 34, 38, .18); }
.avis li:nth-child(1) { border-top: 8px solid var(--c-rouge); }
.avis li:nth-child(2) { border-top: 8px solid var(--c-bleu); }
.avis li:nth-child(3) { border-top: 8px solid var(--c-vert); }
.avis li:nth-child(4) { border-top: 8px solid var(--c-gris); }

@media (max-width: 719px) {
  .decor__mine:nth-of-type(even) { display: none; }
  .decor__mine { scale: .65; }
  .ouverture__crayon::before, .couleurs__crayon::before { height: 110px; }
  .ouverture__points { margin-top: 1.25rem; }
}
