/* ============================================================================
   DEVISCLAIR — Feuille de style du site (WAVE_1 / SITE 1)
   Identité : document de travail annoté. Papier, encre, annotation orange,
   surligneur. Volontairement distincte de BÂTIPACT (teal corporate),
   BRUT-STUDIO (brutalisme), HELIOS-ENERGY (énergie claire) et FIXIT HUB (urgence).
   Feuille vendorée : ce fichier appartient à ce site et n'est partagé avec aucun autre.
   ========================================================================= */

:root {
  --paper: #FBFAF7;
  --paper-alt: #F4F1EA;
  --card: #FFFFFF;
  --ink: #16202E;
  --ink-soft: #3D4A5C;
  --muted: #64707F;
  --accent: #D9480F;          /* annotation au stylo */
  --accent-soft: #FBE3D6;
  --highlight: #FFE9A8;       /* surligneur */
  --rule: #E4E0D8;
  --rule-strong: #CFC9BC;
  --ok: #1E6F50;
  --warn: #8A5A00;

  --font-title: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius: 4px;
  --radius-lg: 8px;
  --shadow: 0 1px 2px rgba(22, 32, 46, 0.06);
  --shadow-lg: 0 12px 28px -12px rgba(22, 32, 46, 0.22);
  --transition: 0.2s ease;
  --container: 1080px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.18;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
h3 { font-size: 1.16rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

/* --- Structure ----------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }
.section--alt { background: var(--paper-alt); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

.section-head { max-width: 660px; margin-bottom: 40px; }
.section-head p { color: var(--muted); margin-top: 12px; }

/* Le trait de marge : rappel du document annoté, motif récurrent du site. */
.rule-left { border-left: 3px solid var(--accent); padding-left: 20px; }

.mark {
  background: linear-gradient(transparent 58%, var(--highlight) 58%);
  padding: 0 2px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

/* --- En-tête ------------------------------------------------------------- */

header {
  height: var(--header-h);
  background: rgba(251, 250, 247, 0.96);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.logo {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.24rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  white-space: nowrap;
}

.logo em { font-style: normal; color: var(--accent); }

.nav {
  display: flex;
  gap: 30px;
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav a { color: var(--ink-soft); transition: color var(--transition); }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.header-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 8px 12px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--ink);
}

/* --- Boutons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.97rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #B93B0B; }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-outline { border-color: var(--rule-strong); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--ink); }

.btn-group { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* --- Bannière d'accueil -------------------------------------------------- */

.hero { padding: 84px 0 68px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero-lead { font-size: 1.13rem; color: var(--ink-soft); margin-top: 22px; max-width: 46ch; }

.hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
}

/* --- Cartes et listes ---------------------------------------------------- */

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.96rem; }

/* Points d'analyse numérotés — le cœur du contenu expert. */
.points { counter-reset: point; display: grid; gap: 4px; }

.point {
  counter-increment: point;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}

.point:first-child { border-top: 1px solid var(--rule); }

.point::before {
  content: counter(point, decimal-leading-zero);
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  padding-top: 2px;
}

.point h3 { margin-bottom: 6px; }
.point p { color: var(--muted); font-size: 0.97rem; }

.point-q {
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  background: var(--paper-alt);
  border-left: 2px solid var(--rule-strong);
  padding: 10px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.point-q strong { font-weight: 700; }

/* Étapes */
.steps { counter-reset: step; }
.step { counter-increment: step; }
.step::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 14px;
}

/* Encadrés */
.callout {
  border: 1px solid var(--rule-strong);
  border-left: 4px solid var(--accent);
  background: var(--card);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 22px 26px;
  margin: 32px 0;
}

.callout h3 { margin-bottom: 10px; }
.callout h2 { font-size: 1.16rem; margin-bottom: 10px; }
.callout p { color: var(--ink-soft); font-size: 0.97rem; }

.callout--limits { border-left-color: var(--warn); }

/* Cas types */
.case {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 28px;
}

.case-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--warn);
  background: #FDF3DC;
  border: 1px solid #EBD9A8;
  border-radius: var(--radius);
  padding: 4px 10px;
  margin-bottom: 16px;
}

.case h3 { margin-bottom: 12px; }
.case dl { margin: 18px 0 0; }
.case dt { font-weight: 700; font-size: 0.92rem; margin-top: 14px; }
.case dd { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }

/* --- Formulaire ---------------------------------------------------------- */

.form-card {
  background: var(--card);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-lg);
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 7px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  outline: none;
  transition: var(--transition);
}

.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

textarea.form-input { resize: vertical; min-height: 118px; }

.form-consent { display: flex; align-items: flex-start; gap: 11px; }
.form-consent input[type="checkbox"] { margin-top: 5px; flex-shrink: 0; }
.form-consent label { font-weight: 400; font-size: 0.89rem; line-height: 1.5; margin-bottom: 0; }
.form-consent a { text-decoration: underline; }

.form-hint { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }

.form-state {
  margin-top: 16px;
  padding: 12px 15px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

.form-state:empty { display: none; }
.form-state.loading { background: var(--paper-alt); color: var(--ink-soft); border: 1px solid var(--rule-strong); }
.form-state.success { background: #E9F5EF; color: var(--ok); border: 1px solid #A8D5BF; }
.form-state.error { background: #FDECE6; color: #9A2A0A; border: 1px solid #F0B49B; }

/* --- Visuels ------------------------------------------------------------- */

.visual img {
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
}

.visual--wide img { aspect-ratio: 16 / 9; }
.visual--tall img { aspect-ratio: 3 / 2; }

.visual-caption {
  display: block;
  margin-top: 9px;
  font-size: 0.79rem;
  line-height: 1.4;
  color: var(--muted);
}

/* --- Pied de page -------------------------------------------------------- */

footer {
  background: var(--ink);
  color: #C4CCD6;
  padding: 62px 0 30px;
  margin-top: 20px;
}

footer .logo { color: #fff; }
footer h3 { font-family: var(--font-title); color: #fff; font-size: 1rem; margin: 0 0 16px; }
footer a { color: #C4CCD6; transition: color var(--transition); }
footer a:hover { color: #fff; }
footer li { margin-bottom: 9px; font-size: 0.94rem; }
footer p { font-size: 0.94rem; }

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 46px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  font-size: 0.85rem;
}

.footer-bottom nav { display: flex; gap: 20px; flex-wrap: wrap; }

.pending {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

footer .pending { color: #FFB48C; }

/* --- Pages légales ------------------------------------------------------- */

.legal { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.legal h1 { font-size: clamp(1.8rem, 3.6vw, 2.4rem); margin-bottom: 10px; }
.legal-intro { color: var(--muted); margin-bottom: 40px; }
.legal-block { margin-bottom: 34px; }
.legal-block h2 { font-size: 1.16rem; margin-bottom: 12px; }
.legal-block ul { list-style: disc; margin: 10px 0 0 20px; }
.legal-block li { margin-bottom: 7px; }
.legal-block a { text-decoration: underline; }

.legal-warning {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  padding: 18px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: 14px;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .section { padding: 56px 0; }
  header .container { gap: 20px; }
  .nav { display: none; }
  .nav-toggle { display: inline-block; }
  .nav.is-open {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 24px;
  }
}

@media (max-width: 560px) {
  .header-cta { display: none; }
  .point { grid-template-columns: 34px 1fr; gap: 12px; }
  .form-card { padding: 24px; }
  .hero { padding: 56px 0 44px; }
}
