/* Site institutionnel DigiBarre
   La forme reprend celle du site actuel : Roboto, titres très fins, tout
   centré, boutons en pilule rouge et en majuscules, conteneur à 1200 px.
   Décision de Pierre du 31/08/2026 — la bascule doit être invisible pour
   les visiteurs. */

:root {
  --rouge: #e52421;          /* le rouge des boutons du site actuel */
  --rouge-fonce: #c71916;    /* celui du logo */
  --texte: #696969;
  --titre: #313131;
  --fond: #ffffff;
  --fond-gris: #f7f7f7;
  --trait: #e5e5e5;
  --large: 1200px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  font-weight: 300; /* le corps du site actuel est en graisse fine, pas en 400 */
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--titre);
  margin: 0;
  line-height: 1.25;
}
h1 { font-weight: 100; font-size: 42px; }
h2 { font-weight: 300; font-size: 30px; }
h3 { font-weight: 400; font-size: 20px; }
h4 { font-weight: 500; font-size: 16px; }

a { color: var(--rouge); text-decoration: none; }
a:hover { color: var(--rouge-fonce); text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--rouge); outline-offset: 3px; }

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

.contenu { max-width: var(--large); margin: 0 auto; padding: 0 30px; }
.centre { text-align: center; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-block;
  background: var(--rouge);
  color: #fff;
  border: 1px solid var(--rouge);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 38px;
  padding: 0 40px;
  border-radius: 500px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease;
}
.bouton:hover { background: var(--rouge-fonce); border-color: var(--rouge-fonce); color: #fff; text-decoration: none; }
.bouton-blanc { background: transparent; border-color: #fff; color: #fff; }
.bouton-blanc:hover { background: #fff; color: var(--titre); border-color: #fff; }

/* ---------- En-tête ---------- */
.entete { background: #fff; border-bottom: 1px solid var(--trait); position: relative; z-index: 50; }
.entete-in {
  max-width: var(--large);
  margin: 0 auto;
  padding: 18px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo img { height: 46px; width: auto; display: block; }

.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav > a, .menu-deroulant > button {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--titre);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.nav > a:hover, .menu-deroulant > button:hover { color: var(--rouge); text-decoration: none; }
.nav > a[aria-current="page"] { color: var(--rouge); }
.menu-deroulant { position: relative; }
.menu-deroulant > button::after { content: "▾"; font-size: .8em; opacity: .6; }
.sous-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: #fff;
  border: 1px solid var(--trait);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .09);
  padding: 8px 0;
  display: none;
  max-height: 70vh;
  overflow-y: auto;
}
.sous-menu.ouvert { display: block; }
.sous-menu a {
  display: block;
  padding: 7px 18px;
  font-size: 13px;
  color: var(--texte);
  text-transform: none;
  letter-spacing: 0;
}
.sous-menu a:hover { color: var(--rouge); background: var(--fond-gris); text-decoration: none; }

/* ---------- Accroche ---------- */
.accroche {
  position: relative;
  background: #313131 url("/images/accroche.jpeg") center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 130px 0 140px;
}
.accroche::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(30, 30, 30, .38);
}
.accroche .contenu { position: relative; }
.accroche h1 { color: #fff; font-weight: 100; font-size: clamp(30px, 5vw, 46px); }
.accroche p {
  color: #fff;
  font-size: 20px;
  font-weight: 300;
  max-width: 640px;
  margin: 22px auto 0;
}
.accroche .actions { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-petite { padding: 40px 0; }
.section-grise { background: #fafafa; }
.sur-titre { text-align: center; font-size: 15px; margin: 0 0 40px; }

/* Bandeau des logos clients : une ligne, repartie */
.section-confiance { padding: 40px 0 30px; }
.logos { display: flex; flex-wrap: wrap; gap: 30px 50px; align-items: center; justify-content: center; }
/* Boite identique pour chaque logo : des partenaires dans des formats tres
   differents (bloc plein, trait fin, large ou carre) gardent le meme poids
   visuel sur la ligne, sans qu'un logo plus "charge" ecrase les autres. */
.logos img { width: 130px; height: 64px; object-fit: contain; }

/* Temoignages : carrousel, aligne a gauche */
.section-temoignages { padding: 40px 0 60px; border-top: 1px solid var(--trait); }
.carrousel { position: relative; min-height: 190px; }
.temoignage { display: none; margin: 0; }
.temoignage.actif { display: block; }
.temoignage-tete { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.temoignage-tete img { width: 74px; height: 74px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.temoignage-tete h3 { font-size: 19px; font-weight: 400; color: var(--titre); margin: 0; }
.temoignage blockquote { margin: 0; font-size: 15px; max-width: 860px; }
.puces { display: flex; gap: 10px; justify-content: center; margin-top: 34px; }
.puce { width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: #d5d5d5; }
.puce.actif { background: var(--rouge); }

/* Fonctionnalites : intro a gauche, vignettes a droite */
.section-vignettes { padding: 40px 0; border-top: 1px solid var(--trait); }
.bloc-vignettes { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 60px; align-items: start; }
.bloc-intro h2 { font-size: 30px; font-weight: 300; margin-bottom: 16px; }
.bloc-intro p { margin: 0 0 24px; font-size: 15px; }
.vignettes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-bottom: 40px; }
.vignette {
  background: var(--fond);
  border: 1px solid var(--trait);
  border-radius: 12px;
  padding: 22px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.vignette:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 14px 28px rgba(49, 49, 49, .1);
}
.vignette .icone-fond {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fbeceb; /* teinte tres claire du rouge de la marque */
  margin-bottom: 16px;
  transition: background-color .18s ease, transform .18s ease;
}
.vignette:hover .icone-fond { background: var(--rouge); transform: scale(1.06); }
.vignette .icone-fond img { width: 24px; height: 24px; margin: 0; }
.vignette:hover .icone-fond img { filter: brightness(0) invert(1); }
.vignettes .vignette h3 { font-size: 17px; font-weight: 500; margin-bottom: 8px; }
.vignettes .vignette p { margin: 0; font-size: 14px; }
.vignettes .vignette p + p { margin-top: 10px; }

/* Bandeau de chiffres cles (pourquoi-digibarre) */
.chiffres {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 16px;
  text-align: center;
  margin: 0 0 46px;
  padding: 30px 10px;
  background: var(--fond-gris);
  border-radius: 14px;
}
.chiffres .valeur { display: block; font-size: clamp(22px, 3.4vw, 30px); font-weight: 500; color: var(--rouge); line-height: 1.15; }
.chiffres .label { display: block; margin-top: 6px; font-size: 13px; color: var(--texte); }

/* Etude de cas : image large a gauche, texte a droite */
.section-etude { padding: 70px 0; border-top: 1px solid var(--trait); }
.titre-etude { font-size: 34px; font-weight: 100; margin-bottom: 34px; }
.etude { display: grid; grid-template-columns: 2fr 1fr; gap: 50px; align-items: center; }
.etude-image { text-align: center; }
.etude-image img { max-height: 210px; width: auto; }
.etude-texte p { margin: 0 0 24px; font-size: 15px; }

/* Video responsive (16:9), utilisee ici et sur la page etude de cas */
.video-responsive { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; margin-bottom: 20px; }
.video-responsive iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Questions frequentes : accordeon, une question ouverte a la fois */
.section-faq { background: #fafafa; padding: 70px 0; }
.section-faq h2 { margin: 0 0 6px; font-size: 30px; font-weight: 300; }
.faq-liste { max-width: 820px; margin: 30px auto 0; border-top: 1px solid var(--trait); }
.faq-item { border-bottom: 1px solid var(--trait); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 34px 20px 0;
  position: relative;
  font-size: 16px;
  color: var(--titre);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 300;
  color: var(--rouge);
  transition: transform .15s ease;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item[open] summary { color: var(--rouge); }
.faq-item p { margin: 0 0 20px; font-size: 15px; }

/* Appel final */
.section-appel { padding: 70px 0; text-align: center; }
.section-appel h2 { font-weight: 300; font-size: 28px; }
.section-appel p { margin: 14px 0 30px; }

/* ---------- Corps de page ---------- */
.page { padding: 70px 0 80px; }
.page-titre { font-weight: 100; font-size: clamp(28px, 4.5vw, 42px); text-align: center; }
.page-chapeau { text-align: center; max-width: 820px; margin: 22px auto 0; font-size: 17px; font-weight: 300; }
.page-image { max-width: 900px; margin: 40px auto 0; }
.page-image img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  -webkit-mask-image: url("/images/masque-image.svg");
  mask-image: url("/images/masque-image.svg");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.page-image-rond img { -webkit-mask-image: none; mask-image: none; border-radius: 18px; }
.prose { max-width: 820px; margin: 46px auto 0; text-align: left; }
.prose h2 { font-size: 24px; font-weight: 300; margin: 44px 0 14px; }
.prose h3 { font-size: 18px; font-weight: 500; margin: 32px 0 10px; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 7px; }
.prose table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--trait); padding: 9px 12px; text-align: left; }

/* Fonctionnalites : liste + panneau interactif (accessible sans JS, ameliore avec JS) */
.prose:has(.fonctions-wrap) { max-width: 1040px; }
.fonctions-wrap { margin-top: 34px; }
.fonctions-liste {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 36px;
}
.fonctions-liste a {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--fond-gris);
  color: var(--texte);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.3;
  transition: background .15s ease, color .15s ease;
}
.fonctions-liste a:hover { background: #ececec; }
.fonctions-liste a.actif { background: var(--rouge); color: #fff; }
.fonctions-panneau {
  padding: 30px 0;
  border-top: 1px solid var(--trait);
  scroll-margin-top: 100px;
}
.fonctions-panneau:first-of-type { border-top: none; padding-top: 0; }
.fonctions-panneau h3 { font-size: 21px; font-weight: 400; margin: 0 0 14px; }
.fonctions-panneau p { margin: 0 0 16px; }
.fonctions-panneau.masque { display: none; }
@keyframes fonctions-entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fonctions-panneau.anime { animation: fonctions-entree .3s ease; }

/* Bandeau illustre en tete de chaque panneau (illustration flat design du theme, jamais une capture d'ecran) */
.fonctions-panneau .bandeau {
  height: 150px;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
}
.fonctions-panneau .bandeau img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Version JS : navigation laterale fixe + panneau unique */
.fonctions-wrap.js-actif { display: grid; grid-template-columns: 280px 1fr; gap: 50px; align-items: start; }
.fonctions-wrap.js-actif .fonctions-liste {
  flex-direction: column;
  flex-wrap: nowrap;
  margin: 0;
  position: sticky;
  top: 96px;
}
.fonctions-wrap.js-actif .fonctions-liste a { border-radius: 10px; border-left: 3px solid transparent; }
.fonctions-wrap.js-actif .fonctions-liste a.actif { background: #fbeceb; color: var(--rouge); font-weight: 500; border-left-color: var(--rouge); }
.fonctions-wrap.js-actif .fonctions-panneau { border-top: none; padding: 0; }

@media (max-width: 900px) {
  .fonctions-wrap.js-actif { display: block; }
  .fonctions-wrap.js-actif .fonctions-liste {
    position: static;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 28px;
    -webkit-overflow-scrolling: touch;
  }
  .fonctions-wrap.js-actif .fonctions-liste a { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; border-radius: 999px; }
  .fonctions-wrap.js-actif .fonctions-liste a.actif { border-bottom-color: var(--rouge); }
  .fonctions-panneau .bandeau { height: 120px; }
}
.prose th { background: var(--fond-gris); font-weight: 500; color: var(--titre); }

/* ---------- Barreaux ---------- */
.barreaux { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.barreaux a {
  display: block;
  padding: 12px 16px;
  border: 1px solid var(--trait);
  color: var(--texte);
  font-size: 14px;
  background: #fff;
  text-align: center;
}
.barreaux a:hover { border-color: var(--rouge); color: var(--rouge); text-decoration: none; }

/* ---------- Appel final ---------- */
.appel { background: var(--fond-gris); padding: 70px 0; text-align: center; }
.appel h2 { font-weight: 300; font-size: 28px; }
.appel p { margin: 14px 0 30px; }

/* ---------- Formulaire ---------- */
.zone-formulaire { max-width: 640px; margin: 40px auto 0; text-align: left; }
.zone-formulaire .attente { color: #6b6b6b; font-size: 14px; }

/* ---------- Pied de page ---------- */
.pied { background: var(--fond-gris); border-top: 1px solid var(--trait); padding: 54px 0 30px; text-align: center; }
.pied > .contenu > img { height: 44px; width: auto; }
.pied .baseline { margin: 18px 0 30px; font-size: 14px; }
.pied nav { display: flex; flex-wrap: wrap; gap: 8px 30px; justify-content: center; }
.pied nav a { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--titre); }
.pied nav a:hover { color: var(--rouge); text-decoration: none; }
.pied-bas { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--trait); font-size: 12px; color: #6b6b6b; }

/* ---------- Bandeau cookies ---------- */
.cookies {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #fff; border-top: 1px solid var(--trait);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, .07);
  padding: 22px 20px; text-align: center; z-index: 60;
}
.cookies[hidden] { display: none; }
.cookies p { margin: 0 0 16px; font-size: 14px; }
.cookies .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cookies button {
  font-family: inherit; font-size: 11px; font-weight: 500; letter-spacing: .06em;
  text-transform: uppercase; cursor: pointer; line-height: 36px; padding: 0 32px; border-radius: 500px;
}
.cookies .accepter { background: var(--rouge); color: #fff; border: 1px solid var(--rouge); }
.cookies .accepter:hover { background: var(--rouge-fonce); border-color: var(--rouge-fonce); }
.cookies .refuser { background: #fff; color: var(--titre); border: 1px solid var(--trait); }
.cookies .refuser:hover { border-color: #b5b5b5; }

/* ---------- Divers ---------- */
.saut-contenu { position: absolute; left: -9999px; background: var(--rouge); color: #fff; padding: 10px 18px; z-index: 100; }
.saut-contenu:focus { left: 16px; top: 16px; }

@media (max-width: 900px) {
  .nav { display: none; }
  .bloc-vignettes { grid-template-columns: 1fr; gap: 34px; }
  .vignettes { grid-template-columns: 1fr; gap: 30px; }
  .chiffres { grid-template-columns: 1fr; padding: 26px 14px; gap: 22px; }
  .etude { grid-template-columns: 1fr; gap: 30px; }
  .logos { justify-content: center; gap: 26px 34px; }
  .logos img { width: 104px; height: 52px; }
  .accroche { padding: 80px 0 90px; }
  .section, .page { padding: 48px 0; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
