/* Capsule Repair — feuille de style */

@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson";
  src: url("../fonts/atkinson-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson";
  src: url("../fonts/atkinson-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson";
  src: url("../fonts/atkinson-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --encre: #1e1b4b;
  --encre-douce: #4a4a6a;
  --papier: #f6f6fc;
  --blanc: #ffffff;
  --cobalt: #5446d1;
  --cobalt-fonce: #3f32b0;
  --ciel: #ecebfe;
  --ligne: #dcdbea;
  --vert: #17915a;

  --display: "Bricolage", "Segoe UI", system-ui, sans-serif;
  --texte: "Atkinson", "Segoe UI", system-ui, sans-serif;

  --mesure: 68ch;
  --large: 1180px;
  --gouttiere: clamp(1.25rem, 4vw, 2.5rem);
  --rayon: 10px;
}

*,
*::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 { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--encre);
  background: var(--blanc);
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); font-weight: 760; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 720; }
h3 { font-size: 1.25rem; font-weight: 680; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0 0 1em; max-width: var(--mesure); }
a { color: var(--cobalt); text-underline-offset: 0.18em; }
a:hover { color: var(--cobalt-fonce); }

:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.saut {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--encre); color: var(--blanc);
  padding: 0.6rem 1rem; border-radius: 6px; z-index: 50;
}
.saut:focus { top: 1rem; }

.conteneur {
  width: 100%;
  max-width: var(--large);
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}

/* ---------- En-tête ---------- */

.entete {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--ligne);
}
.entete .conteneur {
  display: flex; align-items: center; gap: 2rem;
  min-height: 72px;
}
.entete .marque img { height: 46px; width: auto; }
.nav { margin-left: auto; }
.nav ul {
  display: flex; gap: 0.25rem;
  list-style: none; margin: 0; padding: 0;
}
.nav a {
  display: block;
  padding: 0.5rem 0.8rem;
  color: var(--encre);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  border-radius: 6px;
}
.nav a:hover { background: var(--papier); color: var(--encre); }
.nav a[aria-current="page"] { color: var(--cobalt); }

.tel-entete {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  background: var(--encre); color: var(--blanc);
  font-weight: 700; text-decoration: none; white-space: nowrap;
}
.tel-entete:hover { background: var(--cobalt); color: var(--blanc); }
.tel-entete svg { width: 18px; height: 18px; }

.menu-bouton {
  display: none;
  margin-left: auto;
  background: none; border: 1px solid var(--ligne);
  border-radius: 8px; padding: 0.5rem 0.8rem;
  font: inherit; font-weight: 700; color: var(--encre);
  cursor: pointer;
}

@media (max-width: 900px) {
  .menu-bouton { display: inline-flex; }
  .tel-entete { display: none; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--blanc);
    border-bottom: 1px solid var(--ligne);
    display: none;
  }
  .nav.ouvert { display: block; }
  .nav ul { flex-direction: column; padding: 0.5rem var(--gouttiere) 1rem; }
  .nav a { padding: 0.85rem 0.5rem; font-size: 1.1rem; }
}

/* ---------- Boutons ---------- */

.boutons { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.3em;
  min-height: 50px;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-family: var(--texte); font-weight: 700; font-size: 1.02rem;
  text-decoration: none;
  border: 2px solid var(--cobalt);
  background: var(--cobalt); color: var(--blanc);
  cursor: pointer;
}
.bouton:hover { background: var(--cobalt-fonce); border-color: var(--cobalt-fonce); color: var(--blanc); }
.bouton.secondaire { background: transparent; color: var(--encre); border-color: var(--encre); }
.bouton.secondaire:hover { background: var(--encre); color: var(--blanc); }
.sur-fonce .bouton.secondaire { color: var(--blanc); border-color: rgba(255,255,255,0.6); }
.sur-fonce .bouton.secondaire:hover { background: var(--blanc); color: var(--encre); }

/* ---------- Accueil : en-tête de page ---------- */

