/* institutions.css — THEME INSTITUTIONNEL dédié (chantier « mairies », lot B-quater).
   N'APPLIQUE RIEN AU RESTE DU SITE : toutes les règles sont préfixées par `body.inst`,
   activé uniquement sur /institutions et /institutions/publier via <body class="inst">.
   Pleine largeur, bandes sobres en alternance, un seul accent (ambre de la marque),
   contraste AA, mobile d'abord, prefers-reduced-motion respecté. Aucun script. */

/* Le site peint une couche fixe plein écran (body::before, background.png violet) AU-DESSUS
   du fond du body : elle masquait le fond propre des pages institutions (surface / gris du
   formulaire). On la neutralise ici pour laisser voir le fond de body.inst. */
body.inst::before { display: none !important; }

body.inst {
  --inst-accent: var(--amber, #f2a900);
  --inst-accent-ink: #4a3500;            /* texte sur fond ambre : contraste AA */
  --inst-ink: var(--ink, #1a1526);
  --inst-muted: var(--muted, #5b5768);
  --inst-surface: var(--surface, #ffffff);
  --inst-soft: #f5f6f8;                  /* gris très clair pour l'alternance */
  --inst-line: var(--line, #e6e3ee);
  --inst-wrap: 1080px;
  background: var(--inst-surface);
  color: var(--inst-ink);
}

/* Largeur de contenu commune, centrée. Les bandes, elles, vont bord à bord. */
body.inst .inst-wrap { max-width: var(--inst-wrap); margin: 0 auto; padding: 0 24px; }

/* Bandes pleine largeur, sans cartes encadrées : simple alternance de fonds. */
body.inst .band { padding: 72px 0; }
body.inst .band--soft { background: var(--inst-soft); }
body.inst .band--accent { background: var(--inst-ink); color: #fff; }
body.inst .band--accent .inst-muted,
body.inst .band--accent p { color: #e9e7f0; }

/* Typographie posée. */
body.inst h1 { font-size: clamp(30px, 5.2vw, 46px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
body.inst h2 { font-size: clamp(22px, 3.2vw, 30px); font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 14px; }
body.inst h3 { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
body.inst p { line-height: 1.7; margin: 10px 0 0; font-size: 17px; }
body.inst .inst-muted { color: var(--inst-muted); }
body.inst .lead { font-size: clamp(18px, 2.4vw, 21px); color: var(--inst-muted); margin-top: 16px; max-width: 60ch; }
body.inst .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 700; color: var(--inst-accent-ink); margin: 0 0 10px; }
body.inst .band--accent .eyebrow { color: var(--inst-accent); }

/* HERO : la photo de mairie occupe le fond, cote DROIT, et se fond
   progressivement dans le fond violet du site (--inst-surface) vers la gauche. */
body.inst .hero {
  padding: 72px 0 64px;
  background:
    linear-gradient(90deg, var(--inst-surface) 0%, var(--inst-surface) 40%, rgba(244,237,251,0) 78%),
    url("/img/photo_mairie.jpg") right center / cover no-repeat;
}
body.inst .hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; min-height: 360px; }
body.inst .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Boutons */
body.inst .btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 10px; font-weight: 700; font-size: 16px; text-decoration: none; border: 2px solid transparent; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
body.inst .btn-primary { background: var(--inst-accent); color: #fff; }
/* Au survol : pas d'ombre, mais un virage vers le gris du site. */
body.inst .btn-primary:hover { background: var(--inst-soft); color: var(--inst-ink); border-color: var(--inst-line); }
body.inst .btn-ghost { background: transparent; border-color: var(--inst-line); color: inherit; }
body.inst .band--accent .btn-ghost { border-color: rgba(255,255,255,.4); color: #fff; }
body.inst .btn:focus-visible { outline: 3px solid var(--inst-accent); outline-offset: 3px; }

/* Grilles neutres (pas de cartes encadrées : séparateurs discrets seulement). */
body.inst .cols { display: grid; gap: 40px 48px; }
body.inst .cols-4 { grid-template-columns: repeat(4, 1fr); }
body.inst .cols-3 { grid-template-columns: repeat(3, 1fr); }
body.inst .cols-2 { grid-template-columns: repeat(2, 1fr); }
body.inst .pillar h3 { margin-top: 14px; }
body.inst .ico { width: 40px; height: 40px; color: var(--amber, #a567e3); }
body.inst .band--accent .ico { color: var(--inst-accent); }

/* Étapes numérotées */
body.inst .steps { counter-reset: step; display: grid; gap: 28px; grid-template-columns: repeat(4, 1fr); margin-top: 8px; }
body.inst .step { position: relative; background: var(--inst-soft); border-radius: 14px; padding: 60px 22px 24px; }
body.inst .step::before { counter-increment: step; content: counter(step); position: absolute; top: 22px; left: 22px; width: 38px; height: 38px; border-radius: 50%; background: var(--inst-accent); color: var(--inst-accent-ink); font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* Distinction Alerte / Information */
body.inst .kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
body.inst .kind { background: var(--inst-soft); border-radius: 14px; border-left: 4px solid var(--inst-line); padding: 16px 18px; }
body.inst .kind--alerte { border-left-color: var(--inst-accent); }
body.inst .kind .tag { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
body.inst .kind--alerte .tag { background: #fde9bf; color: var(--inst-accent-ink); }
body.inst .kind--info .tag { background: #e4e9f2; color: #2a3a52; }

/* Cas d'usage : exemples de messages (fictifs). */
body.inst .cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 40px; margin-top: 10px; }
body.inst .case h3 { display: flex; align-items: center; gap: 10px; }
body.inst .msg { margin-top: 10px; border: 1px solid var(--inst-line); border-radius: 12px; padding: 14px 16px; background: var(--inst-surface); }
body.inst .msg .msg-head { font-size: 13px; color: var(--inst-muted); margin: 0 0 6px; }
body.inst .msg .msg-body { margin: 0; white-space: pre-wrap; line-height: 1.55; font-size: 15px; }
body.inst .msg .ex { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--inst-muted); border: 1px solid var(--inst-line); border-radius: 6px; padding: 1px 6px; margin-left: 8px; vertical-align: middle; }

/* Maquettes d'écran (SVG), côte à côte. */
body.inst .mockups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 10px; }
body.inst .mockup { text-align: center; }
body.inst .mockup svg { width: 100%; height: auto; max-width: 300px; filter: drop-shadow(0 8px 24px rgba(26,21,38,.10)); }
body.inst .mockup figcaption { margin-top: 12px; font-size: 14px; color: var(--inst-muted); }

/* Garanties & « ne fait pas » : listes aérées à puces personnalisées. */
body.inst .checks { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 14px; }
body.inst .checks li { position: relative; padding-left: 34px; line-height: 1.6; }
body.inst .checks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--inst-accent) center/14px no-repeat; -webkit-mask: var(--mark) center/14px no-repeat; mask: var(--mark) center/14px no-repeat; }
body.inst .checks--yes { --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
body.inst .checks--no { --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E"); }
body.inst .checks--no li::before { background: var(--inst-muted); }

/* FAQ native (details/summary), sans JavaScript. */
body.inst .faq { max-width: 820px; margin-top: 8px; }
body.inst .faq details { border-bottom: 1px solid var(--inst-line); padding: 6px 0; }
body.inst .faq summary { cursor: pointer; font-weight: 700; font-size: 17px; padding: 14px 40px 14px 0; position: relative; list-style: none; }
body.inst .faq summary::-webkit-details-marker { display: none; }
body.inst .faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 24px; font-weight: 400; color: var(--inst-accent-ink); }
body.inst .faq details[open] summary::after { content: "\2013"; }
body.inst .faq summary:focus-visible { outline: 3px solid var(--inst-accent); outline-offset: 2px; border-radius: 6px; }
body.inst .faq .faq-a { padding: 0 0 16px; }

/* CTA final */
body.inst .cta-final { text-align: center; }
body.inst .cta-final .hero-actions { justify-content: center; }

/* À confirmer : repère éditorial, invisible (le commentaire HTML suffit),
   cette classe sert seulement si Hugo veut afficher un bandeau de relecture. */
body.inst .todo-hugo { display: none; }

/* Responsive */
@media (max-width: 880px) {
  body.inst .hero-grid { grid-template-columns: 1fr; gap: 32px; min-height: 0; }
  /* Mobile : la photo de fond nuirait a la lisibilite du texte -> fond violet uni. */
  body.inst .hero { background: var(--inst-surface); }
  body.inst .cols-4 { grid-template-columns: repeat(2, 1fr); }
  body.inst .steps { grid-template-columns: repeat(2, 1fr); }
  body.inst .cases { grid-template-columns: 1fr; }
  body.inst .mockups { grid-template-columns: 1fr; justify-items: center; }
  body.inst .mockup svg { max-width: 340px; }
}
@media (max-width: 560px) {
  body.inst .band { padding: 52px 0; }
  body.inst .cols-4, body.inst .cols-3, body.inst .cols-2, body.inst .steps, body.inst .kinds { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  body.inst .btn, body.inst .btn:hover { transition: none; transform: none; }
}
