/* Page d'attente iua-ce.org — feuille unique, aucune ressource externe.
   Couleurs (SITE-09 v0.3) : marine #141B38, bleu #1866A0, orange #F6600A, fond crème #FFFAF3.
   Contrastes calculés (WCAG 2.2, luminance relative) : voir LISEZMOI.md. */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/Poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/Poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/Poppins-700.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/Poppins-800.woff2") format("woff2"); }

:root {
  --navy: #141B38;
  --blue: #1866A0;
  --orange: #F6600A;
  --ink-muted: #3A4560;
  --bg: #FFFAF3;
  --sky: #DCEFFA;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--navy);
  font: 400 1rem/1.6 "Poppins", "Segoe UI", system-ui, sans-serif;
}

a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 2;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; color: #fff; }
.skip:focus-visible { outline-color: var(--orange); }

/* ------------------------------------------------------------ en-tête : marque typographique (A30) */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; max-width: 1232px; margin: 0 auto;
  padding: clamp(16px, 3vw, 28px) var(--gutter);
}
.mark { margin: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 0; line-height: 1.3; }
.mark__a { font-weight: 800; font-size: clamp(.95rem, .85rem + .4vw, 1.08rem); letter-spacing: -.005em; }
.mark__sep { width: 18px; height: 3px; border-radius: 2px; background: var(--orange); }
.mark__b { font-weight: 400; font-size: clamp(.85rem, .8rem + .25vw, .95rem); color: var(--ink-muted); }
.lang {
  flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 2px solid var(--navy); border-radius: 999px;
  color: var(--navy); font-weight: 600; font-size: .9rem; text-decoration: none;
}
.lang:hover { background: var(--navy); color: #fff; }

/* ------------------------------------------------------------ scène principale */
.stage {
  flex: 1;
  width: 100%; max-width: 1232px; margin: 0 auto;
  padding: 0 var(--gutter) clamp(28px, 5vw, 56px);
  display: grid; align-items: center; gap: clamp(8px, 3vw, 48px);
  grid-template-columns: minmax(0, 1fr);
}
.copy { text-align: center; max-width: 560px; margin: 0 auto; }
.art { margin: 0 auto; width: 100%; max-width: 520px; order: -1; }
.scene { width: 100%; height: auto; display: block; overflow: visible; }

h1 {
  margin: 0 0 .45em;
  font-weight: 800; font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.5rem); line-height: 1.06; letter-spacing: -.02em;
  text-wrap: balance;
}
.h1__a { display: block; }
.h1__b {
  /* trait de surligneur orange pâle derrière les mots (décor) ; texte marine conservé : 12,5:1 au pire */
  background: linear-gradient(transparent 62%, rgba(246, 96, 10, .26) 62%, rgba(246, 96, 10, .26) 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding: 0 .06em;
}
.lead { margin: 0 auto 1.6em; max-width: 34ch; font-size: clamp(1.05rem, .98rem + .35vw, 1.25rem); line-height: 1.55; color: var(--ink-muted); }

.notice {
  display: inline-block; margin: 0 0 1.2em; padding: 8px 16px; border-radius: 14px;
  background: var(--sky); color: var(--navy); font-size: .9rem; font-weight: 600;
}

/* Bouton « Passer en revue » : texte marine sur orange (5,30:1), jamais blanc sur orange. */
.cta-wrap { margin: 0; }
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 60px; padding: 0 30px 0 34px;
  background: var(--orange); color: var(--navy);
  border-radius: 999px; text-decoration: none;
  font-weight: 800; font-size: clamp(1.08rem, 1rem + .3vw, 1.2rem); letter-spacing: .005em;
  box-shadow: 0 4px 0 var(--navy), 0 14px 28px -10px rgba(246, 96, 10, .55);
  transition: transform .16s cubic-bezier(.2, 0, 0, 1), box-shadow .16s cubic-bezier(.2, 0, 0, 1);
}
.cta__arrow { width: 22px; height: 22px; flex: none; transition: transform .16s cubic-bezier(.2, 0, 0, 1); }
.cta:hover { color: var(--navy); transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--navy), 0 6px 0 var(--navy), 0 18px 30px -10px rgba(246, 96, 10, .6); }
.cta:hover .cta__arrow { transform: translateX(4px); }
.cta:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--navy); }
.cta:focus-visible { outline: 3px solid var(--navy); outline-offset: 5px; border-radius: 999px; }
.cta-note { margin: 14px auto 0; font-size: .875rem; line-height: 1.5; color: var(--ink-muted); max-width: 46ch; }
.nowrap { white-space: nowrap; }
.contact { margin: 1.75em 0 0; font-size: .95rem; color: var(--ink-muted); }
.contact a { font-weight: 600; }

