/* Atelier de flash — direction artistique de rickrecorder.com : papier, encre, aplats lime,
   Poppins + notes manuscrites Caveat, boutons pilule à LED, bord de carnet déchiré. */
:root {
  --ink: #0C0C0D;
  --soft: #17171A;
  --paper: #F6F5F1;
  --paper2: #ECECE6;
  --white: #FDFDFB;
  --lime: #D6FF4A;
  --lime-photo: #D4EE31;
  --muted: #6A6A64;
  --line: rgba(12, 12, 13, .12);
  --ok: #1F7A3A;
  --warn: #A85C00;
  --bad: #D2382D;

  --display: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --script: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 18px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--display); overflow-x: hidden; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2 { margin: 0; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
code { font-family: var(--mono); font-size: .86em; background: var(--paper2); padding: .1em .4em; border-radius: 6px; }

.wrap {
  width: 100%; max-width: 860px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 760px) { .wrap { padding-left: 32px; padding-right: 32px; } }

.kicker { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(12,12,13,.62); }
.script { font-family: var(--script); font-weight: 700; }
.hl {
  background: linear-gradient(transparent 58%, var(--lime) 58%, var(--lime) 92%, transparent 92%) no-repeat;
  padding-inline: .06em;
}

/* ---------- En-tête ---------- */
.hero { position: relative; background: var(--lime-photo); padding: calc(28px + env(safe-area-inset-top, 0px)) 0 0; }
.hero__contenu { padding-bottom: clamp(56px, 8vw, 88px); }
.logo { height: 22px; width: auto; display: block; margin-bottom: clamp(36px, 6vw, 64px); }
.hero h1 {
  margin-top: 10px; font-size: clamp(38px, 6.4vw, 68px); font-weight: 800; letter-spacing: -.035em; line-height: 1;
}
.hero__note {
  display: block; margin-top: 6px; font-size: .62em; letter-spacing: 0; line-height: 1.05;
  transform: rotate(-2deg); transform-origin: left;
}
.hero__chapo { margin-top: 18px; font-size: clamp(17px, 1.8vw, 20px); font-weight: 500; max-width: 34ch; }
.pas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 30px 0 0; padding: 0; list-style: none; font-weight: 700; font-size: 15px; }
.pas li { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 999px; background: rgba(12,12,13,.07); }
.pas li.pas__fleche { padding: 0; background: none; font-size: 18px; opacity: .55; }
.pas i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--lime); font-style: normal; font-size: 12px; }
.torn { display: block; width: 100%; height: clamp(26px, 3.4vw, 46px); margin-bottom: -1px; }
.torn path { fill: var(--paper); }

/* ---------- Contenu ---------- */
.page { padding-top: clamp(24px, 4vw, 40px); padding-bottom: clamp(60px, 8vw, 100px); }

.carte {
  background: var(--white); border-radius: var(--radius); padding: clamp(20px, 3.4vw, 34px);
  margin-bottom: 22px; box-shadow: 0 1px 0 var(--line), 0 14px 34px rgba(12,12,13,.06);
}
.carte p { margin-bottom: 12px; max-width: 62ch; }
.carte__tete { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.carte__tete h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.carte__sous-titre { margin: 4px 0 0 !important; color: var(--muted); font-size: 14px; }
.numero {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: var(--lime); font-weight: 800; font-size: 18px;
}

.pli { margin: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pli > summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; font-weight: 700;
}
.pli > summary::-webkit-details-marker { display: none; }
.pli > summary::after, .faq summary::after {
  content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--paper2); font-weight: 600; font-size: 19px; transition: transform .25s, background .25s;
}
.pli[open] > summary::after, .faq details[open] summary::after { transform: rotate(45deg); background: var(--lime); }
.pli__corps { padding-bottom: 16px; }
.pli--journal { border-bottom: 0; margin-bottom: 0; }