.ouverture {
  padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3rem, 7vw, 5.5rem);
  background:
    radial-gradient(circle at 1px 1px, #cfcde6 1px, transparent 0) 0 0 / 22px 22px,
    var(--papier);
  border-bottom: 1px solid var(--ligne);
}
.ouverture .conteneur {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.ouverture h1 { max-width: 13ch; }
.chapo {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  color: var(--encre-douce);
  max-width: 46ch;
  margin-bottom: 1.8rem;
}

/* La capsule téléphone : l'élément signature */
.capsule {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
  border-radius: 999px;
  border: 3px solid var(--encre);
  background: var(--blanc);
  text-decoration: none;
  color: var(--encre);
  overflow: hidden;
  box-shadow: 0 18px 40px -22px rgba(30, 27, 75, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.capsule:hover { color: var(--encre); transform: translateY(-2px); box-shadow: 0 24px 46px -22px rgba(30, 27, 75, 0.55); }
.capsule-moitie {
  display: grid; place-items: center;
  background: linear-gradient(140deg, #a98be8 0%, #6f7fe6 55%, #6aa8f2 100%);
  padding-inline: clamp(1.4rem, 3vw, 2.2rem) clamp(1.1rem, 2.4vw, 1.7rem);
  border-right: 3px solid var(--encre);
}
.capsule-moitie svg { width: clamp(30px, 3.4vw, 42px); height: clamp(30px, 3.4vw, 42px); max-width: none; flex: none; color: var(--blanc); }
.capsule-texte {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(1rem, 2.2vw, 1.5rem) clamp(1.4rem, 3vw, 2.4rem) clamp(1rem, 2.2vw, 1.5rem) clamp(1rem, 2vw, 1.6rem);
}
.capsule-dispo {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.98rem; font-weight: 700; color: var(--encre-douce);
}
.voyant {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--vert);
  box-shadow: 0 0 0 0 rgba(23, 145, 90, 0.5);
  animation: voyant 2.4s ease-out infinite;
}
@keyframes voyant {
  0% { box-shadow: 0 0 0 0 rgba(23, 145, 90, 0.45); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(23, 145, 90, 0); }
}
.capsule-numero {
  font-family: var(--display);
  font-weight: 760;
  font-size: clamp(1.8rem, 3.2vw, 2.75rem);
  letter-spacing: -0.015em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sous-capsule {
  margin: 1rem 0 0 1.6rem;
  font-size: 0.98rem;
  color: var(--encre-douce);
}

@media (max-width: 860px) {
  .ouverture .conteneur { grid-template-columns: 1fr; }
  .ouverture-capsule { order: -1; }
  .ouverture h1 { max-width: 16ch; }
}
@media (max-width: 420px) {
  .capsule-moitie { padding-inline: 1.1rem 0.9rem; }
  .capsule-texte { padding-inline: 0.9rem 1.2rem; }
  .capsule-numero { font-size: 1.65rem; }
  .sous-capsule { margin-left: 0.5rem; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section.papier { background: var(--papier); }
.section.ciel { background: var(--ciel); }
.num { font-family: var(--display); font-weight: inherit; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.section.fonce { background: var(--encre); color: var(--blanc); }
.section.fonce p { color: #cfcde3; }
.section.fonce a:not(.bouton) { color: #c9c1ff; }

.tete-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem 4rem;
  align-items: end;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.tete-section h2 { margin: 0; }
.tete-section p { margin: 0; color: var(--encre-douce); }
.section.fonce .tete-section p { color: #cfcde3; }
@media (max-width: 760px) { .tete-section { grid-template-columns: 1fr; } }

/* Liste des appareils */
.appareils {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 4rem;
  border-top: 1px solid var(--ligne);
}
.appareils li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.4rem 1.1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--ligne);
}
.appareils svg { width: 34px; height: 34px; color: var(--cobalt); margin-top: 0.15rem; }
.appareils h3 { margin: 0 0 0.25rem; }
.appareils p { margin: 0; color: var(--encre-douce); }
@media (max-width: 760px) { .appareils { grid-template-columns: 1fr; } }

.lien-suite { margin-top: 2rem; font-weight: 700; }

/* Colonnes de texte */
.colonnes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}
.colonnes > div { border-top: 3px solid var(--cobalt); padding-top: 1.25rem; }
.section.fonce .colonnes > div { border-top-color: #a99cf2; }
.colonnes p { margin: 0; }
@media (max-width: 860px) { .colonnes { grid-template-columns: 1fr; gap: 2rem; } }

/* Étapes : vraie séquence */
.etapes {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  counter-reset: etape;
}
.etapes li { counter-increment: etape; position: relative; padding-top: 3.6rem; }
.etapes li::before {
  content: counter(etape);
  position: absolute; top: 0; left: 0;
  width: 2.6rem; height: 2.6rem;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 2px solid var(--encre);
  font-family: var(--display); font-weight: 760; font-size: 1.15rem;
}
.etapes li:not(:last-child)::after {
  content: "";
  position: absolute; top: 1.3rem; left: 3.4rem; right: -1.7rem;
  border-top: 2px dashed var(--ligne);
}
.etapes p { margin: 0; color: var(--encre-douce); }
@media (max-width: 760px) {
  .etapes { grid-template-columns: 1fr; gap: 2rem; }
  .etapes li:not(:last-child)::after { display: none; }
}

/* Bloc web */
.bloc-web {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.fenetre {
  border: 2px solid var(--encre);
  border-radius: 14px;
  background: var(--blanc);
  overflow: hidden;
}
.fenetre-barre {
  display: flex; align-items: center; gap: 6px;
  padding: 0.6rem 0.9rem;
  border-bottom: 2px solid var(--encre);
  background: var(--papier);
}
.fenetre-barre span { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--encre); }
.fenetre-barre code {
  margin-left: 0.6rem;
  font-family: var(--texte); font-size: 0.9rem; color: var(--encre-douce);
  background: var(--blanc); border: 1px solid var(--ligne); border-radius: 999px;
  padding: 0.1rem 0.8rem;
}
.fenetre-corps { padding: 1.5rem; display: grid; gap: 0.75rem; }
.fenetre-corps i { display: block; height: 12px; border-radius: 6px; background: var(--ligne); }
.fenetre-corps i.titre { height: 22px; width: 70%; background: var(--encre); }
.fenetre-corps i.court { width: 55%; }
.fenetre-corps i.pastille { height: 34px; width: 40%; border-radius: 999px; background: var(--cobalt); margin-top: 0.5rem; }
@media (max-width: 860px) { .bloc-web { grid-template-columns: 1fr; } }

/* Appel final */
.appel {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 2rem;
}
.appel h2 { margin-bottom: 0.3rem; }
.appel p { margin: 0; }

/* ---------- Pages intérieures ---------- */

.entete-page {
  padding-block: clamp(3rem, 7vw, 5rem) clamp(2.5rem, 5vw, 3.5rem);
  background: var(--papier);
  border-bottom: 1px solid var(--ligne);
}
.entete-page h1 { font-size: clamp(2.2rem, 4.8vw, 3.5rem); max-width: 20ch; }
.entete-page .chapo { margin-bottom: 1.5rem; }
.fil {
  font-size: 0.95rem; margin-bottom: 1.25rem; color: var(--encre-douce);
}
.fil a { color: var(--encre-douce); }

.detail {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1rem 4rem;
  padding-block: 2.25rem;
  border-top: 1px solid var(--ligne);
}
.detail:last-child { border-bottom: 1px solid var(--ligne); }
.detail-titre { display: flex; gap: 0.9rem; align-items: flex-start; }
.detail-titre svg { width: 30px; height: 30px; color: var(--cobalt); flex: none; margin-top: 0.1rem; }
.detail h2 { font-size: 1.45rem; margin: 0; }
.detail ul { margin: 0 0 1rem; padding-left: 1.2rem; max-width: var(--mesure); }
.detail li { margin-bottom: 0.35rem; }
.detail li::marker { color: var(--cobalt); }
.detail > div > p:last-child, .detail > div > ul:last-child { margin-bottom: 0; }
@media (max-width: 760px) { .detail { grid-template-columns: 1fr; } }

.faq { max-width: 820px; }
.faq details {
  border-top: 1px solid var(--ligne);
  padding: 1.1rem 0;
}
.faq details:last-child { border-bottom: 1px solid var(--ligne); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem;
  font-family: var(--display); font-weight: 680; font-size: 1.15rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-weight: 500; font-size: 1.5rem; line-height: 1;
  color: var(--cobalt); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0.75rem 0 0; color: var(--encre-douce); }

.texte-long { max-width: 760px; }
.texte-long h2 { font-size: 1.5rem; margin-top: 2.5rem; }
.texte-long h2:first-child { margin-top: 0; }
.texte-long ul { padding-left: 1.2rem; }
.a-completer {
  background: #fff3c4; border: 1px dashed #b8860b; border-radius: 4px;
  padding: 0 0.3rem;
}

/* ---------- Contact ---------- */

.contact-grille {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 900px) { .contact-grille { grid-template-columns: 1fr; } }

.coordonnees { display: grid; gap: 1.75rem; }
.coordonnees h2 { font-size: 1.15rem; margin: 0 0 0.3rem; }
.coordonnees p { margin: 0; }
.coordonnees .gros {
  font-family: var(--display); font-weight: 740; font-size: 1.8rem;
  text-decoration: none; color: var(--encre);
}
.coordonnees .gros:hover { color: var(--cobalt); }

.formulaire {
  background: var(--blanc);
  border: 2px solid var(--encre);
  border-radius: 16px;
  padding: clamp(1.4rem, 3vw, 2.4rem);
}
.formulaire h2 { font-size: 1.6rem; }
fieldset { border: 0; margin: 0 0 1.5rem; padding: 0; }
legend { font-weight: 700; margin-bottom: 0.6rem; padding: 0; }
.choix { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choix label {
  position: relative;
  display: inline-flex; align-items: center;
  padding: 0.55rem 1.1rem;
  border: 2px solid var(--ligne); border-radius: 999px;
  cursor: pointer; font-weight: 700;
}
.choix input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choix label:has(input:checked) { border-color: var(--cobalt); background: var(--ciel); color: var(--cobalt-fonce); }
.choix label:has(input:focus-visible) { outline: 3px solid var(--cobalt); outline-offset: 2px; }

.champs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; }
.champ { display: grid; gap: 0.35rem; }
.champ.plein { grid-column: 1 / -1; }
.champ label { font-weight: 700; }
.champ .aide { font-size: 0.92rem; color: var(--encre-douce); font-weight: 400; }
.champ input, .champ select, .champ textarea {
  width: 100%;
  font: inherit; color: var(--encre);
  padding: 0.75rem 0.9rem;
  border: 2px solid var(--ligne); border-radius: var(--rayon);
  background: var(--blanc);
}
.champ textarea { min-height: 140px; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus {
  outline: none; border-color: var(--cobalt);
  box-shadow: 0 0 0 3px var(--ciel);
}
.champ input[aria-invalid="true"], .champ textarea[aria-invalid="true"] { border-color: #c0352b; }
.erreur-champ { color: #b02a20; font-size: 0.92rem; min-height: 0; }
@media (max-width: 600px) { .champs { grid-template-columns: 1fr; } }

.bloc-rdv[hidden] { display: none; }
.pot-de-miel { position: absolute; left: -9999px; }

.mention-form { font-size: 0.92rem; color: var(--encre-douce); margin: 1.25rem 0; }
.message-erreur {
  border: 2px solid #c0352b; background: #fdecea; color: #7a1d16;
  border-radius: var(--rayon); padding: 0.9rem 1.1rem; margin-bottom: 1.5rem;
}
.message-erreur[hidden] { display: none; }

/* ---------- Pied de page ---------- */

.pied {
  background: var(--encre); color: #cfcde3;
  padding-block: 3.5rem 2rem;
  font-size: 0.98rem;
}
.pied a { color: var(--blanc); }
.pied-grille {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.logo-plaque { display: inline-block; background: var(--blanc); border-radius: 999px; padding: 0.5rem 1.2rem 0.5rem 0.9rem; margin-bottom: 1.1rem; }
.pied img { height: 36px; width: auto; }
.pied h2 { font-size: 1.05rem; color: var(--blanc); margin-bottom: 0.8rem; letter-spacing: 0; }
.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.pied ul a { text-decoration: none; }
.pied ul a:hover { text-decoration: underline; }
.pied-bas {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding-top: 1.5rem; font-size: 0.92rem;
}
@media (max-width: 760px) { .pied-grille { grid-template-columns: 1fr; } }

/* Barre d'appel mobile */
.barre-mobile { display: none; }
@media (max-width: 720px) {
  body { padding-bottom: 76px; }
  .barre-mobile {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
    background: var(--blanc);
    border-top: 1px solid var(--ligne);
  }
  .barre-mobile .bouton { min-height: 52px; padding-inline: 0.5rem; }
}
