/* Palette et typographie du deck Hi Folks du 6 octobre (en attendant la charte officielle) */
:root {
  --encre: #1c2833;
  --texte: #4a5360;
  --accent: #2b6e8c;
  --accent-clair: #8fc1d6;
  --fond: #fbfaf7;
  --fond-2: #f5f3ee;
  --ligne: #d9d5cc;
  --carte: #ffffff;
  --alerte: #b5473a;
  --ok: #2f7d5b;
  --rayon: 10px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 400 16px/1.6 'Public Sans', system-ui, sans-serif;
}
h1, h2, h3 { font-family: 'Libre Baskerville', Georgia, serif; font-weight: 700; line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; font-family: 'Public Sans', sans-serif; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
.muted { color: var(--texte); }
.petit { font-size: .88rem; }

.barre {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--ligne); background: var(--fond);
  font-size: .9rem; color: var(--texte);
}
.barre strong { color: var(--encre); letter-spacing: .02em; }
.barre button { white-space: nowrap; background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }

main { max-width: 760px; margin: 0 auto; padding: 32px 16px 120px; }
.surtitre { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--accent); font-weight: 600; margin-bottom: 8px; }

.etapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0 8px; padding: 0; list-style: none; counter-reset: e; }
.etapes li { background: var(--fond-2); border-radius: var(--rayon); padding: 14px; font-size: .92rem; counter-increment: e; }
.etapes li::before { content: counter(e); display: block; font-family: 'Libre Baskerville', serif; font-size: 1.3rem; color: var(--accent); margin-bottom: 4px; }
@media (max-width: 600px) { .etapes { grid-template-columns: 1fr; } }

section.bloc { margin-top: 44px; }
.intro { color: var(--texte); }

.carte {
  background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon);
  padding: 18px; margin: 14px 0;
}
.carte.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.carte.inactive { opacity: .62; }
.carte .entete { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.carte .entete > div { flex: 1 1 280px; }
.carte h3 { margin-bottom: 4px; }
.carte .desc { margin: 0; font-size: .95rem; color: var(--texte); }
.piste { margin: 10px 0 0; font-size: .88rem; color: var(--accent); }
.piste::before { content: 'Piste IA · '; font-weight: 600; }
.details { margin-top: 16px; display: grid; gap: 14px; }
.details[hidden] { display: none; }

.bascule { display: inline-flex; border: 1px solid var(--ligne); border-radius: 999px; overflow: hidden; flex: 0 0 auto; }
.bascule button, .puces button {
  border: 0; background: var(--carte); padding: 8px 14px; font: 500 .88rem 'Public Sans', sans-serif; cursor: pointer; color: var(--encre); min-height: 38px;
}
.bascule button + button { border-left: 1px solid var(--ligne); }
.bascule button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puces button { border: 1px solid var(--ligne); border-radius: 999px; }
.puces button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.echelle button { width: 42px; padding: 8px 0; }

label, .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.aide { font-weight: 400; color: var(--texte); font-size: .85rem; display: block; margin-top: 2px; }
input[type="text"], input[type="email"], textarea {
  width: 100%; border: 1px solid var(--ligne); border-radius: 8px; background: #fff;
  padding: 10px 12px; font: 400 16px/1.5 'Public Sans', sans-serif; color: var(--encre);
}
textarea { min-height: 92px; resize: vertical; }
input:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.champ { margin-bottom: 18px; }
.requis::after { content: ' *'; color: var(--alerte); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  padding: 12px 22px; font: 600 1rem 'Public Sans', sans-serif; cursor: pointer; min-height: 46px;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn.secondaire { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.lien { background: none; color: var(--accent); padding: 8px 0; text-decoration: underline; min-height: 0; }

.voix { background: var(--encre); color: #fff; border-radius: 14px; padding: 22px; margin-top: 28px; }
.voix h2 { color: #fff; }
.voix p { color: #d9e3ea; }
.voix .ligne { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.voix .btn { background: var(--accent-clair); color: var(--encre); }
.voix .btn.secondaire { background: transparent; color: #fff; border-color: #fff; }
.etat { font-size: .92rem; color: #d9e3ea; display: inline-flex; align-items: center; gap: 8px; }
.point { width: 10px; height: 10px; border-radius: 50%; background: #8a97a3; display: inline-block; }
.point.direct { background: #6fd39b; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.resume { background: rgba(255, 255, 255, .08); border-radius: 8px; padding: 12px 14px; margin-top: 14px; font-size: .92rem; }
.chargement { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: tourne .8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

.pied {
  position: fixed; left: 0; right: 0; bottom: 0; background: rgba(251, 250, 247, .96);
  border-top: 1px solid var(--ligne); padding: 12px 16px; backdrop-filter: blur(6px);
}
.pied .dedans { max-width: 760px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sauve { font-size: .88rem; color: var(--texte); }
.message { margin-top: 12px; padding: 12px 14px; border-radius: 8px; font-size: .95rem; }
.message.erreur { background: #f6e3df; color: var(--alerte); }
.message.ok { background: #e1f0e8; color: var(--ok); }
.message[hidden] { display: none; }

.connexion { max-width: 460px; margin: 10vh auto 0; padding: 0 16px; }
.connexion .carte { padding: 26px; }

.credits { max-width: 760px; margin: 40px auto 0; padding: 0 16px; font-size: .82rem; color: var(--texte); }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--ligne); }
