/* =============================================================
   Pages des outils — socle fonctionnel uniquement.
   Aucune mise en page ici : chaque outil a sa propre feuille
   (lgcs.css, faconne.css, gida.css, ingua.css, panier-du-web.css)
   qui définit ses couleurs, ses polices et sa composition.
   Variables attendues : --bg, --ink, --accent, --on-accent.
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg, #fff); color: var(--ink, #111); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video, svg { max-width: 100%; display: block; }
img { height: auto; }
h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
summary { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent, #000); outline-offset: 3px; }

.skip-link { position: absolute; left: 12px; top: -80px; z-index: 1000; background: var(--ink, #111); color: var(--bg, #fff); padding: 12px 18px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Vidéo : garde son format pendant le chargement */
.video-frame video { width: 100%; aspect-ratio: 16 / 9; display: block; background: #000; }

/* États du formulaire (pilotés par outil.js) */
.form-alert { display: none; padding: 14px 16px; margin-bottom: 18px; font-weight: 600; border-radius: 8px; }
.form-alert.show { display: block; }
.form-alert.ok { background: #E3F4E8; color: #14602F; border: 1px solid #A9D9B8; }
.form-alert.err { background: #FCE8E6; color: #9B1C12; border: 1px solid #F0B4AE; }
.field.error input, .field.error textarea { border-color: #C62B1E !important; }
.checkbox.error { color: #C62B1E; }

/* Apparition au défilement */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }
.no-js .reveal { opacity: 1; transform: none; }

/* Bandeau de consentement */
.cookie-banner { position: fixed; left: 50%; bottom: 18px; z-index: 900; width: min(560px, calc(100vw - 24px)); transform: translate(-50%, 140%); transition: transform .45s cubic-bezier(.2,.7,.2,1); background: var(--ink, #111); color: var(--bg, #fff); padding: 20px 22px; border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.35); font-size: .92rem; }
.cookie-banner.show { transform: translate(-50%, 0); }
.cookie-banner p { margin-bottom: 14px; }
.cookie-banner a { text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions button { border: 2px solid currentColor; background: transparent; color: inherit; padding: 9px 18px; border-radius: 8px; font-weight: 700; }
.cookie-actions button[data-cookie="granted"] { background: var(--accent, #fff); border-color: var(--accent, #fff); color: var(--on-accent, #111); }

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