/* ============================================================
   Vivre à Cobrieux — l'appli du village
   Charte « Le Petit Coberlois » : papier crème, vert sauge, ocre, terracotta
   ============================================================ */
:root {
  --papier: #f5f4ec; --carte: #fffefa; --encre: #2f3133; --encre-2: #6b6d66;
  --trait: #e6dfc9; --trait-2: #efebdf; --liseré: #e5cf98;
  --sauge: #65805f; --sauge-fonce: #4e6849; --sauge-pale: #e4ead9;
  --ocre: #daae54; --ocre-fonce: #a57a24; --ocre-pale: #f8eed6;
  --terra: #b35943; --terra-fonce: #8f4230; --terra-pale: #f5e3dc;
  --rouge: #d71920;
  --titre: "Montserrat", system-ui, sans-serif;
  --texte: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  --main: "Caveat", cursive;
  --rayon: 14px;
  font-size: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papier); color: var(--encre); font-family: var(--texte); line-height: 1.55; }
img { max-width: 100%; }
a { color: var(--sauge-fonce); }
h1, h2, h3 { font-family: var(--titre); font-weight: 700; color: var(--encre); letter-spacing: -.01em; line-height: 1.2; }
h1 { font-size: 1.65rem; margin: 0 0 .7rem; }
h2 { font-size: 1.2rem; margin: 0 0 .8rem; }
h3 { font-size: 1.05rem; margin: 0 0 .3rem; }
code { background: var(--ocre-pale); padding: 1px 6px; border-radius: 4px; font-size: .95em; }
.main { font-family: var(--main); font-weight: 600; }
[hidden] { display: none !important; }

