/* ToutRéno — palette tirée du chantier : gypse, ruban à mesurer, cordeau à tracer */
:root {
  --gypse: #eceee9;      /* fond, gris-blanc du panneau de gypse */
  --compose: #fbfbf8;    /* composé à joints, surfaces claires */
  --graphite: #1d2126;   /* crayon de charpentier */
  --cordeau: #1f4e9c;    /* bleu du cordeau à tracer */
  --ruban: #f6c61a;      /* jaune du ruban à mesurer */
  --urgence: #c8321f;    /* réservé aux urgences */
  --trait: #c9cdc6;
  --font: "Bricolage Grotesque", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--gypse);
  color: var(--graphite);
  font: 400 1.0625rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--cordeau); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* En-tête */
.saut { position: absolute; left: -9999px; }
.saut:focus { left: 12px; top: 12px; z-index: 30; background: var(--graphite); color: var(--compose); padding: 10px 14px; }
.barre { position: sticky; top: 0; z-index: 20; background: var(--gypse); border-bottom: 1px solid var(--trait); }
[id] { scroll-margin-top: 88px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: block; line-height: 0; }
.brand img { height: 40px; width: auto; }
.top nav { display: flex; align-items: center; gap: 22px; font-size: 0.95rem; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.top .lang { border: 1.5px solid var(--graphite); padding: 3px 10px; border-radius: 3px; font-weight: 600; }
.top .lang + .lang { margin-left: -12px; }
:lang(zh) .hero h1 { font-weight: 900; letter-spacing: -0.02em; line-height: 1.05; }
html:lang(zh-Hans) { --font: "Bricolage Grotesque", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; }
.top .lang .short { display: none; }
:lang(zh) h2 { letter-spacing: -0.01em; line-height: 1.15; }
.top .tel { font-weight: 700; white-space: nowrap; }

/* Héros */
.hero { padding: 40px 0 0; }
.hero h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2.9rem, 10.5vw, 8rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
}
.hero h1 span { display: block; }
.hero h1 span:nth-child(2) { padding-left: 0.55em; }
.hero h1 span:nth-child(3) { padding-left: 1.1em; color: var(--cordeau); }
.accroche { margin: 30px 0 0; max-width: 32em; font-weight: 700; font-size: 1.3rem; line-height: 1.35; letter-spacing: -0.01em; }
.hero .accroche + .hero-row { margin-top: 14px; }
.hero-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; margin: 36px 0 40px; }
.hero-row p { margin: 0; max-width: 34em; font-size: 1.2rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 14px 22px; border-radius: 4px; border: 2px solid var(--graphite);
  font: 700 1.05rem/1.2 var(--font); text-decoration: none; cursor: pointer; background: transparent; color: var(--graphite);
}
.btn.plein { background: var(--graphite); color: var(--compose); }
.btn.plein:hover { background: var(--cordeau); border-color: var(--cordeau); }
.btn:hover { background: var(--compose); }

/* Ruban à mesurer : le numéro de téléphone est écrit sur la lame */
.ruban {
  background-color: var(--ruban);
  background-image:
    repeating-linear-gradient(90deg, var(--graphite) 0 2px, transparent 2px 96px),
    repeating-linear-gradient(90deg, var(--graphite) 0 1px, transparent 1px 12px);
  background-size: auto 26px, auto 12px;
  background-repeat: repeat-x;
  background-position: 0 0, 0 0;
  border-top: 2px solid var(--graphite);
  border-bottom: 2px solid var(--graphite);
  overflow: hidden;
}
.ruban ol { display: flex; margin: 0; padding: 26px 0 8px; list-style: none; font-weight: 700; font-size: 1.15rem; }
.ruban li { flex: 0 0 96px; padding-left: 7px; line-height: 1; }
.ruban li.pied { color: var(--urgence); }

/* Sections */
section, section.wrap { padding-top: 84px; padding-bottom: 84px; }
h2 { margin: 0 0 28px; font-weight: 800; font-size: clamp(1.9rem, 4.4vw, 3.1rem); line-height: 1.02; letter-spacing: -0.03em; max-width: 16em; }
.intro { max-width: 38em; margin: -12px 0 32px; font-size: 1.1rem; }