/* Commande « Arrêter l'animation » (WCAG 2.2.2) : case native, sans script. */
.motion { margin: 0; display: flex; justify-content: center; align-items: center; gap: 10px; font-size: .875rem; color: var(--ink-muted); }
.motion-stop { margin: 0; width: 20px; height: 20px; flex: none; accent-color: var(--navy); cursor: pointer; }
.motion label { cursor: pointer; padding: 10px 0; }
.motion-stop:focus-visible { outline-offset: 2px; }

@media (min-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); }
  .art { order: 0; max-width: 640px; }
  .copy { text-align: left; margin: 0; }
  .lead, .cta-note { margin-left: 0; }
  .motion { justify-content: flex-end; }
  .h1__b { margin-left: -.06em; }
  .copy { max-width: 600px; }
}
@media (max-width: 899.98px) {
  .art { max-width: min(460px, 100%); margin-bottom: -4px; }
}
@media (max-width: 380px) {
  .cta { width: 100%; padding: 0 20px; }
  .mark__sep { display: none; }
  .mark { flex-direction: column; align-items: flex-start; }
}

/* ------------------------------------------------------------ animation du château
   État de base = château presque terminé ; les animations partent d'un état caché vers cet état
   (fill-mode both). Sans animation, on voit donc le château final, échafaudage compris. */
.scene .drop, .scene .pop, .scene .grow, .scene .rise, .scene .slide, .scene .extend, .scene .unroll,
.scene .flag, .scene .hammer, .scene .sparks, .scene .cloud, .scene .hoist, .scene .banner-l, .scene .banner-r {
  transform-box: fill-box;
}
.scene .drop { animation: drop .72s cubic-bezier(.3, .75, .4, 1) both; }
.scene .pop { transform-origin: 50% 100%; animation: pop .55s cubic-bezier(.3, 1.5, .5, 1) both; }
.scene .grow { transform-origin: 50% 50%; animation: grow .6s cubic-bezier(.2, .8, .3, 1) both; }
.scene .rise { transform-origin: 50% 100%; animation: rise .7s cubic-bezier(.2, .8, .3, 1) both; }
.scene .slide { transform-origin: 0 50%; animation: slide .45s cubic-bezier(.2, .8, .3, 1) both; }
.scene .extend { transform-origin: 72% 50%; animation: extend .6s cubic-bezier(.3, 1.3, .5, 1) both; }
.scene .unroll { transform-origin: 50% 0; animation: unroll .7s cubic-bezier(.3, 1.4, .5, 1) both; }

.scene .t00 { animation-delay: .1s; } .scene .t04 { animation-delay: .4s; } .scene .t05 { animation-delay: .5s; }
.scene .t06 { animation-delay: .6s; } .scene .t07 { animation-delay: .7s; } .scene .t08 { animation-delay: .8s; }
.scene .t09 { animation-delay: .9s; } .scene .t10 { animation-delay: 1s; } .scene .t11 { animation-delay: 1.1s; }
.scene .t12 { animation-delay: 1.2s; } .scene .t13 { animation-delay: 1.3s; } .scene .t14 { animation-delay: 1.4s; }
.scene .t15 { animation-delay: 1.5s; } .scene .t16 { animation-delay: 1.6s; } .scene .t17 { animation-delay: 1.7s; }
.scene .t19 { animation-delay: 1.9s; } .scene .t20 { animation-delay: 2s; } .scene .t21 { animation-delay: 2.1s; }
.scene .t22 { animation-delay: 2.2s; } .scene .t23 { animation-delay: 2.3s; } .scene .t24 { animation-delay: 2.4s; }
.scene .t25 { animation-delay: 2.5s; } .scene .t26 { animation-delay: 2.6s; } .scene .t27 { animation-delay: 2.7s; }
.scene .t29 { animation-delay: 2.9s; } .scene .t30 { animation-delay: 3s; } .scene .t32 { animation-delay: 3.2s; }

