/* Maline Assurance — feuille de style unique du site.
   Les valeurs viennent de la charte « Maline Assurance » (Design System). */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bleu-maline: #006da4;
  --bleu-profond: #004f78;
  --encre: #0e2f44;
  --ardoise: #5c6b75;
  --gris-logo: #818f98;
  --brume: #eaf3f8;
  --ciel: #cfe3ef;
  --trait-champ: #7d93a2;
  --abricot: #f7b955;
  --abricot-fonce: #e9a23b;
  --blanc: #ffffff;
  --erreur: #b3261e;
  --succes: #2e7d4f;

  --font-titre: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-texte: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;

  --rayon-s: 8px;
  --rayon-m: 20px;
  --rayon-l: 28px;
  --rayon-plein: 999px;
  --ombre-flottante: 0 18px 40px rgba(14, 47, 68, 0.14);

  --largeur: 1200px;
  --gouttiere: 24px;
  --section: clamp(64px, 8vw, 104px);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-texte);
  font-size: 17px;
  line-height: 1.6;
  color: var(--encre);
  background: var(--blanc);
  -webkit-tap-highlight-color: rgba(0, 109, 164, 0.15);
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-titre);
  color: var(--encre);
  margin: 0;
  text-wrap: balance;
}
h1 { font-weight: 700; font-size: clamp(36px, 4.4vw, 54px); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-weight: 650; font-size: clamp(28px, 3vw, 36px); line-height: 1.15; letter-spacing: -0.012em; }
h3 { font-weight: 600; font-size: 22px; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }

a { color: var(--bleu-maline); text-underline-offset: 4px; transition: color .15s; }
a:hover { color: var(--bleu-profond); }

:focus-visible { outline: 3px solid var(--bleu-maline); outline-offset: 2px; }
.sur-sombre :focus-visible { outline-color: var(--blanc); }

[id] { scroll-margin-top: 24px; }

.conteneur { max-width: var(--largeur); margin-inline: auto; padding-inline: var(--gouttiere); }
.section { padding-block: var(--section); }
.fond-brume { background: var(--brume); }
.chapo { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.55; max-width: 34em; }
.secondaire { color: var(--ardoise); }
.intro { margin-top: 14px; max-width: 38em; color: var(--ardoise); }
.nowrap { white-space: nowrap; }

.visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Lien d'évitement */
.evitement {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--encre); color: var(--blanc); padding: 12px 18px; border-radius: var(--rayon-s);
  font-weight: 700; text-decoration: none;
}
.evitement:focus { top: 12px; color: var(--blanc); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 30px;
  border-radius: var(--rayon-plein); border: 2px solid transparent;
  font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer; touch-action: manipulation;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-principal { background: var(--abricot); color: var(--encre); }
.btn-principal:hover { background: var(--abricot-fonce); color: var(--encre); }
.btn-secondaire { background: transparent; color: var(--bleu-maline); border-color: var(--bleu-maline); }
.btn-secondaire:hover { background: var(--brume); color: var(--bleu-profond); border-color: var(--bleu-profond); }
.btn-blanc { background: var(--blanc); color: var(--bleu-maline); }
.btn-blanc:hover { background: var(--brume); color: var(--bleu-profond); }
.btn-petit { min-height: 44px; padding: 0 22px; }
.lien-fort { font-weight: 700; }

/* ---------- En-tête ---------- */
.entete { background: var(--blanc); border-bottom: 1px solid var(--ciel); }
.entete .conteneur {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 12px; position: relative;
}
.entete .logo { display: block; line-height: 0; flex: none; }
.entete .logo img { width: 120px; height: auto; }
.nav-principale ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px 28px; }
.nav-principale a { color: var(--encre); font-weight: 700; font-size: 16px; text-decoration: none; }
.nav-principale a:hover { color: var(--bleu-maline); }
.nav-principale a[aria-current="page"] { color: var(--bleu-maline); text-decoration: underline; text-decoration-thickness: 2px; }
.nav-principale .tel { color: var(--bleu-maline); white-space: nowrap; }
.nav-principale .btn { color: var(--bleu-maline); }

.bouton-menu {
  display: none; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  background: var(--blanc); color: var(--encre);
  border: 1.5px solid var(--trait-champ); border-radius: var(--rayon-plein);
  font: inherit; font-weight: 700; cursor: pointer; touch-action: manipulation;
}
.bouton-menu svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

@media (max-width: 960px) {
  .bouton-menu { display: inline-flex; }
  .nav-principale {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%; z-index: 5;
    background: var(--blanc); border-bottom: 1px solid var(--ciel);
    box-shadow: 0 12px 24px rgba(14, 47, 68, 0.08);
    padding: 8px var(--gouttiere) 24px;
  }
  .nav-principale.ouvert { display: block; }
  .nav-principale ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-principale li a:not(.btn) { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--ciel); font-size: 18px; }
  .nav-principale li:last-child { margin-top: 16px; }
  .nav-principale .btn { width: 100%; }
  .entete .logo img { width: 104px; }
}