/* ---- En-tête ---- */
.bandeau { background: var(--papier); border-bottom: 1px solid var(--trait); }
.bandeau-in, .menu-in { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.bandeau-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 92px; position: relative; }
.surtitre {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ocre-fonce);
}
.surtitre strong { color: var(--sauge-fonce); }
.surtitre svg { width: 46px; height: 22px; color: var(--sauge); }
.marque { display: flex; align-items: center; gap: 14px; color: var(--encre); text-decoration: none; padding: 14px 0 10px; }
.marque img { width: 58px; height: 58px; object-fit: contain; flex: none; }
.marque .t1 { display: block; font-family: var(--titre); font-weight: 800; font-size: 1.4rem; line-height: 1.05; text-transform: uppercase; letter-spacing: .01em; }
.marque .t1 em { font-style: normal; color: var(--ocre); }
.marque .t2 { display: block; font-family: var(--main); font-size: 1.25rem; color: var(--sauge-fonce); line-height: 1.1; }
.compte { font-size: .95rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.compte a:not(.btn) { color: var(--encre); }

.menu { background: var(--sauge); }
.menu-in { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.menu a {
  color: #eef2e8; text-decoration: none; padding: 11px 15px; white-space: nowrap; font-weight: 700;
  font-family: var(--titre); font-size: .88rem; border-bottom: 3px solid transparent;
}
.menu a:hover { color: #fff; background: rgba(255,255,255,.08); }
.menu a.actif { color: #fff; border-bottom-color: var(--ocre); }
.sous-menu { background: var(--sauge-pale); border-bottom: 1px solid #cdd8c1; }
.sous-menu .menu-in { align-items: center; }
.sous-menu a { color: var(--sauge-fonce); text-decoration: none; padding: 9px 13px; white-space: nowrap; font-family: var(--titre); font-weight: 700; font-size: .84rem; border-bottom: 3px solid transparent; }
.sous-menu a.actif { border-bottom-color: var(--ocre); color: var(--encre); }
@media (min-width: 900px) {
  .sous-menu .menu-in { flex-wrap: wrap; overflow: visible; }
  .sous-menu a { padding: 9px 10px; }
}
.sm-titre { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--encre-2); padding-right: 6px; font-weight: 700; }
.pastille { background: var(--ocre); color: var(--encre); border-radius: 99px; padding: 0 7px; font-size: .78rem; margin-left: 4px; }

.page { max-width: 1180px; margin: 0 auto; padding: 24px 16px 44px; }

/* ---- Pied ---- */
.pied { background: var(--sauge); color: #f1f4ec; margin-top: 20px; }
.pied-in { max-width: 1180px; margin: 0 auto; padding: 24px 16px; display: flex; gap: 18px 40px; flex-wrap: wrap; align-items: center; font-size: .92rem; }
.pied-in img { width: 44px; height: 44px; object-fit: contain; }
.pied strong { font-family: var(--titre); }
.pied a { color: #fff; }
.pied .horaires { background: rgba(255,255,255,.12); border-radius: 10px; padding: 8px 14px; }
.pied-liens { flex-basis: 100%; font-size: .85rem; opacity: .9; }

/* Barre de navigation en bas, sur téléphone */
.barre-bas { display: none; }

/* ---- Boutons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--sauge); background: var(--sauge); color: #fff;
  font: inherit; font-family: var(--titre); font-weight: 700; font-size: .9rem;
  padding: 9px 18px; border-radius: 99px; cursor: pointer; text-decoration: none; line-height: 1.3;
}
.btn:hover { background: var(--sauge-fonce); border-color: var(--sauge-fonce); }
.btn-clair { background: var(--carte); color: var(--sauge-fonce); border-color: var(--trait); }
.btn-clair:hover { background: var(--sauge-pale); border-color: var(--sauge-pale); }
.btn-ocre { background: var(--ocre); border-color: var(--ocre); color: var(--encre); }
.btn-ocre:hover { background: var(--ocre-fonce); border-color: var(--ocre-fonce); color: #fff; }
.btn-danger { background: var(--carte); color: var(--terra-fonce); border-color: #e4bfb3; }
.btn-danger:hover { background: var(--terra-pale); border-color: var(--terra-pale); }
.btn-petit { padding: 5px 12px; font-size: .82rem; }

/* ---- Alertes ---- */
.alerte { padding: 12px 18px; border-radius: var(--rayon); margin-bottom: 16px; border: 1px solid; }
.alerte-ok { background: var(--sauge-pale); border-color: #c8d4b9; }
.alerte-info { background: var(--ocre-pale); border-color: var(--liseré); }
.alerte-erreur { background: var(--terra-pale); border-color: #e4bfb3; color: #5c2a1e; }

/* ---- Cartes & formulaires ---- */
.carte { background: var(--carte); border: 1.5px solid var(--liseré); border-radius: var(--rayon); padding: 22px; margin-bottom: 20px; }
.etroite { max-width: 440px; margin: 20px auto; }
.moyenne { max-width: 780px; }
.discret { color: var(--encre-2); font-size: .92rem; }
.formulaire { display: grid; gap: 14px; }
.formulaire label { display: grid; gap: 5px; font-weight: 700; font-size: .93rem; }
.formulaire label small, .aide { font-weight: 400; color: var(--encre-2); font-size: .86rem; }
input, select, textarea {
  font: inherit; color: inherit; padding: 9px 12px; border: 1.5px solid var(--trait); border-radius: 10px; background: #fff; width: 100%;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ocre); outline-offset: 1px; border-color: var(--ocre); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--sauge); }
label.case { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; flex-wrap: wrap; }
fieldset { border: 1.5px solid var(--trait); border-radius: var(--rayon); padding: 12px 16px; margin: 0; display: grid; gap: 10px; }
legend { font-family: var(--titre); font-weight: 700; padding: 0 6px; font-size: .95rem; }
.ligne { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ligne-3 { grid-template-columns: repeat(3, 1fr); }
.boutons { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Titre avec sous-titre souligné ocre, comme dans le journal */
.titre-journal { margin-bottom: 20px; }
.titre-journal .sur { display: flex; align-items: center; gap: 8px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ocre-fonce); font-weight: 700; margin-bottom: 4px; }
.titre-journal .sur svg { width: 38px; height: 18px; color: var(--sauge); }
.titre-journal h1 { margin: 0 0 4px; }
.titre-journal .sous { display: inline-block; font-family: var(--titre); font-weight: 700; color: var(--sauge-fonce); border-bottom: 2.5px solid var(--ocre); padding-bottom: 2px; }
.titre-page { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.titre-page h1 { margin: 0; }

/* ---- Accueil ---- */
.accueil-tete { display: grid; grid-template-columns: 1fr 260px; gap: 24px; align-items: center; margin-bottom: 8px; }
.accueil-tete .mascotte { width: 100%; height: auto; display: block; }
.bulle {
  font-family: var(--main); font-size: 1.45rem; line-height: 1.15; color: var(--terra-fonce);
  background: var(--carte); border: 1.5px solid var(--liseré); border-radius: 18px; padding: 10px 16px; margin: 0 0 10px; position: relative;
}
.bulle::after { content: ""; position: absolute; left: 40%; bottom: -9px; width: 16px; height: 16px; background: var(--carte); border-right: 1.5px solid var(--liseré); border-bottom: 1.5px solid var(--liseré); transform: rotate(45deg); }
.raccourcis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 26px; }
.raccourci {
  display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--rayon); text-decoration: none; color: var(--encre);
  background: var(--carte); border: 1.5px solid var(--liseré); transition: transform .12s, box-shadow .12s;
}
.raccourci:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(60, 50, 20, .08); }
.raccourci svg { width: 30px; height: 30px; color: var(--c, var(--sauge)); }
.raccourci b { font-family: var(--titre); font-size: 1rem; }
.raccourci span { font-size: .86rem; color: var(--encre-2); }
.grille-accueil { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.bloc-titre { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.bloc-titre h2 { margin: 0; }
.bloc-titre a { font-size: .88rem; font-weight: 700; }

/* ---- Actualités ---- */
.actus { display: grid; gap: 16px; }
.actus-grille { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.actu { display: flex; flex-direction: column; background: var(--carte); border: 1.5px solid var(--liseré); border-radius: var(--rayon); overflow: hidden; text-decoration: none; color: var(--encre); }
.actu:hover { box-shadow: 0 6px 16px rgba(60, 50, 20, .08); }
.actu-img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; display: block; background: var(--trait-2); }
.actu-corps { padding: 14px 18px 18px; display: grid; gap: 6px; }
.actu h3 { font-size: 1.08rem; margin: 0; }
.actu p { margin: 0; color: #4a4c48; font-size: .94rem; }
.actu-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .8rem; color: var(--encre-2); }
.cat { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 9px; border-radius: 99px; background: var(--terra-pale); color: var(--terra-fonce); }
.une { background: var(--ocre); color: var(--encre); }
.actu-une { border-color: var(--ocre); border-width: 2px; }
.actu-horiz { flex-direction: row; }
.actu-horiz .actu-img { width: 38%; aspect-ratio: auto; min-height: 150px; }
.evt { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ocre-fonce); font-size: .88rem; }

.article { max-width: 760px; margin: 0 auto; }
.article .actu-img { border-radius: var(--rayon); margin: 6px 0 18px; aspect-ratio: auto; max-height: 460px; object-fit: cover; }
.chapo { font-size: 1.12rem; font-weight: 700; color: var(--sauge-fonce); }
.contenu p, .contenu ul { margin: 0 0 1em; }
.encadre-evt { display: flex; align-items: center; gap: 16px; background: var(--ocre-pale); border-radius: var(--rayon); padding: 12px 16px; margin: 0 0 18px; }

.filtres-cat { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.filtres-cat a { padding: 5px 13px; border-radius: 99px; text-decoration: none; background: var(--carte); border: 1.5px solid var(--trait); font-size: .86rem; font-weight: 700; color: var(--encre-2); }
.filtres-cat a.actif { background: var(--sauge); color: #fff; border-color: var(--sauge); }

/* Gros chiffre ocre façon « À vos agendas » */
.pave-date { display: inline-flex; align-items: center; gap: 6px; line-height: 1; }
.pave-date b { font-family: var(--titre); font-weight: 800; font-size: 2rem; color: var(--ocre); }
.pave-date span { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--encre-2); font-weight: 700; line-height: 1.15; }
.agenda { display: grid; gap: 10px; }
.agenda-ligne { display: flex; gap: 14px; align-items: center; background: var(--carte); border: 1.5px solid var(--liseré); border-radius: var(--rayon); padding: 10px 14px; text-decoration: none; color: var(--encre); }
.agenda-ligne strong { font-family: var(--titre); font-size: .95rem; display: block; }
.agenda-ligne small { color: var(--encre-2); }

/* ---- Cantine ---- */
.semaine-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.semaine-nav h2 { margin: 0 8px; font-size: 1.1rem; }
.menus { display: grid; grid-template-columns: repeat(var(--nb, 4), 1fr); gap: 14px; }
.menu-jour { background: var(--carte); border: 1.5px solid var(--liseré); border-radius: var(--rayon); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.menu-jour.auj { border: 2px solid var(--ocre); box-shadow: 0 0 0 4px var(--ocre-pale); }
.menu-jour header { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px dashed var(--liseré); padding-bottom: 8px; }
.menu-jour .plat-l { display: grid; gap: 1px; }
.menu-jour .plat-l small { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-2); font-weight: 700; }
.menu-jour .plat-l span { font-size: .96rem; }
.menu-jour .plat-l.principal span { font-family: var(--titre); font-weight: 700; color: var(--terra-fonce); }
.menu-jour.vide { opacity: .75; }
.menu-jour .ferme { font-family: var(--main); font-size: 1.35rem; color: var(--sauge-fonce); text-align: center; margin: auto 0; }
.labels { display: flex; gap: 4px; flex-wrap: wrap; }
.label { font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.label-bio { background: #e1ecd2; color: #3d6a24; }
.label-local { background: var(--ocre-pale); color: #7a5713; }
.label-vegetarien { background: #dfece4; color: #2e6648; }
.label-fait_maison { background: var(--terra-pale); color: var(--terra-fonce); }
.menu-du-jour { background: var(--carte); border: 1.5px solid var(--liseré); border-radius: var(--rayon); padding: 16px 18px; }
.menu-du-jour ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 3px; }
.menu-du-jour li b { font-family: var(--titre); color: var(--terra-fonce); }

/* ---- Boîte à idées ---- */
.boite { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.idee { background: var(--carte); border: 1.5px solid var(--liseré); border-left: 6px solid var(--c, var(--sauge)); border-radius: var(--rayon); padding: 14px 18px; margin-bottom: 12px; }
.idee p { margin: 4px 0; }
.idee .reponse { background: var(--sauge-pale); border-radius: 10px; padding: 8px 12px; margin-top: 8px; font-size: .94rem; }
.idee .reponse b { font-family: var(--titre); font-size: .8rem; color: var(--sauge-fonce); display: block; }
.etiq { display: inline-block; font-size: .76rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; white-space: nowrap; }
.etiq-nouvelle { background: var(--ocre-pale); color: #7a5713; }
.etiq-etudiee { background: #e6eef3; color: #3b5f78; }
.etiq-retenue, .etiq-publie { background: var(--sauge-pale); color: var(--sauge-fonce); }
.etiq-realisee { background: var(--sauge); color: #fff; }
.etiq-ecartee, .etiq-brouillon { background: #ece9e1; color: #5f5a50; }

/* ---- Cob'Info (archives) ---- */
.numeros { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.numero { background: var(--carte); border: 1.5px solid var(--liseré); border-radius: var(--rayon); padding: 18px; text-decoration: none; color: var(--encre); display: grid; gap: 6px; position: relative; overflow: hidden; }
.numero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: linear-gradient(90deg, var(--sauge) 0 60%, var(--ocre) 60% 80%, var(--terra) 80%); }
.numero .num { font-family: var(--titre); font-weight: 800; font-size: 2.2rem; color: var(--ocre); line-height: 1; }
.numero b { font-family: var(--titre); }
.cobinfo-teaser { display: flex; gap: 16px; align-items: center; background: var(--sauge); color: #fff; border-radius: var(--rayon); padding: 16px 20px; text-decoration: none; margin-bottom: 22px; }
.cobinfo-teaser .logo-ci { font-family: var(--titre); font-weight: 800; font-size: 1.5rem; letter-spacing: -.01em; }
.cobinfo-teaser .logo-ci em { font-style: normal; color: var(--ocre); }
.cobinfo-teaser span { flex: 1; }
.cobinfo-teaser:hover { background: var(--sauge-fonce); }

/* ---- Tableaux ---- */
.tableau { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--carte); border: 1.5px solid var(--liseré); border-radius: var(--rayon); overflow: hidden; }
.tableau th, .tableau td { padding: 10px 12px; border-bottom: 1px solid var(--trait-2); text-align: left; vertical-align: top; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau th { background: var(--ocre-pale); font-family: var(--titre); font-size: .85rem; }
.droite { text-align: right !important; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.actions form { margin: 0; }
tr.inactif td, .inactif { opacity: .6; }
.vignette { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; display: block; }

/* ---- Gestion ---- */
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 24px; }
.tuile { background: var(--carte); border: 1.5px solid var(--liseré); border-radius: var(--rayon); padding: 16px 18px; text-decoration: none; color: var(--encre); }
.tuile .chiffre { font-family: var(--titre); font-weight: 800; font-size: 2rem; color: var(--ocre); line-height: 1; }
.tuile b { display: block; font-family: var(--titre); margin-top: 4px; }
.saisie-menus { display: grid; grid-template-columns: repeat(var(--nb, 4), 1fr); gap: 12px; }
.saisie-menus .carte { padding: 14px; margin: 0; display: grid; gap: 8px; }
.saisie-menus input { padding: 7px 10px; font-size: .92rem; }
.saisie-menus label { font-weight: 700; font-size: .78rem; display: grid; gap: 3px; color: var(--encre-2); }
.choix-actus { display: grid; gap: 6px; max-height: 380px; overflow: auto; padding: 4px; }
.choix-actus label { background: #fff; border: 1.5px solid var(--trait); border-radius: 10px; padding: 8px 10px; align-items: flex-start !important; }
.choix-actus label:has(input:checked) { border-color: var(--sauge); background: var(--sauge-pale); }
.choix-actus input[type=number] { width: 58px; padding: 3px 6px; margin-left: auto; }
.cote { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.apercu-cadre { width: 100%; height: 75vh; border: 1.5px solid var(--liseré); border-radius: var(--rayon); background: #fff; }
.barre-actions { position: sticky; bottom: 0; background: var(--papier); padding: 10px 0; z-index: 5; border-top: 1px solid var(--trait); }
.zone-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; min-height: 160px; }

/* ---- Vide ---- */
.vide { color: var(--encre-2); background: var(--carte); border: 1.5px dashed var(--liseré); border-radius: var(--rayon); padding: 22px; text-align: center; }
.vide span { font-family: var(--main); font-size: 1.4rem; color: var(--sauge-fonce); display: block; }

/* ---- Connexion ---- */
.accueil-connexion { display: grid; grid-template-columns: minmax(0, 440px) 280px; gap: 28px; justify-content: center; align-items: end; margin: 10px auto; }
.accueil-connexion .carte { margin: 0; }
.accueil-connexion .mascotte { width: 100%; height: auto; display: block; }


/* ============ Icônes dans les boutons ============ */
.btn svg { width: 17px; height: 17px; flex: none; }
h2 svg, .bloc-titre h2 svg { width: 22px; height: 22px; vertical-align: -4px; color: var(--terra); }

/* ============ Bandeau d'alerte (toutes les pages) ============ */
.bandeau-alerte { background: var(--c); color: #fff; }
.ba-in { max-width: 1180px; margin: 0 auto; padding: 9px 16px; display: flex; align-items: center; gap: 12px; }
.ba-niveau { display: inline-flex; align-items: center; gap: 5px; font-family: var(--titre); font-weight: 800; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; background: rgba(255,255,255,.2); padding: 3px 10px; border-radius: 99px; flex: none; }
.ba-niveau svg { width: 15px; height: 15px; }
.ba-in a { color: #fff; text-decoration: none; flex: 1; min-width: 0; line-height: 1.35; }
.ba-in a span { opacity: .92; }
.ba-fermer { background: none; border: 0; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 4px; opacity: .8; }
.niveau-urgence { animation: pulse-urgence 2.4s ease-in-out infinite; }
@keyframes pulse-urgence { 50% { filter: brightness(1.12); } }
@media (prefers-reduced-motion: reduce) { .niveau-urgence { animation: none; } }

/* ============ Onglets de rubriques, recherche ============ */
.onglets-rub { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.onglets-rub a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 99px; text-decoration: none; background: var(--carte);
  border: 1.5px solid var(--trait); font-family: var(--titre); font-weight: 700; font-size: .88rem; color: var(--encre); }
.onglets-rub a svg { width: 19px; height: 19px; color: var(--c, var(--sauge)); }
.onglets-rub a small { background: var(--trait-2); border-radius: 99px; padding: 0 7px; font-size: .74rem; color: var(--encre-2); }
.onglets-rub a.actif { background: var(--c, var(--sauge)); border-color: var(--c, var(--sauge)); color: #fff; }
.onglets-rub a.actif svg { color: #fff; }
.onglets-rub a.actif small { background: rgba(255,255,255,.25); color: #fff; }
.outils-liste { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.recherche input { width: 230px; border-radius: 99px; padding: 7px 14px; }

/* ============ Annonces ============ */
.annonces { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.annonce { display: flex; gap: 0; background: var(--carte); border: 1.5px solid var(--liseré); border-left: 5px solid var(--c); border-radius: var(--rayon); overflow: hidden; text-decoration: none; color: var(--encre); min-height: 128px; }
.annonce:hover { box-shadow: 0 6px 16px rgba(60, 50, 20, .08); }
.an-photo { width: 112px; flex: none; object-fit: cover; background: var(--trait-2); }
.an-sans-photo { display: flex; align-items: center; justify-content: center; color: var(--c); background: color-mix(in srgb, var(--c) 10%, white); }
.an-sans-photo svg { width: 44px; height: 44px; opacity: .8; }
.an-corps { padding: 11px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.an-corps strong { font-family: var(--titre); font-size: .98rem; line-height: 1.25; }
.an-type { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: color-mix(in srgb, var(--c) 80%, black); }
.an-prix { font-family: var(--titre); font-weight: 800; color: var(--ocre-fonce); }
.an-texte { font-size: .88rem; color: #4a4c48; }
.an-corps small { color: var(--encre-2); font-size: .78rem; margin-top: auto; }
.annonce-compacte { min-height: 0; }
.annonce-compacte .an-photo { width: 84px; }
.avis-urgents { background: var(--terra-pale); border: 1.5px solid #e4bfb3; border-radius: var(--rayon); padding: 14px 16px; margin: 6px 0 22px; }
.avis-urgents h2 { color: var(--terra-fonce); }
.an-type-etiq { display: inline-block; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 11px; border-radius: 99px; background: var(--c); color: #fff; }

.fiche-annonce { max-width: 1040px; margin: 0 auto; }
.fa-grille { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 26px; margin-top: 12px; align-items: start; }
.fa-photo { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--rayon); display: block; border: 1.5px solid var(--liseré); }
.fa-infos { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 6px; }
.fa-infos li { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding-bottom: 6px; border-bottom: 1px dashed var(--trait); }
.fa-infos b { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--encre-2); padding-top: 2px; }
details.signaler summary { font-size: .88rem; color: var(--encre-2); font-weight: 400; }

.form-annonce .seulement-annonces, .form-annonce .seulement-recherche { display: none; }
.form-annonce[data-type="vends"] .seulement-annonces { display: grid; }
.form-annonce[data-rubrique="recherche"] .seulement-recherche { display: grid; }
.etapes { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.charte { margin: 0; padding-left: 1.2em; display: grid; gap: 5px; font-size: .92rem; }
.pictos-ok svg { width: 54px; height: 54px; color: var(--sauge); }

.etiq-annonce-a_confirmer, .etiq-annonce-en_attente { background: var(--ocre-pale); color: #7a5713; }
.etiq-annonce-publie { background: var(--sauge-pale); color: var(--sauge-fonce); }
.etiq-annonce-termine { background: #ece9e1; color: #5f5a50; }
.etiq-annonce-refuse, .etiq-annonce-retire { background: var(--terra-pale); color: var(--terra-fonce); }
.mod-grille { display: flex; gap: 16px; align-items: flex-start; }
.mod-grille > div { flex: 1; min-width: 0; }
.mod-photo { width: 130px; height: 130px; object-fit: cover; border-radius: 10px; display: block; }
.decision-annonce { display: grid; gap: 8px; margin-top: 10px; }

/* ============ Alertes ============ */
.carte-alerte { background: var(--carte); border: 1.5px solid var(--liseré); border-left: 6px solid var(--c); border-radius: var(--rayon); padding: 14px 18px; margin-bottom: 12px; }
.carte-alerte h3 { margin: 6px 0 4px; }
.etiq-niveau { display: inline-flex; align-items: center; gap: 4px; background: var(--c); color: #fff; font-weight: 800; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; padding: 2px 10px; border-radius: 99px; }
.etiq-niveau svg { width: 13px; height: 13px; }
.alerte-passee { background: var(--carte); border: 1.5px solid var(--trait); border-left: 4px solid var(--c); border-radius: 10px; padding: 9px 14px; margin-bottom: 8px; }
.alerte-passee summary { color: var(--encre); font-weight: 400; }
.alerte-passee .contenu { margin-top: 8px; font-size: .94rem; }
.notif-carte { border-color: var(--ocre); border-width: 2px; }
.notif-carte h2 { display: flex; align-items: center; gap: 8px; }
.numeros-urgence { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 5px; }
.numeros-urgence b { display: inline-block; min-width: 46px; font-family: var(--titre); font-size: 1.15rem; color: var(--terra-fonce); }
.tuile-mini { background: var(--carte); border: 1.5px solid var(--liseré); border-radius: 12px; padding: 8px 14px; display: grid; }
.tuile-mini b { font-family: var(--titre); font-size: 1.3rem; color: var(--ocre); line-height: 1.1; }
.tuile-mini small { color: var(--encre-2); }
.niveaux { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.niveau-choix { display: flex !important; gap: 8px; align-items: flex-start; border: 1.5px solid var(--trait); border-radius: 12px; padding: 10px; cursor: pointer; font-weight: 400 !important; }
.niveau-choix:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, white); }
.niveau-choix b { color: var(--c); font-family: var(--titre); display: block; }
.niveau-choix small { color: var(--encre-2); font-size: .8rem; line-height: 1.3; display: block; }
.niveau-choix input { margin-top: 3px; accent-color: var(--c); }
label.case.prioritaire { background: var(--ocre-pale); border-radius: 10px; padding: 10px 12px; align-items: flex-start; flex-wrap: nowrap; }
label.case.prioritaire input { margin-top: 4px; }

/* ============ Signalements ============ */
.urgence-rappel { display: flex; gap: 12px; align-items: flex-start; }
.urgence-rappel svg { width: 24px; height: 24px; flex: none; color: #c0392b; }
.position { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: -4px; }
.signal { background: var(--carte); border: 1.5px solid var(--liseré); border-radius: var(--rayon); padding: 12px 16px; margin-bottom: 10px; }
.signal strong { font-family: var(--titre); display: block; margin-top: 4px; }
.signal p { margin: 3px 0 0; font-size: .92rem; color: #4a4c48; }
.signal .reponse { background: var(--sauge-pale); border-radius: 10px; padding: 7px 11px; margin-top: 8px; font-size: .9rem; }
.signal .reponse b { display: block; font-family: var(--titre); font-size: .76rem; color: var(--sauge-fonce); }
.signal.statut-resolu { opacity: .78; }
.signal-photo { float: right; width: 74px; height: 74px; object-fit: cover; border-radius: 10px; margin: 0 0 6px 10px; }
.signal.meme-cat { border-color: var(--ocre); box-shadow: 0 0 0 2px var(--ocre-pale); }
.signal::after { content: ""; display: block; clear: both; }
.etiq-sig-nouveau { background: var(--terra-pale); color: var(--terra-fonce); }
.etiq-sig-en_cours { background: var(--ocre-pale); color: #7a5713; }
.etiq-sig-resolu { background: var(--sauge); color: #fff; }
.etiq-sig-clos { background: #ece9e1; color: #5f5a50; }
.suivi { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; counter-reset: e; }
.suivi li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-weight: 700; font-size: .88rem; color: var(--encre-2); position: relative; }
.suivi li span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--trait-2); font-family: var(--titre); font-weight: 800; z-index: 1; }
.suivi li:not(:first-child)::before { content: ""; position: absolute; top: 17px; right: 50%; width: 100%; height: 3px; background: var(--trait-2); }
.suivi li.fait { color: var(--sauge-fonce); }
.suivi li.fait span, .suivi li.fait::before { background: var(--sauge); color: #fff; }
.reponse-mairie { background: var(--sauge-pale); border-radius: 12px; padding: 12px 16px; }
.reponse-mairie b { display: block; font-family: var(--titre); color: var(--sauge-fonce); margin-bottom: 3px; }
.reponse-mairie small { display: block; color: var(--encre-2); margin-top: 4px; }
.carte-signaler { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--encre); background: #fbecea; border-color: #ecc4bb; }
.carte-signaler svg { width: 34px; height: 34px; color: #c0392b; flex: none; }
.carte-signaler b { font-family: var(--titre); display: block; }
.carte-signaler small { color: var(--encre-2); }
.carte-signaler:hover { box-shadow: 0 6px 16px rgba(60, 50, 20, .08); }

/* ============ Annuaire ============ */
.groupe-annuaire { font-size: 1rem; margin: 22px 0 10px; color: var(--sauge-fonce); border-bottom: 2px solid var(--liseré); padding-bottom: 4px; }
.annuaire-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.fiche-annuaire { display: flex; gap: 12px; align-items: center; background: var(--carte); border: 1.5px solid var(--liseré); border-radius: var(--rayon); padding: 12px 14px; text-decoration: none; color: var(--encre); }
.fiche-annuaire:hover { box-shadow: 0 6px 16px rgba(60, 50, 20, .08); }
.ann-photo { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; flex: none; background: #fff; border: 1px solid var(--trait); }
.ann-initiale { display: grid; place-items: center; font-family: var(--titre); font-weight: 800; font-size: 1.5rem; color: #fff; background: #4f7591; border: 0; }
.genre-talent .ann-initiale, .ann-initiale.talent { background: var(--ocre); }
.ann-photo.grande { width: 92px; height: 92px; border-radius: 16px; font-size: 2.3rem; }
.ann-corps { display: grid; gap: 1px; min-width: 0; }
.ann-corps small { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-2); font-weight: 700; }
.ann-corps strong { font-family: var(--titre); font-size: 1rem; }
.ann-corps span { font-size: .9rem; color: #4a4c48; }
.ann-tel { font-weight: 700; color: var(--sauge-fonce) !important; }
.ann-entete { display: flex; gap: 16px; align-items: center; }
.form-fiche[data-genre="talent"] .seulement-pro, .form-fiche[data-genre="pro"] .seulement-talent { display: none !important; }

/* ============ Gestion ============ */
.tuile.a-faire { border-color: var(--terra); box-shadow: inset 4px 0 0 var(--terra); }
.tuile.a-faire .chiffre { color: var(--terra); }
.raccourcis-menu { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 900px) {
  .fa-grille, .niveaux { grid-template-columns: 1fr; }
  .recherche, .recherche input { width: 100%; }
  .outils-liste { flex-direction: column; align-items: stretch; }
  .filtres-cat { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .filtres-cat a { flex: none; }
  .onglets-rub { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .onglets-rub a { flex: none; }
  .annonces, .annuaire-liste { grid-template-columns: 1fr; }
  .an-photo { width: 96px; }
  .an-media { width: 96px; }
  .mod-medias { width: 100%; flex-direction: row; overflow-x: auto; }
  .mod-medias .mod-photo { width: 140px; height: 110px; flex: none; }
  .galerie { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .raccourcis-menu { grid-template-columns: 1fr 1fr; }
  .raccourcis:not(.raccourcis-menu) { grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 20px; }
  .raccourcis:not(.raccourcis-menu) .raccourci { padding: 10px 4px; align-items: center; text-align: center; gap: 4px; }
  .raccourcis:not(.raccourcis-menu) .raccourci span { display: none; }
  .raccourcis:not(.raccourcis-menu) .raccourci b { font-size: .72rem; line-height: 1.15; }
  .raccourcis:not(.raccourcis-menu) .raccourci svg { width: 26px; height: 26px; }
  .mod-grille { flex-direction: column; }
  .mod-photo { width: 100%; height: 180px; }
  .fa-infos li { grid-template-columns: 100px 1fr; }
  .ba-in { padding: 8px 12px; font-size: .9rem; }
  .ba-in a span { display: none; }
  .titre-page > .btn { width: 100%; justify-content: center; }
}

/* ============ Photos et vidéos ============ */
.actu-media, .an-media { position: relative; display: block; }
.an-media { flex: none; width: 112px; }
.an-media .an-photo { width: 100%; height: 100%; }
.pastille-medias { position: absolute; right: 8px; bottom: 8px; display: inline-flex; gap: 4px; }
.pastille-medias span { background: rgba(31, 33, 35, .72); color: #fff; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; line-height: 1.4; }
.pastille-medias .pm-video { background: var(--terra); }
td .pastille-medias { right: 4px; bottom: 4px; }
.galerie-item.couverture { display: block; cursor: zoom-in; }
.medias-bloc { display: grid; gap: 12px; margin: 18px 0; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.galerie-item { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--trait-2); cursor: zoom-in; }
.galerie-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.galerie-item:hover img { transform: scale(1.04); }
.video-cadre { border-radius: var(--rayon); overflow: hidden; background: #111; border: 1.5px solid var(--liseré); }
.video-cadre video { width: 100%; max-height: 70vh; display: block; background: #111; }
.video-integree { aspect-ratio: 16 / 9; }
.video-integree > * { width: 100%; height: 100%; border: 0; display: block; }

.visionneuse { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.visionneuse::backdrop { background: rgba(15, 16, 17, .92); }
.visionneuse img { position: absolute; inset: 0; margin: auto; max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: 6px; }
.visionneuse button { position: absolute; background: rgba(255,255,255,.14); color: #fff; border: 0; cursor: pointer; font-size: 2rem; line-height: 1; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; }
.visionneuse button:hover { background: rgba(255,255,255,.28); }
.v-fermer { top: 14px; right: 14px; }
.v-prec { left: 14px; top: 50%; transform: translateY(-50%); }
.v-suiv { right: 14px; top: 50%; transform: translateY(-50%); }
.visionneuse.seule .v-prec, .visionneuse.seule .v-suiv { display: none; }
.v-compteur { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #ddd; font-size: .9rem; }

.champ-medias { gap: 12px; }
.medias-existants { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.me-item { position: relative; background: #fff; border: 1.5px solid var(--trait); border-radius: 10px; padding: 6px; display: grid; gap: 4px; }
.me-item img, .me-item video, .me-lien { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; background: #222; }
.me-lien { display: grid; place-items: center; color: #fff; font-weight: 700; }
.me-type { position: absolute; top: 10px; left: 10px; background: var(--terra); color: #fff; font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.me-item label.case { font-size: .8rem; gap: 5px; }
.me-item:has(.me-retirer input:checked) { opacity: .45; border-color: var(--terra); }
.apercu-envoi { display: flex; flex-wrap: wrap; gap: 8px; }
.apercu-envoi:empty { display: none; }
.ae-item { width: 92px; display: grid; gap: 2px; }
.ae-item img, .ae-item > span { width: 92px; height: 70px; object-fit: cover; border-radius: 8px; display: grid; place-items: center; background: #333; color: #fff; font-size: 1.5rem; }
.ae-item small { font-size: .72rem; color: var(--encre-2); }
.ae-trop small { color: var(--terra-fonce); font-weight: 700; }
.ae-trop > span { background: var(--terra); }
.envoi-progression { display: grid; gap: 4px; }
.ep-barre { height: 10px; background: var(--trait-2); border-radius: 99px; overflow: hidden; }
.ep-barre span { display: block; height: 100%; width: 0; background: var(--sauge); transition: width .2s; }
.mod-medias { display: flex; flex-direction: column; gap: 6px; width: 130px; flex: none; }
.mod-medias .galerie-item { aspect-ratio: auto; }

/* ============ Inscription et adresses ============ */
.champ-adresse { position: relative; }
.champ-adresse input[name=adresse] { width: 100%; }
.champ-adresse.ok input[name=adresse] { border-color: var(--sauge); background: var(--sauge-pale); }
.champ-adresse .suggestions { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: #fff; border: 1.5px solid var(--liseré); border-radius: 12px; box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.champ-adresse .suggestions li { padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.champ-adresse .suggestions li:hover, .champ-adresse .suggestions li:focus { background: var(--sauge-pale); outline: none; }
.champ-adresse .suggestions li.aucune { color: var(--encre-2); cursor: default; font-size: .9rem; }
.choix-type .case { align-items: flex-start; }
#form-inscription:has(input[name=type][value=parent]:checked) .si-habitant,
#form-inscription:has(input[name=type][value=habitant]:checked) .si-parent { display: none; }
.a-valider { border-left: 4px solid var(--ocre); }
.ligne-validation { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px dashed var(--liseré); }

/* ============ Planning des salles ============ */
.agenda-salles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.agenda-salles .carte { margin: 0; }
.resa { display: grid; grid-template-columns: 92px 1fr; gap: 8px; padding: 6px 0 6px 10px; border-left: 4px solid var(--c); margin-bottom: 6px; }
.resa-h { font-family: var(--titre); font-weight: 700; font-size: .85rem; color: var(--encre-2); }
.resa small { display: block; color: var(--encre-2); }

/* ============ Rappels d'événements ============ */
.cases-rappels { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.cases-rappels .case { margin: 0; }
.rappel-evt { display: grid; gap: 8px; padding: 12px 0; border-top: 1px dashed var(--liseré); }

/* ============ Cob'Info en PDF ============ */
.ci-pdf { max-width: 900px; margin: 0 auto 22px; display: grid; gap: 12px; }
.ci-pdf-lecteur { width: 100%; height: 80vh; border: 1.5px solid var(--liseré); border-radius: var(--rayon); background: #fff; }
.ci-pdf-titre { max-width: 900px; margin: 10px auto 12px; }
@media (max-width: 900px) { .ci-pdf-lecteur { display: none; } }

/* ============ Accès privé : page de connexion seule ============ */
.prive-invite .menu, .prive-invite .barre-bas, .prive-invite .pied-liens { display: none !important; }
.prive-invite { padding-bottom: 0 !important; }

/* ---- Téléphone ---- */
@media (max-width: 900px) {
  .surtitre { display: none; }
  .bandeau-in { min-height: 0; }
  .marque img { width: 44px; height: 44px; }
  .marque .t1 { font-size: 1.12rem; }
  .marque .t2 { font-size: 1.05rem; }
  .menu { display: none; }              /* la barre du bas suffit sur téléphone */
  .marque .t2 { display: none; }
  .marque { padding: 10px 0 8px; }
  .barre-bas {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--carte);
    border-top: 1.5px solid var(--liseré); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 14px rgba(60, 50, 20, .06);
  }
  .barre-bas a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px; text-decoration: none; color: var(--encre-2); font-size: .7rem; font-weight: 700; border-radius: 10px; }
  .barre-bas a svg { width: 24px; height: 24px; }
  .barre-bas a.actif { color: var(--sauge-fonce); background: var(--sauge-pale); }
  body { padding-bottom: 68px; }
  .accueil-tete, .grille-accueil, .boite, .cote, .ligne, .ligne-3, .accueil-connexion { grid-template-columns: 1fr; }
  .accueil-tete .mascotte-zone { display: none; }
  .raccourcis { grid-template-columns: 1fr 1fr; }
  .menus, .saisie-menus { grid-template-columns: 1fr; }
  .actu-horiz { flex-direction: column; }
  .actu-horiz .actu-img { width: 100%; aspect-ratio: 16 / 9; min-height: 0; }
  .accueil-connexion .mascotte-zone { order: -1; max-width: 200px; margin: 0 auto; }
  .tableau, .tableau tbody, .tableau tr, .tableau td { display: block; width: 100%; }
  .tableau thead { display: none; }
  .tableau tr { border-bottom: 2px solid var(--liseré); }
  .tableau td { border: 0; padding: 4px 12px; }
  .droite { text-align: left !important; }
  .actions { justify-content: flex-start; padding-bottom: 10px !important; }
  .page { padding-top: 18px; }
  .barre-actions { bottom: 64px; }
  .semaine-nav { flex-wrap: nowrap; }
  .semaine-nav h2 { font-size: .95rem; margin: 0 2px; text-align: center; flex: 1; }
  .menus { gap: 10px; }
  .menu-jour { padding: 12px 14px; gap: 4px; }
  .menu-jour .plat-l small { display: none; }
  .menu-jour .plat-l.principal span { font-size: 1.02rem; }
  h1 { font-size: 1.4rem; }
}
@media print {
  .bandeau .compte, .menu, .sous-menu, .barre-bas, .pied, .semaine-nav .btn { display: none !important; }
  body { padding: 0; background: #fff; }
  .page { padding: 0; }
}
