/* Cité 360 : le visuel de chaque ville passe par les variables --c360-* (voir App\Support\Apparence).
   Valeurs par défaut : marque Cité 360 (cite360.ca). Le turquoise #00AC9D porte du texte charbon :
   avec du blanc, le contraste ne serait que de 2,84:1. Les liens utilisent un turquoise foncé (5,37:1). */
@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("../vendor/fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("../vendor/fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("../vendor/fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Lexend Deca"; font-weight: 400; font-style: normal; font-display: swap; src: url("../vendor/fonts/lexend-deca-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lexend Deca"; font-weight: 600; font-style: normal; font-display: swap; src: url("../vendor/fonts/lexend-deca-latin-600-normal.woff2") format("woff2"); }
:root {
    --c360-accent: #00AC9D; --c360-accent-texte: #221F20; --c360-accent-survol: #26B8AB;
    --c360-fond: #EBF5FF; --c360-texte: #221F20; --c360-entete: #FFFFFF; --c360-entete-texte: #221F20;
    --c360-pied: #626262; --c360-pied-texte: #FFFFFF; --c360-carte: #FFFFFF; --c360-lien: #00786E;
    --c360-police: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; --c360-arrondi: 1rem;
    --c360-police-titres: "Lexend Deca", "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --c360-charbon: #221F20; --c360-turquoise-fonce: #00786E;
}

body { font-family: var(--c360-police); color: var(--c360-texte); background: var(--c360-fond); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
a { color: var(--c360-lien); }
/* Titres comme sur cite360.ca : Lexend Deca, graisse normale, lettres légèrement resserrées. */
h1, h2, h3, h4, .h1, .h2, .h3, .h4, .h5, h5 { color: inherit; font-family: var(--c360-police-titres); font-weight: 400; letter-spacing: -.02em; }
h1, .h1 { letter-spacing: -.03em; }
.h6, h6 { font-weight: 600; }
h1 { font-size: 1.75rem; }

/* Accessibilité : lien d'évitement et focus toujours visible (WCAG 2.1 AA) */
.lien-evitement { position: absolute; left: -9999px; top: 0; z-index: 2000; background: #000; color: #fff; padding: .75rem 1rem; }
.lien-evitement:focus { left: 0; color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible {
    outline: 3px solid #000; outline-offset: 2px; box-shadow: 0 0 0 5px #fff;
}
.form-control:focus, .form-select:focus { border-color: var(--c360-accent); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--c360-accent) 30%, transparent); }
.form-check-input:checked { background-color: var(--c360-accent); border-color: var(--c360-accent); }
.form-range::-webkit-slider-thumb { background-color: var(--c360-accent); }
.form-range::-moz-range-thumb { background-color: var(--c360-accent); }
.page-link { color: var(--c360-lien); }
.active > .page-link, .page-link.active { background-color: var(--c360-accent); border-color: var(--c360-accent); color: var(--c360-accent-texte); }
.form-label { font-weight: 600; }
.invalid-feedback { font-weight: 500; color: #B42318; }
.requis { color: #B42318; }
.champ-piege { position: absolute; left: -9999px; height: 1px; width: 1px; overflow: hidden; }

/* Boutons */
.btn-accent { background: var(--c360-accent); color: var(--c360-accent-texte); border: 1px solid var(--c360-accent); border-radius: var(--c360-arrondi); }
.btn-accent:hover, .btn-accent:active, .btn-accent:focus { background: var(--c360-accent-survol) !important; color: var(--c360-accent-texte) !important; border-color: var(--c360-accent-survol) !important; }
.btn-contour { background: transparent; color: var(--c360-lien); border: 1px solid currentColor; border-radius: var(--c360-arrondi); }
.btn-contour:hover { background: var(--c360-accent); color: var(--c360-accent-texte); border-color: var(--c360-accent); }

/* Portail */
.portail-entete { background: var(--c360-entete); color: var(--c360-entete-texte); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.portail-entete a { color: inherit; text-decoration: none; }
.portail-entete a:hover { text-decoration: underline; }
.portail-entete .btn-entete { border: 1px solid currentColor; border-radius: var(--c360-arrondi); padding: .35rem .85rem; background: transparent; color: inherit; }
.portail-marques { display: flex; align-items: center; gap: .85rem; text-decoration: none !important; }
.portail-logo-c360 { height: 48px; width: 48px; flex-shrink: 0; }
.portail-separateur { width: 1px; align-self: stretch; margin: .35rem 0; background: #C9D3DD; }
.portail-logo { max-height: 52px; max-width: 200px; }
.portail-nom { font-family: var(--c360-police-titres); font-size: 1.2rem; letter-spacing: -.02em; line-height: 1.15; }
@media (max-width: 575px) { .portail-logo-c360 { height: 38px; width: 38px; } .portail-logo { max-height: 40px; max-width: 150px; } .portail-nom { font-size: 1rem; } }

/* Aperçu de la page Apparence */
.apercu-entete { display: flex; align-items: center; gap: .6rem; padding: .5rem .8rem; background: #fff; }
.apercu-logo-c360 { height: 30px; width: 30px; }
.apercu-separateur { width: 1px; height: 24px; background: #C9D3DD; }
.apercu-logo-ville { max-height: 30px; max-width: 130px; }
.apercu-fond { position: relative; padding: 1.25rem 1rem; background-color: var(--c360-fond); background-size: cover; background-position: center; }
.apercu-voile { position: absolute; inset: 0; background: var(--c360-fond); }
.apercu-carte { position: relative; background: #fff; border-radius: 1rem; padding: 1rem; }
.apercu-bouton { display: inline-block; background: var(--c360-accent); color: var(--c360-accent-texte); border-radius: 1rem; padding: .3rem .9rem; font-size: .9rem; }
.portail-pied { background: var(--c360-pied); color: var(--c360-pied-texte); margin-top: 3rem; }
.portail-pied a { color: inherit; text-decoration: underline; }
.a-image-fond { position: relative; background-size: cover; background-position: center; background-attachment: fixed; }
.a-image-fond::before { content: ""; position: fixed; inset: 0; background: var(--c360-fond); opacity: var(--c360-voile, .4); z-index: 0; pointer-events: none; }
.a-image-fond > * { position: relative; z-index: 1; }

.carte { background: var(--c360-carte); color: var(--c360-texte); border-radius: var(--c360-arrondi); box-shadow: 0 1px 3px rgba(0,0,0,.1); padding: 1.5rem; margin-bottom: 1.25rem; }
.tuile-service { display: flex; gap: .9rem; align-items: flex-start; height: 100%; color: inherit; text-decoration: none; border: 1px solid transparent; transition: border-color .15s; }
.tuile-service:hover, .tuile-service:focus { border-color: var(--c360-accent); }
.tuile-service .bi { font-size: 1.5rem; color: var(--c360-accent); }
.bandeau-alerte { background: #FEF3C7; color: #5B3A00; border-left: 5px solid #B45309; }
.etape { border-left: 3px solid var(--c360-accent); padding-left: 1rem; margin-bottom: .75rem; }
.bulle { border-radius: var(--c360-arrondi); padding: .75rem 1rem; margin-bottom: .75rem; background: #EEF2F6; color: #111827; }
.bulle.du-citoyen { background: #E0F0F7; }
.bulle.note { background: #FEF3C7; }

/* Gestion et console */
.espace { display: flex; min-height: 100vh; }
.espace-menu { width: 250px; flex-shrink: 0; background: var(--c360-charbon); color: #E5E7EB; padding: 1rem 0; }
.espace-logo { display: flex; align-items: center; gap: .6rem; padding: 0 1.25rem 1rem; color: #fff; font-weight: 600; line-height: 1.2; }
.espace-logo img { width: 44px; height: 44px; flex-shrink: 0; }
.acces-logo { display: block; width: 96px; height: 96px; margin: 0 auto .75rem; }
.pied-marque { display: inline-flex; align-items: center; gap: .4rem; }
.pied-marque img { width: 22px; height: 22px; }
.espace-menu .titre { font-weight: 700; padding: .25rem 1.25rem 1rem; color: #fff; }
.espace-menu .rubrique { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #AEB6C2; padding: 1rem 1.25rem .3rem; }
.menu-rubrique summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
    font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #AEB6C2; padding: 1rem 1.25rem .3rem; }
.menu-rubrique summary::-webkit-details-marker { display: none; }
.menu-rubrique summary::after { content: ""; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); transition: transform .15s; margin-right: .2rem; }
.menu-rubrique:not([open]) summary::after { transform: rotate(-45deg); }
.menu-rubrique summary:hover { color: #fff; }
.menu-rubrique summary:focus-visible { outline: 2px solid #00AC9D; outline-offset: -2px; }
.espace-menu a { display: block; padding: .42rem 1.25rem; color: #E5E7EB; text-decoration: none; }
.espace-menu a:hover, .espace-menu a.actif { background: rgba(255,255,255,.1); color: #fff; }
.espace-menu a.actif { border-left: 3px solid #00AC9D; padding-left: calc(1.25rem - 3px); }
.espace-contenu { flex: 1; min-width: 0; padding: 1.5rem 2rem; background: #F5FAFE; color: #221F20; }
.espace-contenu a:not(.btn) { color: var(--c360-turquoise-fonce); }
.kpi { background: #fff; border-radius: .5rem; padding: 1rem 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,.1); height: 100%; }
.kpi .valeur { font-size: 1.8rem; font-weight: 700; }
.kpi .libelle { color: #4B5563; font-size: .9rem; }
.table thead th { background: #F3F4F6; font-weight: 600; font-size: .85rem; white-space: nowrap; }
.statut { display: inline-block; padding: .15rem .6rem; border-radius: 1rem; font-size: .8rem; font-weight: 600; }
.statut-recue { background: #DBEAFE; color: #1E3A8A; }
.statut-en_cours { background: #FEF3C7; color: #5B3A00; }
.statut-reglee { background: #DCFCE7; color: #14532D; }
.statut-planifie { background: #E0E7FF; color: #312E81; }
.statut-termine { background: #DCFCE7; color: #14532D; }
.statut-echec, .statut-annule, .statut-suspendu { background: #FEE2E2; color: #7F1D1D; }
.statut-actif { background: #DCFCE7; color: #14532D; }
.statut-en_cours-envoi { background: #FEF3C7; color: #5B3A00; }
.acces-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #EBF5FF; color: #221F20; padding: 1rem; }
.acces-boite { background: #fff; width: 100%; max-width: 440px; padding: 2rem; border-radius: .75rem; box-shadow: 0 4px 18px rgba(0,0,0,.08); }

.bandeau-env { background: #7C2D12; color: #fff; text-align: center; font-size: .85rem; font-weight: 600; padding: .25rem; }

/* Constructeur de formulaires */
.champ-editeur { border: 1px solid #D1D5DB; border-radius: .5rem; padding: 1rem; margin-bottom: .75rem; background: #fff; }
.apercu-portail { border: 1px solid #D1D5DB; border-radius: .5rem; overflow: hidden; }
.carte-leaflet { height: 320px; border-radius: var(--c360-arrondi); border: 1px solid #9CA3AF; }

@media (max-width: 860px) {
    .espace { flex-direction: column; }
    .espace-menu { width: 100%; }
    .espace-contenu { padding: 1rem; }
}

/* ── Guide de l'employé : reprend les variables d'apparence de la ville ── */
.guide { font-family: var(--c360-police); color: var(--c360-texte); }
.guide a { color: var(--c360-lien); }
.guide-entete { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; background: var(--c360-entete); color: var(--c360-entete-texte);
    border-top: 6px solid var(--c360-accent); border-radius: var(--c360-arrondi); box-shadow: 0 1px 3px rgba(0,0,0,.1); padding: 1.5rem; margin-bottom: 1.25rem; }
.guide-entete h1 { margin: 0 0 .25rem; font-size: 1.6rem; }
.guide-logo { max-height: 64px; max-width: 200px; }
.guide-surtitre { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; font-weight: 600; margin: 0 0 .25rem; }
.guide-sommaire { position: sticky; top: 1rem; }
.guide-sommaire ol { padding-left: 1.2rem; margin: 0; }
.guide-sommaire li { margin-bottom: .35rem; }
.guide-titre { display: flex; align-items: center; gap: .6rem; font-size: 1.2rem; padding-bottom: .75rem; margin-bottom: 1rem; border-bottom: 2px solid var(--c360-accent); }
.guide-num { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%;
    background: var(--c360-accent); color: var(--c360-accent-texte); font-size: .95rem; font-weight: 700; flex-shrink: 0; }
.guide-etapes { list-style: none; counter-reset: etape; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; padding: 0; margin: 1rem 0; }
.guide-etapes li { counter-increment: etape; border: 1px solid #D1D5DB; border-top: 4px solid var(--c360-accent); border-radius: var(--c360-arrondi); padding: .75rem; text-align: center; }
.guide-etapes li::before { content: counter(etape); display: block; font-weight: 700; color: var(--c360-lien); }
.guide-etapes span { display: block; font-size: .85rem; color: #4B5563; }
.guide-role { border: 1px solid #D1D5DB; border-left: 4px solid var(--c360-accent); border-radius: var(--c360-arrondi); padding: 1rem; height: 100%; }
.guide-role ul { padding-left: 1.1rem; margin: 0; }
.guide-bouton { display: inline-block; border: 1px solid currentColor; color: var(--c360-lien); border-radius: var(--c360-arrondi); padding: 0 .5rem; font-size: .85em; font-weight: 600; white-space: nowrap; }
.guide-encadre { border-left: 4px solid var(--c360-accent); background: var(--c360-fond); color: var(--c360-texte); border-radius: .25rem; padding: .75rem 1rem; }
.guide-statuts { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1rem; align-items: center; }
.guide-statuts dd { margin: 0; }
.guide-faq dt { margin-top: .75rem; }
.guide-faq dt:first-child { margin-top: 0; }
@media (max-width: 575px) { .guide-statuts { grid-template-columns: 1fr; } .guide-bouton { white-space: normal; } }

/* ── Fenêtres de la Loi 25 (avis de vie privée, nouveau consentement) ── */
dialog.fenetre { max-width: 40rem; width: calc(100% - 2rem); border: 0; border-top: 6px solid var(--c360-accent); border-radius: var(--c360-arrondi);
    background: var(--c360-carte); color: var(--c360-texte); padding: 1.5rem; box-shadow: 0 10px 40px rgba(0,0,0,.3); font-family: var(--c360-police); }
dialog.fenetre::backdrop { background: rgba(17,24,39,.55); }
dialog.fenetre a { color: var(--c360-lien); }
dialog.fenetre-avis { margin-bottom: 1.5rem; }
.bloc-politique { border-top: 6px solid var(--c360-accent); }
.politique-texte h2 { margin-top: 1.5rem; }