/* Sans JavaScript, le menu reste visible sous le logo */
.no-js .bouton-menu { display: none; }
@media (max-width: 960px) {
  .no-js .nav-principale { display: block; position: static; box-shadow: none; border: 0; padding: 0; }
  .no-js .entete .conteneur { flex-wrap: wrap; }
}

/* ---------- Accueil : bandeau d'accroche ---------- */
.accroche .conteneur {
  display: flex; flex-wrap: wrap; align-items: center; gap: 48px 56px;
  padding-block: clamp(40px, 7vw, 104px) clamp(56px, 7vw, 112px);
}
.accroche-texte { flex: 1 1 420px; min-width: 0; max-width: 560px; }
.accroche h1 { font-size: clamp(40px, 5.2vw, 66px); line-height: 1.02; letter-spacing: -0.025em; }
.accroche .chapo { margin-top: 28px; }
.accroche .appel { margin-top: 24px; font-size: 16px; color: var(--ardoise); }

.arc-zone { flex: 1 1 420px; min-width: 0; display: flex; justify-content: center; }
.arc {
  position: relative; width: min(100%, 560px); aspect-ratio: 1 / 1;
  display: grid; place-items: center;
}
.arc::before, .arc::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  transform: rotate(10deg);
}
.arc::before {
  inset: 0;
  border: clamp(22px, 3.4vw, 40px) solid var(--bleu-maline);
  border-right-color: transparent; border-top-color: transparent;
}
.arc::after {
  inset: 9%;
  border: clamp(14px, 2vw, 22px) solid var(--ciel);
  border-left-color: transparent; border-bottom-color: transparent;
}

.accroche { overflow-x: clip; }
.selecteur {
  position: relative; z-index: 1;
  width: min(86%, 420px);
  background: var(--blanc); border-radius: var(--rayon-l); box-shadow: var(--ombre-flottante);
  padding: clamp(20px, 2.4vw, 30px);
}
.selecteur h2 { font-size: 22px; font-weight: 600; line-height: 1.25; letter-spacing: 0; margin-bottom: 16px; }
.selecteur fieldset { border: 0; margin: 0 0 18px; padding: 0; }
.selecteur .btn { width: 100%; }
.selecteur .note { margin-top: 10px; text-align: center; font-size: 14px; color: var(--ardoise); }

/* Pastilles (boutons radio) */
.pastilles { display: flex; flex-wrap: wrap; gap: 8px; }
.pastille { position: relative; display: inline-flex; }
.pastille input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;
}
.pastille span {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1.5px solid var(--trait-champ); border-radius: var(--rayon-plein);
  background: var(--blanc); color: var(--encre); font-weight: 700; font-size: 16px;
  transition: background-color .15s, border-color .15s, color .15s;
}
.pastille input:hover + span { border-color: var(--bleu-maline); }
.pastille input:checked + span { background: var(--bleu-maline); border-color: var(--bleu-maline); color: var(--blanc); }
.pastille input:focus-visible + span { outline: 3px solid var(--bleu-maline); outline-offset: 2px; }

@media (max-width: 600px) {
  .accroche { overflow: hidden; }
  .arc { aspect-ratio: auto; display: block; padding: 56px 0 40px; }
  .arc::before { inset: 0 auto auto -18%; width: 136%; height: auto; aspect-ratio: 1 / 1; border-width: 24px; }
  .arc::after { inset: 30px auto auto -6%; width: 112%; height: auto; aspect-ratio: 1 / 1; border-width: 12px; }
  .selecteur { width: 100%; }
}

/* ---------- Bandeau d'engagements ---------- */
.engagements { border-block: 1px solid var(--ciel); }
.engagements ul {
  list-style: none; margin-block: 0; padding-block: 28px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px 40px;
  font-size: 16px;
}
.engagements li { display: flex; gap: 12px; align-items: flex-start; }