/* Qu'est-ce qui est arrivé ? */
.choix { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.choix button {
  font: 600 1.1rem/1.2 var(--font); color: var(--graphite); background: var(--compose);
  border: 1.5px solid var(--graphite); border-radius: 999px; padding: 12px 20px; cursor: pointer;
}
.choix button:hover, .choix button[aria-pressed="true"] { background: var(--ruban); }

/* Services : une liste, pas des cartes */
.services { background: var(--compose); border-top: 2px solid var(--graphite); border-bottom: 2px solid var(--graphite); }
.services dl { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 56px; }
.services dl > div { padding: 20px 0; border-top: 1px solid var(--trait); }
.services dt { font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; }
.services dd { margin: 4px 0 0; max-width: 32em; }

/* Urgences */
.urgence { background: var(--urgence); color: #fff; padding: 56px 0; }
.urgence .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.urgence h2 { margin: 0 0 8px; }
.urgence p { margin: 0; max-width: 34em; font-size: 1.1rem; }
.urgence .gros { font-weight: 800; font-size: clamp(1.9rem, 5vw, 3.2rem); letter-spacing: -0.03em; text-decoration: none; white-space: nowrap; border-bottom: 4px solid #fff; }

/* Étapes : une vraie séquence, donc numérotée */
.etapes { counter-reset: e; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding: 0; margin: 0; list-style: none; }
.etapes li { counter-increment: e; border-top: 2px solid var(--graphite); padding-top: 14px; }
.etapes li::before { content: counter(e); display: block; font-weight: 800; font-size: 3.4rem; line-height: 1; color: var(--cordeau); margin-bottom: 10px; }
.etapes h3 { margin: 0 0 6px; font-size: 1.3rem; letter-spacing: -0.01em; }
.etapes p { margin: 0; }

/* Territoire */
section.territoire { padding-top: 0; }
.territoire p { font-weight: 800; font-size: clamp(1.9rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -0.04em; margin: 0; max-width: 14em; }
.territoire small { display: block; margin-top: 18px; font-size: 1.1rem; max-width: 36em; }

/* Soumission */
.soumission { background: var(--graphite); color: var(--compose); }
.soumission .grille { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; }
.soumission .tel-gros { display: inline-block; margin-top: 8px; font-weight: 800; font-size: 2rem; letter-spacing: -0.02em; color: var(--ruban); text-decoration: none; }
form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
form .large { grid-column: 1 / -1; }
label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
input, textarea {
  width: 100%; padding: 12px 14px; border-radius: 3px; border: 1.5px solid #5b626b;
  background: #262b31; color: var(--compose); font: 400 1.05rem/1.4 var(--font);
}
input[type="file"] { padding: 10px; }
textarea { min-height: 130px; resize: vertical; }
input:focus-visible, textarea:focus-visible { outline-color: var(--ruban); }
.soumission .btn.plein { background: var(--ruban); color: var(--graphite); border-color: var(--ruban); }
.soumission .btn.plein:hover { background: #fff; border-color: #fff; }
.aide { margin: 6px 0 0; font-size: 0.98rem; color: #c9ced6; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
button:disabled { opacity: 0.6; cursor: progress; }
.avis { margin: 0; padding: 12px 14px; border-left: 4px solid var(--ruban); background: #262b31; }
.avis[hidden] { display: none; }

/* Page introuvable */
.introuvable { padding-top: 72px; padding-bottom: 120px; }
.introuvable h1 { margin: 0 0 12px; font-weight: 800; font-size: clamp(5rem, 22vw, 14rem); line-height: 0.9; letter-spacing: -0.05em; color: var(--cordeau); }
.introuvable p { margin: 0 0 8px; font-size: 1.2rem; }

/* Barre d'actions sur téléphone */
.mobile-actions { display: none; }

/* Pied de page */
footer { padding: 36px 0 48px; font-size: 0.95rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 40px; }
footer p { margin: 0; }

@media (max-width: 760px) {
  body { padding-bottom: 68px; }
  .mobile-actions {
    display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    border-top: 2px solid var(--graphite); background: var(--compose);
  }
  .mobile-actions a { padding: 18px 8px; text-align: center; text-decoration: none; font-weight: 700; font-size: 1.05rem; }
  .mobile-actions a.plein { background: var(--ruban); }
  .top nav a.cache, .top nav a.tel { display: none; }
  .top nav { gap: 14px; }
  .top .lang .long { display: none; }
  .top .lang .short { display: inline; }
  section, section.wrap { padding-top: 60px; padding-bottom: 60px; }
  section.territoire { padding-top: 0; }
  .brand img { height: 32px; }
  .services dl, .etapes, .soumission .grille, form { grid-template-columns: 1fr; }
  .etapes { gap: 28px; }
  .hero h1 span:nth-child(2) { padding-left: 0.3em; }
  .hero h1 span:nth-child(3) { padding-left: 0.6em; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
