/* ==========================================================================
   La Fresque des risques de l'IA - design éditorial, sobre.
   Charte Pause IA (A16) appliquée avec retenue. Zéro requête tierce.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-doux: #faf8f4;
  --ink: #1b1a17;
  --gris: #6b665e;
  --gris-clair: #9a948a;
  --ligne: #ece9e2;
  --accent: #E8811C;          /* orange Pause IA, usages décoratifs (aplats, points) */
  --accent-fort: #C4610A;
  --accent-txt: #B0560A;      /* orange assombri pour texte/boutons : contraste AA (>=4.5:1) */
  --accent-txt-fort: #8a4200; /* survol des boutons, contraste renforcé */
  --accent-doux: #fbf1e4;

  --f-titre: "Saira Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-ui: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-texte: "Roboto Slab", Georgia, serif;

  --lg: 1120px;      /* largeur max page */
  --texte: 42rem;    /* largeur de lecture */
}

* , *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-texte); font-weight: 300;
  font-size: 1.0625rem; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-family: var(--f-titre); font-weight: 700; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2.6rem, 5.2vw, 4rem); letter-spacing: .002em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1.1rem; }
a { color: var(--accent-txt); text-decoration: none; }
a:hover { color: var(--accent-txt-fort); text-decoration: underline; text-underline-offset: 3px; }
/* Liens au fil du texte : soulignés pour rester repérables sans dépendre de la couleur (WCAG 1.4.1) */
.prose a, .avis a, .lobby-retour a, .fine a, .nl .fine a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