.picto { flex: none; width: 24px; height: 24px; margin-top: 2px; stroke: var(--bleu-maline); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Liste des assurances ---------- */
.assurances {
  margin-top: 40px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); column-gap: 64px;
}
.assurance { border-top: 1px solid var(--ciel); padding: 28px 0 32px; display: flex; gap: 20px; }
.assurance .rond {
  flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--brume);
  display: flex; align-items: center; justify-content: center;
}
.assurance .rond svg { width: 28px; height: 28px; stroke: var(--bleu-maline); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.assurance p { margin: 8px 0 12px; }

/* ---------- Deux colonnes : texte + liste ---------- */
.deux-colonnes { display: flex; flex-wrap: wrap; gap: 40px 80px; }
.deux-colonnes > * { flex: 1 1 380px; min-width: 0; }
.deux-colonnes > :first-child { max-width: 520px; }
.deux-colonnes h2 + p { margin-top: 20px; }
.liste-blocs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.liste-blocs li { background: var(--blanc); border-radius: var(--rayon-m); padding: 18px 22px; display: flex; gap: 14px; align-items: flex-start; }
.liste-blocs .picto { stroke-width: 2.2; }

/* ---------- Étapes ---------- */
.etapes { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; }
.etapes .numero { font-family: var(--font-titre); font-weight: 700; font-size: 56px; line-height: 1; color: var(--bleu-maline); }
.etapes h3 { margin: 16px 0 8px; }

/* ---------- Questions fréquentes ---------- */
.faq { max-width: 820px; }
.faq h2 { margin-bottom: 24px; }
.faq details { border-bottom: 1px solid var(--ciel); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 44px; padding: 20px 0; font-weight: 700; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; font-size: 28px; line-height: 1; color: var(--bleu-maline);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; max-width: 40em; }

/* ---------- Bandeau final ---------- */
.bandeau-fin { padding: 0 var(--gouttiere) var(--section); }
.bandeau-fin .boite {
  max-width: calc(var(--largeur) - 2 * var(--gouttiere)); margin-inline: auto;
  background: var(--bleu-maline); color: var(--blanc); border-radius: var(--rayon-l);
  padding: clamp(32px, 5vw, 64px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
}
.bandeau-fin .texte { flex: 1 1 420px; min-width: 0; }
.bandeau-fin h2 { color: var(--blanc); font-weight: 700; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.1; }
.bandeau-fin p { margin-top: 14px; font-size: 18px; max-width: 32em; }
.bandeau-fin .actions { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.bandeau-fin .actions a:not(.btn) { color: var(--blanc); font-weight: 700; }

/* ---------- Pages intérieures ---------- */
.tete-page { background: var(--brume); overflow: hidden; }
.tete-page .conteneur { position: relative; padding-block: 28px clamp(56px, 7vw, 96px); }
.tete-page .conteneur::after {
  content: ""; position: absolute; right: -120px; top: -60px; width: 520px; height: 520px;
  border-radius: 50%; border: 36px solid var(--bleu-maline);
  border-left-color: transparent; border-bottom-color: transparent;
  transform: rotate(-20deg); pointer-events: none;
}
.tete-page .contenu { position: relative; z-index: 1; max-width: 640px; margin-top: clamp(32px, 5vw, 64px); }
.tete-page .chapo { margin-top: 20px; }
.tete-page .actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; }
.tete-page .actions a:not(.btn) { font-weight: 700; }
@media (max-width: 760px) {
  .tete-page .conteneur::after { right: -260px; top: -200px; opacity: .9; }
}

.fil-ariane { font-size: 14px; color: var(--ardoise); position: relative; z-index: 1; }
.fil-ariane ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fil-ariane li + li::before { content: "/"; margin-right: 6px; color: var(--ardoise); }

/* Tableau des formules */
.tableau-boite { margin-top: 36px; overflow-x: auto; border: 1px solid var(--ciel); border-radius: var(--rayon-m); overscroll-behavior-x: contain; }
.tableau { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 16px; }
.tableau thead tr { background: var(--brume); }
.tableau th, .tableau td { padding: 16px; border-top: 1px solid var(--ciel); }
.tableau thead th { border-top: 0; padding-block: 18px; font-family: var(--font-titre); font-size: 19px; font-weight: 600; }
.tableau th[scope="row"], .tableau thead th:first-child { text-align: left; padding-left: 22px; font-weight: 400; }
.tableau thead th:first-child { font-family: var(--font-texte); font-size: 16px; font-weight: 700; }
.tableau td { text-align: center; }
.coche { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--bleu-maline); align-items: center; justify-content: center; vertical-align: middle; }
.coche svg { width: 16px; height: 16px; stroke: var(--blanc); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.non { color: var(--ardoise); }
.option { font-size: 14px; color: var(--ardoise); font-weight: 700; }

/* Texte long (cabinet, mentions) */
.prose { max-width: 720px; }
.prose h2 { margin-top: 48px; font-size: clamp(24px, 2.4vw, 30px); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin-top: 16px; }
.prose ul { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.a-completer { background: #fff4dc; border-radius: 4px; padding: 0 4px; }

/* ---------- Formulaire de devis ---------- */
.page-devis { background: var(--brume); }
.devis .conteneur { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-start; padding-block: clamp(40px, 6vw, 80px); }
.devis .carte { flex: 999 1 560px; min-width: 0; background: var(--blanc); border-radius: var(--rayon-l); padding: clamp(24px, 4vw, 48px); }
.devis aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.devis h1 { font-size: clamp(32px, 3.6vw, 44px); line-height: 1.08; }
.devis .intro-form { margin-top: 12px; color: var(--ardoise); }
.formulaire { margin-top: 32px; display: flex; flex-direction: column; gap: 22px; }
.formulaire fieldset { border: 0; margin: 0; padding: 0; }
.formulaire legend, .formulaire .libelle { display: block; font-weight: 700; font-size: 15px; margin-bottom: 8px; padding: 0; }
.formulaire legend { margin-bottom: 10px; }
.grille-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 22px; }
.champ input, .champ select, .champ textarea {
  width: 100%; font: inherit; color: var(--encre);
  padding: 12px 14px; border: 1.5px solid var(--trait-champ); border-radius: var(--rayon-s);
  background-color: var(--blanc);
  transition: border-color .15s;
}
.champ textarea { resize: vertical; min-height: 110px; }
.champ input:focus-visible, .champ select:focus-visible, .champ textarea:focus-visible { border-color: var(--bleu-maline); }
.champ ::placeholder { color: var(--ardoise); opacity: 1; }
.champ .aide { margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--ardoise); }
.champ .erreur-msg { margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--erreur); }
.champ .erreur-msg:empty { display: none; }
.champ.en-erreur input, .champ.en-erreur textarea { border-color: var(--erreur); border-width: 2px; }
.facultatif { font-weight: 400; color: var(--ardoise); }
.consentement { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; cursor: pointer; }
.consentement input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--bleu-maline); }
.formulaire button[type="submit"] { align-self: flex-start; }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.message-envoi { margin-top: 4px; font-weight: 700; }
.message-envoi.erreur { color: var(--erreur); }