/* drapeaux : se déploient, puis flottent */
.scene .flag { transform-origin: 0 50%; }
.scene .f1 { animation: unfurl .6s cubic-bezier(.3, 1.4, .5, 1) 3s both, wave 2.6s ease-in-out 3.6s infinite; }
.scene .f2 { animation: unfurl .6s cubic-bezier(.3, 1.4, .5, 1) 3.15s both, wave 2.6s ease-in-out 3.9s infinite; }
/* bannières : léger balancement */
.scene .banner-l, .scene .banner-r { transform-origin: 50% 0; animation: sway 3.4s ease-in-out 3.8s infinite; }
.scene .banner-r { animation-delay: 4.3s; }
/* grue : la pierre monte et descend */
.scene .hoist { animation: appear .3s ease-out 2.9s both, hoist 5s cubic-bezier(.45, 0, .55, 1) 3.2s infinite; }
/* marteau et étincelles : deux coups puis une pause (moins de 3 éclats par seconde) */
.scene .hammer { transform-box: view-box; transform-origin: 0 0; animation: appear .2s 2.6s both, hammer 2.8s ease-in 3s infinite; }
.scene .sparks { opacity: 0; transform-origin: 50% 80%; animation: sparks 2.8s linear 3s infinite; }
/* nuages */
.scene .c1 { animation: drift 16s ease-in-out infinite alternate; }
.scene .c2 { animation: drift 13s ease-in-out -4s infinite alternate-reverse; }

@keyframes drop { 0% { transform: translateY(-140px); opacity: 0; } 15% { opacity: 1; } 62% { transform: translateY(5px); } 80% { transform: translateY(-3px); } 100% { transform: none; opacity: 1; } }
@keyframes pop { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }
@keyframes rise { from { transform: scaleY(0); } to { transform: none; } }
@keyframes slide { from { transform: scaleX(0); } to { transform: none; } }
@keyframes extend { from { transform: scaleX(0); } to { transform: none; } }
@keyframes unroll { from { transform: scaleY(0); } to { transform: none; } }
@keyframes unfurl { from { transform: scaleX(0); } to { transform: none; } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes wave { 0%, 100% { transform: none; } 30% { transform: skewY(-5deg) scaleX(.94); } 65% { transform: skewY(4deg) scaleX(.97); } }
@keyframes sway { 0%, 100% { transform: none; } 50% { transform: rotate(2.5deg); } }
@keyframes hoist { 0%, 8% { transform: translateY(-66px); } 46%, 62% { transform: none; } 92%, 100% { transform: translateY(-66px); } }
@keyframes hammer {
  0% { transform: rotate(40deg); } 12% { transform: rotate(-3deg); } 16% { transform: rotate(5deg); }
  30% { transform: rotate(40deg); } 42% { transform: rotate(-3deg); } 46% { transform: rotate(5deg); }
  62%, 100% { transform: rotate(40deg); }
}
@keyframes sparks {
  0%, 11% { opacity: 0; transform: scale(.2); } 13% { opacity: 1; transform: scale(1); } 22% { opacity: 0; transform: scale(1.35); }
  40%, 41% { opacity: 0; transform: scale(.2); } 43% { opacity: 1; transform: scale(1); } 52% { opacity: 0; transform: scale(1.35); }
  100% { opacity: 0; }
}
@keyframes drift { from { transform: translateX(-14px); } to { transform: translateX(18px); } }

/* Arrêt demandé par la personne, ou mouvement réduit : château final, aucune animation. */
.art:has(.motion-stop:checked) .scene, .art:has(.motion-stop:checked) .scene * { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .scene, .scene * { animation: none !important; }
  .motion { display: none; }
  .cta, .cta__arrow { transition: none; }
}