.wrap { width: 100%; max-width: var(--lg); margin: 0 auto; padding: 0 1.75rem; }
.eyebrow { font-family: var(--f-ui); font-weight: 700; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-txt); margin: 0 0 1.1rem; }
.lede { font-size: 1.2rem; color: #35322c; max-width: var(--texte); }
.muted { color: var(--gris); }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: .7em 1em; }
.skip:focus { left: 0; z-index: 100; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* --- Boutons : discrets, un seul plein ------------------------------------ */
.btn { font-family: var(--f-ui); font-weight: 600; font-size: .98rem; display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.4rem; border-radius: 8px; border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-1 { background: var(--accent-txt); color: #fff; }
.btn-1:hover { background: var(--accent-txt-fort); color: #fff; }
.btn-2 { background: transparent; color: var(--ink); border-color: var(--ligne); }
.btn-2:hover { border-color: var(--ink); color: var(--ink); }
.btn small { display: block; font-weight: 400; font-size: .74rem; color: #fff; }
.btn-2 small { color: var(--gris); }
.btn.disabled { background: var(--bg-doux); color: var(--gris); border-color: var(--ligne); cursor: default; }
.btn.disabled small { color: var(--gris); }
.lien-fleche { font-family: var(--f-ui); font-weight: 600; font-size: .95rem; }

/* --- En-tête -------------------------------------------------------------- */
.entete { border-bottom: 1px solid var(--ligne); position: sticky; top: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); z-index: 40; }
.entete .wrap { display: flex; align-items: center; justify-content: space-between; height: 4.4rem; }
.logo { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--f-titre); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.logo:hover { color: var(--ink); text-decoration: none; }
.logo .mk { width: 1.7rem; height: 1.7rem; }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.entete .wrap { position: relative; }
.nav-toggle { display: none; }
/* Sélecteur de langue */
.nav .lang { font-family: var(--f-ui); font-weight: 600; font-size: .8rem; letter-spacing: .04em; color: var(--gris); border: 1px solid var(--ligne); border-radius: 999px; padding: .2rem .55rem; }
.nav .lang:hover { color: var(--accent-txt); border-color: var(--accent-txt); }
.nav .lang::after { display: none; }
.nav a { position: relative; font-family: var(--f-ui); font-weight: 500; font-size: .93rem; color: var(--ink); padding: .25rem 0; white-space: nowrap; }
.nav a:hover { color: var(--accent-txt); text-decoration: none; }
.nav .actif { color: var(--accent-txt); }
/* Soulignement animé (survol) et repère de page active, en plus de la couleur */
.nav a:not(.btn-nav)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent-txt); transform: scaleX(0); transform-origin: left; transition: transform .18s ease; }
.nav a:not(.btn-nav):hover::after, .nav a.actif:not(.btn-nav)::after { transform: scaleX(1); }
.nav .bientot { font-family: var(--f-ui); font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gris); border: 1px solid var(--ligne); border-radius: 999px; padding: .05em .45em; margin-left: .35em; vertical-align: middle; }
/* Appel à l'action de la barre : télécharger, en évidence */
.nav .btn-nav { background: var(--accent-txt); color: #fff; font-weight: 600; padding: .5rem .95rem; border-radius: 8px; transition: background .15s; }
.nav .btn-nav:hover { background: var(--accent-txt-fort); color: #fff; }

/* --- Hero ----------------------------------------------------------------- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 4rem; align-items: center; }
.hero h1 { margin-bottom: 1.2rem; }
.hero .meta { font-family: var(--f-ui); font-size: .9rem; color: var(--gris); margin: 1.6rem 0 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.hero .meta span { display: inline-flex; align-items: center; gap: .5rem; }
.hero .meta .pt { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.hero .actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

/* Visuel héros : trois cartes en éventail, retournables au clic (fondu) */
.pile { position: relative; height: 25rem; display: grid; place-items: center; }
.pile .slot { position: absolute; width: 12.5rem; aspect-ratio: 1 / 1.41; }
.pile .s1 { transform: rotate(-8deg) translateX(-6.4rem); z-index: 1; }
.pile .s2 { transform: translateY(-1rem); z-index: 3; }
.pile .s3 { transform: rotate(8deg) translateX(6.4rem); z-index: 2; }
.pile .slot:hover, .pile .slot:focus-within { z-index: 5; }
.pile .carte { position: relative; width: 100%; height: 100%; border: 0; padding: 0; background: transparent; cursor: pointer; transition: transform .18s ease; }
.pile .slot:hover .carte, .pile .carte:focus-visible { transform: translateY(-8px); }
.pile .face { position: absolute; inset: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(27,26,23,.14), 0 16px 34px rgba(27,26,23,.16); transition: opacity .3s ease; }
.pile .front { background: #14110d; opacity: 1; }
.pile .front::after { content: ""; position: absolute; inset: 0; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.10); pointer-events: none; }
.pile .front img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pile .front .lbl { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem .8rem .75rem; background: linear-gradient(0deg, rgba(8,7,5,.95), rgba(8,7,5,.55) 55%, transparent); color: #fff; font-family: var(--f-titre); font-size: .98rem; line-height: 1.08; text-align: left; }
.pile .front .no { position: absolute; top: .6rem; left: .6rem; font-family: var(--f-titre); font-size: .82rem; color: #fff; background: rgba(0,0,0,.42); border: 1px solid rgba(255,255,255,.25); border-radius: 6px; width: 1.55rem; height: 1.55rem; display: grid; place-items: center; }
.pile .back { background: #fff; border: 1px solid var(--ligne); opacity: 0; padding: 1.2rem 1.1rem; text-align: left; display: flex; flex-direction: column; }
.pile .back h3 { font-size: 1rem; color: var(--accent-txt); margin-bottom: .5rem; }
.pile .back p { font-size: .78rem; line-height: 1.42; color: #35322c; margin: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 9; }
.pile .carte[aria-pressed="true"] .front { opacity: 0; }
.pile .carte[aria-pressed="true"] .back { opacity: 1; }

/* --- Rythme des sections -------------------------------------------------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section + .section { border-top: 1px solid var(--ligne); }
.section-doux { background: var(--bg-doux); }
.entete-sec { max-width: var(--texte); margin-bottom: 2.6rem; }
.entete-sec h2 { margin-bottom: .8rem; }

/* --- L'atelier : deux colonnes éditoriales -------------------------------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
.prose { max-width: var(--texte); }
.prose p { color: #35322c; }
.flux { list-style: none; margin: 0; padding: 0; }
.flux li { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; padding: 1.2rem 0; border-top: 1px solid var(--ligne); }
.flux li:last-child { border-bottom: 1px solid var(--ligne); }
.flux .n { font-family: var(--f-titre); font-size: 1.5rem; color: var(--accent); line-height: 1; }
.flux h3 { margin-bottom: .25rem; }
.flux p { margin: 0; color: var(--gris); font-size: .98rem; }

/* --- Parcours : liste éditoriale, claire ---------------------------------- */
.temps { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: 1px solid var(--ligne); }
.temps li { display: grid; grid-template-columns: 2rem 13rem 1fr; gap: 1.4rem; align-items: baseline; padding: 1.15rem 0; border-bottom: 1px solid var(--ligne); }
.temps .i { font-family: var(--f-titre); font-size: 1.25rem; color: var(--accent); line-height: 1; }
.temps .t { font-family: var(--f-ui); font-weight: 600; font-size: 1.02rem; color: var(--ink); }
.temps .d { color: var(--gris); font-size: .97rem; }

/* --- Galerie de cartes : sobre -------------------------------------------- */
.galerie { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.gc { position: relative; aspect-ratio: 1 / 1.41; border-radius: 10px; overflow: hidden; background: #14110d; box-shadow: 0 8px 20px rgba(27,26,23,.10); transition: transform .18s ease; }
.gc:hover { transform: translateY(-4px); }
.gc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gc .no { position: absolute; top: .45rem; left: .45rem; font-family: var(--f-titre); font-size: .78rem; color: #fff; background: var(--accent-txt); border-radius: 5px; width: 1.4rem; height: 1.4rem; display: grid; place-items: center; z-index: 2; }
.gc .lbl { position: absolute; left: 0; right: 0; bottom: 0; padding: .55rem .5rem; background: linear-gradient(0deg, rgba(10,8,6,.9), transparent); color: #fff; font-family: var(--f-titre); font-size: .8rem; line-height: 1.05; }
.galerie-note { margin-top: 1.4rem; font-family: var(--f-ui); font-size: .88rem; color: var(--gris); }

/* --- Deux cartes d'information (participer) -------------------------------- */
.duo-cartes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1.2rem 0 0; }
.carte-info { border: 1px solid var(--ligne); border-radius: 12px; padding: 1.3rem 1.4rem; background: var(--bg-doux); }
.carte-info h3 { margin-bottom: .5rem; }
.carte-info p { margin: 0; color: var(--gris); font-size: .98rem; }
@media (max-width: 640px) { .duo-cartes { grid-template-columns: 1fr; } }

/* --- Photo d'atelier ------------------------------------------------------ */
.section-photo { padding: 0 0 clamp(3.5rem, 7vw, 6rem); }
.photo-atelier { margin: 0; }
.photo-atelier img { width: 100%; max-height: 30rem; object-fit: cover; border-radius: 14px; box-shadow: 0 10px 30px rgba(27,26,23,.14); }
.photo-atelier figcaption { margin-top: .8rem; font-family: var(--f-ui); font-size: .88rem; color: var(--gris); }

/* --- Bloc téléchargement / appel ------------------------------------------ */
.appel { text-align: center; }
.appel h2 { max-width: 30rem; margin: 0 auto .9rem; }
.appel p { max-width: 34rem; margin: 0 auto 2rem; color: var(--gris); }
.appel .actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* --- FAQ ------------------------------------------------------------------ */
.faq { max-width: var(--texte); }
.faq details { border-bottom: 1px solid var(--ligne); }
.faq summary { cursor: pointer; padding: 1.1rem 0; font-family: var(--f-ui); font-weight: 600; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-family: var(--f-titre); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 1.2rem; color: var(--gris); }

/* --- Newsletter ----------------------------------------------------------- */
.nl { max-width: 34rem; }
.nl form { display: flex; gap: .6rem; margin-top: 1.4rem; }
.nl input { flex: 1; font-family: var(--f-ui); font-size: 1rem; padding: .8rem .95rem; border: 1px solid var(--ligne); border-radius: 8px; background: #fff; color: var(--ink); }
.nl input:focus { outline: none; border-color: var(--accent); }
.nl button { font-family: var(--f-ui); font-weight: 600; border: 0; border-radius: 8px; background: var(--accent-txt); color: #fff; padding: .8rem 1.3rem; cursor: pointer; }
.nl button:hover { background: var(--accent-txt-fort); }
.nl button:disabled { opacity: .6; cursor: wait; }
.nl .msg { min-height: 1.3rem; margin: .8rem 0 0; font-family: var(--f-ui); font-size: .9rem; }
.nl .msg.ok { color: #2f7d4f; }
.nl .msg.err { color: #c1444e; }
.nl .fine { font-family: var(--f-ui); font-size: .78rem; color: var(--gris); margin-top: .9rem; }

/* --- Pied de page : clair ------------------------------------------------- */
.pied { border-top: 1px solid var(--ligne); }
.pied .wrap { padding: 3rem 1.75rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.pied .logo { margin-bottom: .8rem; }
.pied p { color: var(--gris); font-size: .93rem; max-width: 22rem; }
.pied h4 { font-family: var(--f-ui); font-weight: 700; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); margin: 0 0 1rem; }
.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.pied ul a { font-family: var(--f-ui); font-size: .93rem; color: var(--ink); }
.pied ul a:hover { color: var(--accent-txt); text-decoration: none; }
.pied-bas { border-top: 1px solid var(--ligne); }
.pied-bas .wrap { padding: 1.3rem 1.75rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; font-family: var(--f-ui); font-size: .82rem; color: var(--gris); }

/* --- Page titre (à propos / en ligne) ------------------------------------- */
.page-tete { padding: clamp(3rem, 6vw, 4.5rem) 0 1rem; }
.page-tete h1 { max-width: 20ch; }

/* --- Avis indisponible ---------------------------------------------------- */
.avis { border: 1px solid var(--ligne); border-left: 3px solid var(--accent); background: var(--bg-doux); border-radius: 8px; padding: 1.3rem 1.5rem; margin: 0 0 2rem; }
.avis p { margin: 0; }
.avis p + p { margin-top: .6rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .pile { order: -1; height: 20rem; }
  .duo { grid-template-columns: 1fr; gap: 2.2rem; }
  .temps li { grid-template-columns: 2rem 1fr; }
  .temps .d { grid-column: 2; }
  .galerie { grid-template-columns: repeat(3, 1fr); }
  .pied .wrap { grid-template-columns: 1fr 1fr; }
}
/* --- Navigation mobile : bouton menu + panneau déroulant --------------- */
@media (max-width: 640px) {
  .entete.js-nav .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 2.5rem; height: 2.5rem; padding: 0; cursor: pointer;
    border: 1px solid var(--ligne); border-radius: 8px; background: #fff;
  }
  .entete.js-nav .nav-toggle span { display: block; width: 1.15rem; height: 2px; margin: 0 auto; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .entete.js-nav.open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .entete.js-nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .entete.js-nav.open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .entete.js-nav .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .1rem;
    background: #fff; border-top: 1px solid var(--ligne); border-bottom: 1px solid var(--ligne);
    padding: .5rem 1.1rem 1rem; box-shadow: 0 14px 26px rgba(27,26,23,.10);
  }
  .entete.js-nav.open .nav { display: flex; }
  .entete.js-nav .nav a { padding: .7rem .2rem; font-size: 1rem; border-bottom: 1px solid var(--ligne); }
  .entete.js-nav .nav a:last-child { border-bottom: 0; }
  .entete.js-nav .nav a:not(.btn-nav)::after { display: none; }
  .entete.js-nav .nav .btn-nav { align-self: flex-start; margin-top: .6rem; border-bottom: 0; }
  .entete.js-nav .nav .lang { align-self: flex-start; margin-top: .4rem; border-bottom: 0; }
}
@media (max-width: 560px) {
  .hero .actions .btn, .appel .actions .btn { width: 100%; justify-content: center; }
  .galerie { grid-template-columns: repeat(2, 1fr); }
  .temps li { grid-template-columns: 1.6rem 1fr; }
  .nl form { flex-direction: column; }
  .pied .wrap { grid-template-columns: 1fr; }
}