.encadre { background: var(--blanc); border-radius: var(--rayon-l); padding: 28px; }
.encadre h2 { font-size: 22px; font-weight: 600; line-height: 1.25; margin-bottom: 16px; letter-spacing: 0; }
.encadre ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.encadre-sombre { background: var(--encre); color: var(--blanc); }
.encadre-sombre .gros-tel { display: inline-block; margin-top: 8px; color: var(--blanc); font-family: var(--font-titre); font-weight: 700; font-size: 28px; text-decoration: none; }
.encadre-sombre .gros-tel:hover { text-decoration: underline; color: var(--blanc); }
.encadre-sombre .petit { margin-top: 8px; color: var(--ciel); font-size: 15px; }

.confirmation .rond-ok { width: 64px; height: 64px; border-radius: 50%; background: var(--succes); display: flex; align-items: center; justify-content: center; }
.confirmation .rond-ok svg { width: 32px; height: 32px; stroke: var(--blanc); fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.confirmation h1 { margin-top: 24px; }
.confirmation p { margin-top: 14px; max-width: 34em; }

/* ---------- Pied de page ---------- */
.pied { background: var(--encre); color: var(--blanc); font-size: 15px; }
.pied .colonnes { display: flex; flex-wrap: wrap; gap: 40px 64px; padding-block: 64px 40px; }
.pied .colonnes > * { flex: 1 1 180px; }
.pied .marque { flex-basis: 220px; }
.pied .marque img { width: 170px; height: auto; }
.pied h2 { font-family: var(--font-texte); font-size: 15px; font-weight: 700; color: var(--ciel); margin-bottom: 14px; letter-spacing: 0; }
.pied ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pied a { color: var(--blanc); text-decoration: none; }
.pied a:hover { color: var(--blanc); text-decoration: underline; }
.pied address { font-style: normal; line-height: 1.8; }
.pied .legal { border-top: 1px solid #27506a; padding-block: 20px 32px; font-size: 14px; color: var(--ciel); }
.pied .legal p + p { margin-top: 6px; }
.a-completer-sombre { background: #27506a; border-radius: 4px; padding: 0 4px; }
@media (max-width: 600px) {
  .formulaire button[type="submit"] { align-self: stretch; }
}
.pied .legal a { text-decoration: underline; }

/* Pages juridiques */
.sommaire { margin-top: 24px; padding: 20px 24px; background: var(--brume); border-radius: var(--rayon-m); }
.prose .sommaire h2 { margin: 0 0 8px; font-family: var(--font-texte); font-size: 15px; font-weight: 700; letter-spacing: 0; }
.sommaire ol { margin: 0; padding-left: 22px; columns: 2 240px; column-gap: 32px; }
.sommaire li + li { margin-top: 4px; }
.fiche { margin: 16px 0 0; border-top: 1px solid var(--ciel); }
.fiche > div { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 4px 24px; padding: 12px 0; border-bottom: 1px solid var(--ciel); }
.fiche dt { color: var(--ardoise); }
.fiche dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .fiche > div { grid-template-columns: 1fr; } }
.encart { padding: 16px 20px; background: var(--brume); border-radius: var(--rayon-m); }