.cablage { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 15px; }
.cablage th, .cablage td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
.cablage th { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cablage td:first-child, .cablage td:nth-child(2) { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.cablage td:last-child { color: var(--muted); font-size: 14px; }

.notes { margin: 0; padding-left: 20px; color: #3E3E3A; font-size: 15px; }
.notes li { margin-bottom: 6px; }

.rangee { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin: 18px 0 10px; }

/* ---------- Boutons (ceux du site) ---------- */
.btn {
  --b-bg: var(--ink); --b-fg: var(--white);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 2px solid var(--b-bg);
  background: var(--b-bg); color: var(--b-fg); text-decoration: none; cursor: pointer;
  font-weight: 700; font-size: 15px; white-space: nowrap; transition: transform .2s ease, box-shadow .2s ease;
}
.btn .led { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .35; flex: none; }
.btn:hover:not(:disabled) { box-shadow: 0 8px 22px rgba(12,12,13,.18); animation: taptap .42s ease 1; }
.btn:hover:not(:disabled) .led { animation: ledblink .6s steps(1) 1; opacity: 1; }
.btn--lime { --b-bg: var(--lime); --b-fg: var(--ink); }
.btn--lime .led { background: var(--ink); }
.btn--ink .led { background: var(--lime); opacity: 1; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--danger { --b-bg: var(--bad); --b-fg: var(--white); }
.btn:disabled { opacity: .38; cursor: not-allowed; }
@keyframes taptap {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-3px) rotate(-.6deg); }
  30% { transform: translateX(3px) rotate(.6deg); }
  50% { transform: translateX(-2px); }
  65% { transform: translateX(2px); }
}
@keyframes ledblink { 0% { opacity: 1; } 25% { opacity: .2; } 50% { opacity: 1; } 75% { opacity: .2; } }

.note-main { font-size: 24px; color: var(--muted); transform: rotate(-3deg); }

.case { display: inline-flex; gap: 10px; align-items: center; font-size: 15px; font-weight: 500; cursor: pointer; }
.case input { width: 20px; height: 20px; accent-color: var(--ink); }

.etat-sonde { margin: 0 !important; font-size: 14px; color: var(--muted); }
.etat-sonde.est-ok { color: var(--ok); font-weight: 600; }
.etat-sonde.est-erreur { color: var(--bad); font-weight: 600; }

.confirmation { margin: 16px 0; padding: 18px; border-radius: 14px; border: 2px solid var(--bad); background: #FFF4F2; }
.confirmation p { margin: 0; }

.diagnostic {
  display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px;
  margin: 18px 0; padding: 16px 18px; border-radius: 14px; background: var(--paper); font-size: 15px;
}
.diagnostic dt { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding-top: 2px; }
.diagnostic dd { margin: 0; font-family: var(--mono); font-size: 14px; }
.diagnostic .est-attention { color: var(--warn); }
.diagnostic .est-ok { color: var(--ok); }

.suivi { margin: 20px 0; }
.etapes { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.etapes li { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.etapes li::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(12,12,13,.25); }
.etapes li.est-en-cours { color: var(--ink); font-weight: 700; }
.etapes li.est-en-cours::before { border-color: var(--ink); background: var(--lime); box-shadow: 0 0 10px 2px rgba(214,255,74,.9); animation: navDot 1.2s ease-in-out infinite; }
.etapes li.est-fait { color: var(--ink); }
.etapes li.est-fait::before { border-color: var(--ink); background: var(--ink); }
.etapes li.est-echec { color: var(--bad); font-weight: 700; }
.etapes li.est-echec::before { border-color: var(--bad); background: var(--bad); }
@keyframes navDot { 50% { opacity: .35; } }

.barre { height: 10px; border-radius: 999px; background: var(--paper2); overflow: hidden; }
.barre__plein { height: 100%; width: 0; background: var(--ink); border-radius: 999px; transition: width .2s linear; }
.barre__texte { margin: 8px 0 0 !important; font: 13px var(--mono); color: var(--muted); }

.encart { margin: 18px 0; padding: 16px 18px; border-radius: 14px; background: var(--paper); }
.encart p { margin: 0 0 6px; }
.encart p:last-child { margin: 0; }
.encart--ok { background: var(--lime); }
.encart--alerte { background: #FFF4F2; border: 2px solid var(--bad); }
main > .encart--alerte { margin: 0 0 22px; }

.journal {
  max-height: 260px; overflow: auto; margin: 0 0 4px; padding: 14px; border-radius: 12px;
  background: var(--ink); color: rgba(253,253,251,.82); font: 12.5px/1.55 var(--mono); white-space: pre-wrap;
}

/* ---------- Autres cas (FAQ du site) ---------- */
.faq { margin-top: clamp(30px, 5vw, 50px); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; font-weight: 700; font-size: clamp(17px, 1.6vw, 19px);
}
.faq summary::-webkit-details-marker { display: none; }
.faq__corps { padding: 0 48px 22px 0; color: #3E3E3A; font-size: 16px; }
.faq__corps p { max-width: 60ch; margin-bottom: 10px; }

/* ---------- Pied ---------- */
.pied { background: var(--ink); color: var(--white); padding: clamp(50px, 7vw, 80px) 0 calc(34px + env(safe-area-inset-bottom, 0px)); }
.pied__logo { height: 26px; width: auto; filter: invert(1); display: block; }
.pied__think { font-family: var(--script); font-weight: 700; font-size: clamp(40px, 5vw, 60px); color: var(--lime); line-height: 1; margin-top: 16px; transform: rotate(-3deg); transform-origin: left; }
.pied__texte { margin-top: 22px; color: rgba(253,253,251,.6); font-size: 14px; max-width: 60ch; }
.pied code { background: var(--soft); color: rgba(253,253,251,.8); }

@media (max-width: 560px) {
  .pas li.pas__fleche { display: none; }
  .rangee .btn { width: 100%; }
  .diagnostic { grid-template-columns: 1fr; gap: 2px; }
  .diagnostic dd { margin-bottom: 8px; }
  .faq__corps { padding-right: 0; }
  .cablage td:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .btn:hover:not(:disabled), .btn:hover:not(:disabled) .led, .etapes li.est-en-cours::before { animation: none; }
}
