/* =============================================================================
   Camabe — MISE EN PAGE : barre, boutons, heros, sections, chiffres, pied.
   Aucune couleur en dur : tout vient des jetons de socle.css.
   ========================================================================== */

/* ------------------------------------------------------------ Navigation -- */

.barre {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--papier) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--trait);
}

.barre__int {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}

.barre__liens {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.barre__liens a {
  color: var(--encre-douce);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
}
.barre__liens a:hover { color: var(--encre); }

.barre__liens a.est-actif,
.barre__plus details.contient-actif > summary {
  color: var(--accent);
}

.barre__plus { position: relative; }
.barre__plus details { position: relative; }
.barre__plus summary {
  color: var(--encre-douce);
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.barre__plus summary::-webkit-details-marker { display: none; }
.barre__plus summary::after { content: "↓"; margin-left: 6px; font-size: .8em; }
.barre__plus details[open] summary::after { content: "↑"; }

.barre__menu-plus {
  position: absolute;
  right: 0;
  top: calc(100% + 14px);
  display: grid;
  min-width: 260px;
  padding: 8px;
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}
.barre__menu-plus a { padding: 9px 11px; border-radius: 7px; }
.barre__menu-plus a:hover { background: var(--accent-pale); color: var(--encre); }

.navigation-mobile { display: none; }

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

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: var(--rayon);
  border: 1px solid transparent;
  font: inherit;
  font-size: .98rem;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.bouton--plein {
  background: var(--accent);
  color: var(--sur-accent);
  box-shadow: 0 1px 2px rgba(23,32,42,.10), 0 8px 22px color-mix(in srgb, var(--accent) 24%, transparent);
}
.bouton--plein:hover { background: var(--accent-vif); transform: translateY(-1px); }

.bouton--creux {
  background: transparent;
  color: var(--encre);
  border-color: var(--trait-fort);
}
.bouton--creux:hover { border-color: var(--encre); }

:where(a, button).bouton:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ------------------------------------------------------------------ Hero -- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 10vw, 118px) 0 clamp(52px, 7vw, 82px);
  background: radial-gradient(circle at 78% 18%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 34%);
}

.hero__promesse {
  max-width: 17ch;
  margin-bottom: .35em;
}

.hero__appui {
  max-width: 52ch;
  font-size: 1.16rem;
  color: var(--encre-douce);
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero__note {
  margin-top: 1.1rem;
  font-size: .9rem;
  color: var(--encre-douce);
}

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

.section { padding: clamp(48px, 7vw, 88px) 0; }
.section--creuse { background: var(--papier-creux); border-block: 1px solid var(--trait); }

.section__titre { max-width: 24ch; }
.section__chapo { max-width: 58ch; color: var(--encre-douce); font-size: 1.06rem; }

/* Le bleu ardoise est reserve a la confiance : donnees, securite, secret. */
.section--donnees .section__titre,
.section--donnees a { color: var(--info); }

.section--donnees .carte {
  border-top: 2px solid color-mix(in srgb, var(--info) 58%, transparent);
}

.grille {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  margin-top: 2.2rem;
}

.carte {
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  padding: 24px;
  box-shadow: var(--ombre);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

@media (hover: hover) {
  .carte:hover { transform: translateY(-2px); border-color: var(--trait-fort); }
}

.carte h3 { margin-bottom: .45em; }
.carte p:last-child { margin-bottom: 0; }

.carte__oeil {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--accent-pale);
  color: var(--accent);
  margin-bottom: 14px;
}

/* --------------------------------------------------------------- Chiffres -- */

.chiffres {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 2rem;
}

.chiffre__valeur {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1;
  color: var(--accent);
}
.chiffre__quoi { color: var(--encre-douce); font-size: .95rem; margin-top: .4em; }

/* ------------------------------------------------------------------ Pied -- */

.pied {
  border-top: 1px solid var(--trait);
  padding: 44px 0 56px;
  color: var(--encre-douce);
  font-size: .93rem;
}

.pied__int {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
}

.pied a { color: var(--encre-douce); text-decoration: none; }
.pied a:hover { color: var(--encre); text-decoration: underline; }

.pied__liens { display: flex; flex-wrap: wrap; gap: 20px; }

/* ------------------------------------------------------------- Telephone -- */

/* Menu compact sous 1260 px (24/09) : six onglets, le selecteur d'espace et le bouton
   d'appel ne tiennent sur une ligne qu'au-dela. */
@media (max-width: 1260px) {
  .barre__navigation { display: none; }
  .navigation-mobile { display: block; position: relative; margin-left: auto; }
  .navigation-mobile > summary {
    list-style: none;
    padding: 9px 13px;
    border: 1px solid var(--trait-fort);
    border-radius: 8px;
    color: var(--encre);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
  }
  .navigation-mobile > summary::-webkit-details-marker { display: none; }
  .navigation-mobile nav {
    position: absolute;
    right: 0;
    top: calc(100% + 13px);
    width: min(310px, calc(100vw - 32px));
    display: grid;
    gap: 2px;
    padding: 10px;
    background: var(--carte);
    border: 1px solid var(--trait);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
  }
  .navigation-mobile nav a {
    padding: 10px 12px;
    color: var(--encre-douce);
    text-decoration: none;
    border-radius: 7px;
  }
  .navigation-mobile nav a:hover,
  .navigation-mobile nav a.est-actif { background: var(--accent-pale); color: var(--encre); }
  .barre__cta { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero__promesse { max-width: none; }
  .hero__actions .bouton { width: 100%; }
}


/* Saut au contenu : visible seulement au clavier (docs/accessibilite.md). */
.saut-au-contenu {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 40;
  padding: 11px 18px;
  background: var(--accent);
  color: var(--sur-accent);
  border-radius: 0 0 var(--rayon) 0;
  text-decoration: none;
}
.saut-au-contenu:focus { left: 0; }

/* ------------------------------------------------ Bascules theme / langue -- */
/* Le bouton de theme a trois etats (auto, clair, sombre). Une seule icone est
   visible a la fois : l etat est porte par data-etat, ecrit par le script. */

.barre__outils { display: flex; align-items: center; gap: 4px; }

.outil {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: none;
  color: var(--encre-douce);
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
}
.outil:hover { color: var(--encre); background: var(--papier-creux); }
.outil:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Sans script, on montre l icone « auto » : jamais de bouton muet. */
.outil__clair, .outil__sombre { display: none; }
[data-bascule-theme][data-etat="clair"]  .outil__auto,
[data-bascule-theme][data-etat="clair"]  .outil__sombre { display: none; }
[data-bascule-theme][data-etat="clair"]  .outil__clair { display: block; }
[data-bascule-theme][data-etat="sombre"] .outil__auto,
[data-bascule-theme][data-etat="sombre"] .outil__clair { display: none; }
[data-bascule-theme][data-etat="sombre"] .outil__sombre { display: block; }

@media (max-width: 720px) {
  .barre__outils { order: 2; }
}

/* Avis de non-traduction : visible sans etre alarmant. */
.avis-langue {
  margin: 22px 0 0;
  padding: 13px 17px;
  border: 1px solid var(--trait-fort);
  border-left: 3px solid var(--info);
  border-radius: 0 var(--rayon) var(--rayon) 0;
  background: var(--info-pale);
  color: var(--encre);
  font-size: .93rem;
}
