/* ObjetsThèque Saint-Mathieu
   Couleurs reprises du site de la Commune de Bernex (vert, jaune, rouge) et du logo (jaune pâle).
   Mobile d'abord, texte grand, contrastes AA. */
:root {
  --vert: #12a059;
  --vert-fonce: #0b7340;
  --vert-pale: #e7f6ee;
  --jaune: #fbb300;
  --jaune-logo: #ffff91;
  --jaune-pale: #fffbd6;
  --rouge: #c40000;
  --orange: #b35c00;
  --texte: #212529;
  --texte-doux: #555e66;
  --fond: #fafafa;
  --blanc: #fff;
  --bord: #dee2e6;
  --rayon: 12px;
  --ombre: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 12px rgba(0, 0, 0, .05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Arial, "Helvetica Neue", Helvetica, system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--texte);
  background: var(--fond);
}
img { max-width: 100%; height: auto; }
a { color: var(--vert-fonce); text-underline-offset: 3px; }
a:hover { color: var(--texte); }
:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; color: var(--vert-fonce); }
h3 { font-size: 1.15rem; margin-top: 1em; }
.petit { font-size: .95rem; color: var(--texte-doux); }

.evitement { position: absolute; left: -9999px; }
.evitement:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--blanc); padding: .5rem 1rem; }

/* En-tête */
.entete { background: var(--blanc); border-bottom: 5px solid var(--vert); }
.entete-int {
  max-width: 72rem; margin: 0 auto; padding: .6rem 1rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem;
}
.marque { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--texte); }
.marque img { width: 64px; height: auto; border-radius: 10px; }
.marque strong { display: block; font-size: 1.35rem; color: var(--vert-fonce); }
.marque small { display: block; font-size: .95rem; color: var(--texte-doux); }
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.menu a {
  display: block; padding: .55rem .9rem; border-radius: 999px;
  text-decoration: none; font-weight: bold; color: var(--texte);
}
.menu a:hover { background: var(--vert-pale); }
.menu a[aria-current="page"] { background: var(--vert-fonce); color: var(--blanc); }
.langues { display: flex; align-items: center; margin-left: .3rem; border: 2px solid var(--bord); border-radius: 999px; overflow: hidden; }
.menu .langues a { border-radius: 0; padding: .45rem .7rem; font-size: .95rem; color: var(--texte-doux); }
.menu .langues a + a { border-left: 2px solid var(--bord); }
.menu .langues a[aria-current="true"] { background: var(--vert-pale); color: var(--vert-fonce); }

/* Badge « Site en test » (période d'essai) : juste à droite du logo ; bande fine en haut sur téléphone */
.site-test { display: flex; align-items: center; gap: .3rem; margin: 0 auto 0 -.6rem; font-weight: bold; color: #9a3412; font-size: .95rem; }
.site-test span { padding: .2rem .7rem; border: 2px dashed #f26b1d; border-radius: 999px; background: #fff4e8; white-space: nowrap; }
.site-test .cone { flex: none; }
@media (max-width: 699px) {
  .site-test { order: -1; width: 100%; justify-content: center; margin: 0; font-size: .9rem; }
  .site-test span { padding: .15rem .7rem; }
  .site-test .cone { width: 17px; height: 20px; }
}

/* Corps */
.page { max-width: 72rem; margin: 0 auto; padding: 1rem; }
.bloc { margin: 1.5rem 0 2.5rem; }
.fil { margin: .5rem 0 1rem; }
.fil a { font-weight: bold; }

/* Boutons et champs */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 3rem; padding: .6rem 1.3rem;
  background: var(--vert-fonce); color: var(--blanc);
  border: 2px solid var(--vert-fonce); border-radius: var(--rayon);
  font: inherit; font-weight: bold; text-decoration: none; cursor: pointer;
}
.bouton:hover { background: var(--texte); border-color: var(--texte); color: var(--blanc); }
.bouton-secondaire { background: var(--blanc); color: var(--vert-fonce); }
.bouton-secondaire:hover { background: var(--vert-pale); color: var(--vert-fonce); border-color: var(--vert-fonce); }
input[type="search"], input[type="text"], input[type="email"], input[type="tel"], input[type="password"], select {
  width: 100%; min-height: 3rem; padding: .5rem .8rem;
  font: inherit; color: var(--texte); background: var(--blanc);
  border: 2px solid #8a939b; border-radius: var(--rayon);
}
input:focus, select:focus { border-color: var(--vert-fonce); }

/* Formulaires de compte */
.formulaire-etroit { max-width: 38rem; }
.texte-long { max-width: 46rem; }
.texte-long ul { padding-left: 1.3rem; }
.texte-long li { margin: .3rem 0; }
.charte li { margin: .6rem 0; }
fieldset { border: 0; padding: 0; margin: 0 0 1.2rem; }
legend { font-size: 1.2rem; font-weight: bold; color: var(--vert-fonce); margin-bottom: .4rem; }
form .champ { margin-bottom: 1rem; }
.ligne-champs { display: grid; grid-template-columns: 7rem 1fr; gap: 0 .8rem; }
.aide { margin: 0 0 .3rem; font-size: .95rem; color: var(--texte-doux); }
.message-erreur { margin: 0 0 .3rem; font-weight: bold; color: var(--rouge); }
.champ-erreur input { border-color: var(--rouge); }
.libelle { display: block; font-weight: bold; margin-bottom: .3rem; }
.valeur-fixe { margin: 0; padding: .5rem 0; }
.champ-case { align-items: flex-start; flex-wrap: wrap; }
.champ-case label { font-weight: normal; flex: 1 1 0; }
.champ-case .message-erreur { flex-basis: 100%; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.message { padding: .8rem 1rem; border-radius: var(--rayon); margin: 0 0 1rem; border-left: 6px solid; }
.message-succes { background: var(--vert-pale); border-color: var(--vert); }
.message.message-erreur { background: #fde8e8; border-color: var(--rouge); color: var(--texte); font-weight: normal; }
.message-info { background: var(--jaune-pale); border-color: var(--jaune); }
.zone-danger { margin: 2rem 0 1.5rem; padding: .8rem 1rem; border: 2px solid #f1b0b0; border-radius: var(--rayon); background: var(--blanc); }
.zone-danger summary { cursor: pointer; font-weight: bold; color: var(--rouge); }
.bouton-danger { background: var(--rouge); border-color: var(--rouge); }
.deconnexion { margin-top: 2rem; }
.lien-compte { border: 2px solid var(--vert-fonce); }
input[type="checkbox"] { width: 1.6rem; height: 1.6rem; accent-color: var(--vert-fonce); }
label { font-weight: bold; }

/* Accueil */
.accueil-hero {
  margin: 1rem 0 2rem; padding: 1.5rem 1.2rem;
  background: var(--jaune-logo); border-radius: 20px;
  border-bottom: 6px solid var(--jaune);
}
.accueil-hero { display: grid; gap: 1rem; justify-items: start; }
.hero-logo { width: 180px; border-radius: 16px; }
.accueil-hero h1 { font-size: 2.1rem; }
.accueil-hero .intro { font-size: 1.2rem; max-width: 40rem; }
.recherche-rapide label { display: block; margin-bottom: .3rem; }
.ligne-recherche { display: flex; gap: .5rem; flex-wrap: wrap; max-width: 36rem; }
.ligne-recherche input { flex: 1 1 14rem; }
.chiffres { margin-bottom: 0; }

.tuiles-categories { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .8rem; }
.tuile {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 4.5rem; padding: .8rem; border-radius: var(--rayon);
  background: var(--blanc); border: 2px solid var(--vert); box-shadow: var(--ombre);
  font-weight: bold; font-size: 1.15rem; color: var(--vert-fonce); text-decoration: none;
}
.tuile:hover { background: var(--vert-pale); color: var(--vert-fonce); }
.tuile-tout { background: var(--vert-fonce); color: var(--blanc); border-color: var(--vert-fonce); }
.tuile-tout:hover { background: var(--texte); color: var(--blanc); }

.infos { display: grid; gap: 1rem 2rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); background: var(--blanc); padding: 1rem 1.2rem; border-radius: var(--rayon); box-shadow: var(--ombre); }
.infos h3:first-child { margin-top: 0; }
.horaires { border-collapse: collapse; font-size: 1.15rem; }
.horaires th { text-align: left; padding: .2rem 1.2rem .2rem 0; }
.etapes { padding-left: 1.4rem; }
.etapes li { margin: .4rem 0; }

/* Catalogue */
.filtres {
  display: grid; gap: .9rem 1rem; grid-template-columns: 1fr;
  background: var(--blanc); padding: 1rem; border-radius: var(--rayon); box-shadow: var(--ombre);
}
.champ label { display: block; margin-bottom: .3rem; }
.champ-case { display: flex; align-items: center; gap: .6rem; }
.champ-case label { margin: 0; }
.champ-boutons { display: flex; flex-wrap: wrap; gap: .6rem; }
.compte { font-weight: bold; margin: 1rem 0 .6rem; }
.vide { background: var(--blanc); padding: 1rem 1.2rem; border-radius: var(--rayon); }

.grille { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: .9rem; grid-template-columns: repeat(2, 1fr); }
.carte {
  display: flex; flex-direction: column; height: 100%;
  background: var(--blanc); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden;
  text-decoration: none; color: var(--texte); border: 2px solid transparent;
}
.carte:hover { border-color: var(--vert); color: var(--texte); }
.carte-image { display: block; position: relative; aspect-ratio: 1; overflow: hidden; background: var(--blanc); border-bottom: 1px solid var(--bord); }
.carte-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: .4rem; }
.carte-texte { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; padding: .6rem .7rem .8rem; }
.carte-nom { font-weight: bold; font-size: 1.05rem; line-height: 1.3; }
.carte-meta { font-size: .9rem; color: var(--texte-doux); }
.sans-photo { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--texte-doux); font-size: .95rem; }
.sans-photo.grande { aspect-ratio: 4 / 3; background: var(--blanc); border-radius: var(--rayon); }

.badge { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .9rem; font-weight: bold; }
.badge-disponible { background: var(--vert-pale); color: var(--vert-fonce); }
.badge-en_pret { background: #fff0db; color: var(--orange); }
.badge-indisponible { background: #fde8e8; color: var(--rouge); }
.etiquette { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .9rem; background: #eef0f2; color: var(--texte); }
.etiquette-confie { background: var(--jaune-pale); border: 1px solid var(--jaune); }

/* Fiche objet */
.fiche { display: grid; gap: 1.5rem; }
.photo-principale { display: block; background: var(--blanc); border-radius: var(--rayon); box-shadow: var(--ombre); padding: .6rem; }
.photo-principale img { display: block; margin: 0 auto; max-height: 70vh; width: auto; }
.photos-plus { list-style: none; padding: 0; margin: .7rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.photos-plus img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 2px solid var(--bord); background: var(--blanc); }
.photos-plus a:hover img { border-color: var(--vert); }
.fiche-etat { display: flex; flex-wrap: wrap; gap: .4rem; }
.description p { margin: 0 0 .7em; }
.details { border-collapse: collapse; width: 100%; margin: 1rem 0; background: var(--blanc); border-radius: var(--rayon); overflow: hidden; }
.details th, .details td { text-align: left; padding: .5rem .8rem; border-bottom: 1px solid var(--bord); vertical-align: top; }
.details th { width: 9rem; color: var(--texte-doux); font-weight: normal; }
.details tr:last-child th, .details tr:last-child td { border-bottom: 0; }
.encadre { margin-top: 1.5rem; padding: 1rem 1.2rem; background: var(--jaune-pale); border-left: 6px solid var(--jaune); border-radius: var(--rayon); }
.encadre h2 { font-size: 1.2rem; color: var(--texte); }
.encadre p:last-child { margin-bottom: 0; }

/* Administration */
.entete-admin { border-bottom-color: var(--jaune); }
/* En-tête de l'administration : logo et compte en haut, menu en dessous (travail courant | outils) */
.entete-admin .entete-int { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .6rem 1rem; padding-bottom: 0; }
.entete-admin .marque { min-width: 0; }
.admin-compte { display: flex; align-items: center; gap: .6rem; }
.admin-public { font-size: .95rem; color: var(--texte-doux); }
.admin-moi { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .9rem .3rem .3rem; border: 2px solid var(--bord);
  border-radius: 999px; text-decoration: none; font-weight: bold; color: var(--texte); }
.admin-moi:hover, .admin-moi[aria-current="page"] { border-color: var(--vert-fonce); }
.admin-initiale { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--vert-fonce); color: var(--blanc); }
.admin-menu { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem;
  border-top: 1px solid var(--bord); padding: .45rem 0; }
.admin-menu .menu { gap: .15rem; }
.admin-menu .menu a { padding: .45rem .8rem; font-size: 1rem; }
.admin-menu .menu-outils { padding-left: 1rem; border-left: 2px solid var(--bord); }
.admin-menu .menu-outils a { font-weight: 600; color: var(--texte-doux); font-size: .95rem; }
.admin-menu .menu-outils a[aria-current="page"] { color: var(--blanc); }
@media (max-width: 699px) {
  .admin-public { display: none; }
  .entete-admin .marque img { width: 48px; }
  .entete-admin .marque small { display: none; }
  .entete-admin .marque strong { font-size: 1.15rem; }
  /* Téléphone : l'initiale seule ; le prénom reste lu par les lecteurs d'écran */
  .admin-moi { padding: .25rem; }
  .admin-nom { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .admin-menu { display: block; }
  /* Téléphone : chaque groupe est une bande qu'on fait glisser du doigt */
  .admin-menu .menu { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: .2rem; }
  .admin-menu .menu a { white-space: nowrap; }
  .admin-menu .menu-outils { padding-left: 0; border-left: 0; border-top: 1px dashed var(--bord); margin-top: .3rem; padding-top: .3rem; }
}
.tuiles-chiffres { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.tuile-chiffre { display: block; padding: 1rem 1.2rem; background: var(--blanc); border-radius: var(--rayon); box-shadow: var(--ombre); text-decoration: none; color: var(--texte); border: 2px solid transparent; }
.tuile-chiffre strong { display: block; font-size: 2.2rem; line-height: 1.1; color: var(--vert-fonce); }
.tuile-chiffre:hover { border-color: var(--vert); color: var(--texte); }
.tuile-chiffre.a-traiter { background: var(--jaune-pale); border-color: var(--jaune); }
.onglets { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.onglets a { padding: .5rem 1rem; border-radius: 999px; background: var(--blanc); border: 2px solid var(--bord); text-decoration: none; font-weight: bold; color: var(--texte); }
.onglets a[aria-current="page"] { background: var(--vert-fonce); border-color: var(--vert-fonce); color: var(--blanc); }
.nombre { display: inline-block; min-width: 1.6em; padding: 0 .4em; border-radius: 999px; background: rgba(0, 0, 0, .08); text-align: center; font-size: .9rem; }
.recherche-admin { margin-bottom: 1rem; }
.tableau-defilant { overflow-x: auto; }
.tableau { width: 100%; border-collapse: collapse; background: var(--blanc); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); }
.tableau th, .tableau td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--bord); vertical-align: top; }
.tableau thead th { background: var(--vert-pale); font-size: .95rem; }
.tableau-serre { font-size: .95rem; }
.tableau-serre td, .tableau-serre th { padding: .35rem .6rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.actions-ligne form { display: inline; }
.bouton-lien { background: none; border: 0; padding: .1rem 0; margin-right: .8rem; font: inherit; font-size: .95rem; color: var(--vert-fonce); text-decoration: underline; cursor: pointer; }
.qr { display: inline-block; background: var(--blanc); padding: .5rem; border-radius: var(--rayon); box-shadow: var(--ombre); min-height: 3rem; }
.qr img { display: block; }
.cle-totp { font-size: 1.1rem; letter-spacing: .05em; word-break: break-all; }
.ligne-champs-egale { grid-template-columns: 1fr 1fr; }
.titre-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-bottom: 1rem; }
.titre-actions h1 { margin: 0; }
.cellule-photo { width: 64px; }
.cellule-photo img { width: 56px; height: 56px; object-fit: contain; background: var(--blanc); border-radius: 6px; }
fieldset.cases { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }
fieldset.cases legend { width: 100%; }
textarea { width: 100%; padding: .6rem .8rem; font: inherit; border: 2px solid #8a939b; border-radius: var(--rayon); background: var(--blanc); resize: vertical; }
.photos-admin { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .8rem; }
.photos-admin li { background: var(--blanc); border-radius: var(--rayon); box-shadow: var(--ombre); padding: .5rem; display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.photos-admin img { width: 100%; height: 150px; object-fit: contain; }
.zone-depot { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .3rem; min-height: 9rem; padding: 1rem; border: 3px dashed var(--vert); border-radius: var(--rayon); background: var(--vert-pale); cursor: pointer; font-weight: normal; }
.zone-depot strong { font-size: 1.2rem; color: var(--vert-fonce); }
.zone-depot.survol { background: var(--jaune-pale); border-color: var(--jaune); }
.zone-depot.envoi { opacity: .7; }
.zone-depot input { max-width: 100%; }
.ligne-document { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .6rem; }
.bouton-lien-danger { color: var(--rouge); }
.bouton-petit { min-height: 2.4rem; padding: .3rem .8rem; font-size: .95rem; }
.choix-fait { padding: .7rem 1rem; background: var(--vert-pale); border-radius: var(--rayon); }
.liste-choix { list-style: none; padding: 0; margin: .6rem 0 1rem; }
.liste-choix li { padding: .5rem 0; border-bottom: 1px solid var(--bord); }
.liste-choix a { display: block; font-size: 1.1rem; }
.liste-prets { padding-left: 1.2rem; }
.liste-prets li { margin: .4rem 0; }
.ligne-retard td { background: #fff3f3; }
.ligne-date { margin-top: .8rem; }
/* Agenda des disponibilités */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.calendriers { display: flex; flex-wrap: wrap; gap: 1rem 2rem; }
.calendrier { border-collapse: separate; border-spacing: 3px; background: var(--blanc); padding: .5rem; border-radius: var(--rayon); box-shadow: var(--ombre); }
.calendrier caption { font-weight: bold; text-align: left; padding: 0 0 .3rem .3rem; text-transform: capitalize; }
.calendrier th { font-size: .85rem; color: var(--texte-doux); width: 2.4rem; }
.calendrier td { width: 2.4rem; height: 2.2rem; text-align: center; border-radius: 6px; font-size: .95rem; }
.calendrier td.passe { color: #b3b9bf; }
.calendrier td.ouvert { font-weight: bold; }
.calendrier td.libre { background: var(--vert-pale); color: var(--vert-fonce); font-weight: bold; outline: 2px solid var(--vert); outline-offset: -2px; }
.calendrier td.reserve { background: var(--jaune-pale); }
.calendrier td.en-pret { background: #fde8e8; }
.calendrier td.aujourdhui span:first-child { text-decoration: underline; }
.calendrier td.ferme { background: repeating-linear-gradient(45deg, #eceff1, #eceff1 4px, #fff 4px, #fff 8px); color: var(--texte-doux); text-decoration: line-through; }
.calendrier td a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 2.2rem; color: inherit; text-decoration: none; border-radius: 6px; }
.calendrier td.libre a:hover, .calendrier td.libre a:focus-visible { background: var(--vert); color: var(--blanc); }
.calendrier td.choisi { background: var(--vert-fonce); color: var(--blanc); outline-color: var(--vert-fonce); }
.pastille.ferme { background: repeating-linear-gradient(45deg, #dfe3e6, #dfe3e6 3px, #fff 3px, #fff 6px); border: 1px solid #c9ced3; }
.reservation .consigne { font-size: 1.1rem; }
.form-reservation { margin-bottom: 1.2rem; }
.fermetures { padding-left: 1.2rem; margin-top: .3rem; }
.ligne-attenuee td { color: var(--texte-doux); }
.legende { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .95rem; }
.pastille { display: inline-block; width: 1rem; height: 1rem; border-radius: 4px; margin-left: .6rem; }
.pastille.libre { background: var(--vert-pale); outline: 2px solid var(--vert); outline-offset: -2px; }
.pastille.reserve { background: var(--jaune-pale); border: 1px solid var(--jaune); }
.pastille.en-pret { background: #fde8e8; border: 1px solid #f1b0b0; }
form.en-ligne { display: inline; margin-left: .5rem; }
.choix-dates legend { font-size: 1.05rem; color: var(--texte); margin-bottom: .5rem; }
.choix-dates-grille { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.choix-date { display: flex; align-items: flex-start; gap: .6rem; padding: .7rem .8rem; background: var(--blanc); border: 2px solid var(--bord); border-radius: var(--rayon); cursor: pointer; font-weight: normal; }
.choix-date:hover { border-color: var(--vert); }
.choix-date input { width: 1.4rem; height: 1.4rem; margin: .1rem 0 0; flex: none; accent-color: var(--vert-fonce); }
.choix-date:has(input:checked) { border-color: var(--vert-fonce); background: var(--vert-pale); box-shadow: 0 0 0 2px var(--vert-fonce) inset; }
.choix-date-texte { display: flex; flex-direction: column; line-height: 1.35; }
.choix-date-texte strong { font-size: 1.05rem; }
@media (max-width: 420px) {
  .calendriers { gap: .8rem; }
  .calendrier { width: 100%; border-spacing: 2px; padding: .3rem; }
  .calendrier th, .calendrier td { width: auto; }
}
input[type="date"] { min-height: 3rem; padding: .4rem .8rem; font: inherit; border: 2px solid #8a939b; border-radius: var(--rayon); background: var(--blanc); }

/* Guide du bénévole (une page A4 à l'impression) */
.guide-titre { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.guide-titre img { border-radius: 10px; }
.guide-titre h1 { margin: 0; color: var(--vert-fonce); }
.guide-titre p { margin: 0; }
.guide-grille { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }
.guide-bloc { background: var(--blanc); border-radius: var(--rayon); border-top: 5px solid var(--vert); box-shadow: var(--ombre); padding: .7rem 1rem .4rem; }
.guide-bloc h2 { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; margin: 0 0 .3rem; }
.guide-bloc ol, .guide-bloc ul { margin: 0 0 .4rem; padding-left: 1.2rem; }
.guide-bloc li { margin: .2rem 0; }
.guide-bloc-alerte { border-top-color: var(--rouge); }
.guide-bloc-alerte h2 { color: var(--rouge); }
.guide-icone { flex: none; color: var(--vert-fonce); background: var(--vert-pale); border-radius: 8px; padding: 4px; }
.guide-bloc-alerte .guide-icone { color: var(--rouge); background: #fde8e8; }
.guide-pied { margin-top: .8rem; font-size: .9rem; color: var(--texte-doux); text-align: center; }

/* Fiches à imprimer (PDF) et exports */
.fiche-impression { background: var(--blanc); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1rem 1.2rem; }
.fiche-impression .tableau { width: 100%; }
.fiche-entete { display: flex; align-items: center; gap: 1rem; border-bottom: 4px solid var(--vert); padding-bottom: .6rem; margin-bottom: .6rem; }
.fiche-entete h1 { margin: 0; font-size: 1.4rem; }
.fiche-entete p { margin: .2rem 0 0; }
.fiche-photo { object-fit: cover; border-radius: var(--rayon); }
.signatures { margin-top: 2.5rem; }
.liste-exports { list-style: none; padding: 0; display: grid; gap: .6rem; }
.liste-exports li { background: var(--blanc); border-radius: var(--rayon); box-shadow: var(--ombre); padding: .7rem 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.bloc-confie { border: 2px dashed var(--vert); border-radius: var(--rayon); padding: .6rem 1rem; margin: 1rem 0; }
.bloc-confie legend { font-weight: 700; padding: 0 .4rem; }
.atouts { padding-left: 1.2rem; }
.atouts li { margin: .3rem 0; }
.carte-local { margin: 1.2rem 0 0; }
.carte-local img { display: block; width: 100%; max-width: 800px; height: auto; border-radius: var(--rayon); border: 1px solid var(--bord); }
.carte-local figcaption { font-size: .9rem; color: var(--texte-doux); margin-top: .4rem; }
/* Statistiques */
.statistiques .onglets { margin-bottom: .6rem; }
.periode-libre { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem 1rem; }
.periode-libre .champ { margin: 0; }
.periode-libre .champ-boutons { min-height: 0; }
.statistiques .infos { grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); margin-top: 1rem; }
.statistiques .details th { width: 60%; }
.barres { border-collapse: collapse; width: 100%; max-width: 44rem; margin: .5rem 0 1.5rem; }
.barres thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.barres th { text-align: left; font-weight: normal; white-space: nowrap; padding: .2rem 1rem .2rem 0; width: 9rem; }
.barres td { display: flex; align-items: center; gap: .5rem; padding: .2rem 0; }
.barre { flex: 1; height: 1rem; }
.barre rect { fill: var(--vert-fonce); }
.barre-valeur { min-width: 2rem; font-variant-numeric: tabular-nums; color: var(--texte); }
.texte-journal { white-space: pre-line; line-height: 1.6; }
.statistiques .tuile-chiffre { cursor: default; }
.statistiques .tuile-chiffre:hover { border-color: transparent; }
.encadre-defaut { background: #fdf0f0; border-left-color: var(--rouge); margin-top: .5rem; }

/* Feuille de réparation (modèle Repair Bernex) */
.feuille-rep { background: #fff; color: #1d2b22; max-width: 52rem; margin: 0 auto; padding: 1.2rem 1.4rem; border-radius: var(--rayon); box-shadow: var(--ombre); font-size: .95rem; }
.fr-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem; border-bottom: 3px solid var(--vert); padding-bottom: .6rem; }
.fr-marque { display: flex; align-items: center; gap: .6rem; line-height: 1.2; }
.fr-marque small { color: var(--vert-fonce); font-weight: 700; letter-spacing: .08em; font-size: .7rem; }
.fr-x { color: var(--texte-doux); }
.fr-titre { text-align: right; }
.fr-titre span { display: inline-block; background: var(--vert); color: #fff; font-weight: 800; padding: .45rem .9rem; border-radius: 8px; letter-spacing: .03em; }
.fr-titre small { display: block; color: var(--texte-doux); font-weight: 600; margin-top: .25rem; font-size: .75rem; }
.fr-bandeau { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; align-items: center; background: var(--vert-pale); border-radius: 8px; padding: .5rem .8rem; margin: .7rem 0; }
.fr-bandeau > span:first-child { flex: 1; color: var(--vert-fonce); font-size: .8rem; font-weight: 700; }
.fr-no { border: 2px solid var(--vert); border-radius: 8px; padding: .1rem .6rem; }
.fr-section { display: flex; align-items: center; gap: .5rem; background: var(--vert-pale); color: var(--vert-fonce); font-size: .95rem; font-weight: 800; border-radius: 8px; padding: .3rem .6rem; margin: .9rem 0 .5rem; }
.fr-section span { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--vert-fonce); color: #fff; font-size: .8rem; flex: none; }
.fr-grille { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 1.5rem; }
.fr-champ { display: flex; flex-direction: column; margin-bottom: .3rem; }
.fr-champ b, .fr-etiquette { color: var(--vert-fonce); font-size: .7rem; font-weight: 800; letter-spacing: .04em; margin: 0; }
.fr-champ span { min-height: 1.6rem; border-bottom: 1px solid #9fb3a7; padding: .15rem 0; }
.fr-large span { min-height: 2.6rem; }
.fr-moitie { max-width: 60%; }
.fr-cases { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: .3rem 0 .6rem; }
.fr-cases > span { display: inline-flex; align-items: center; gap: .35rem; }
.fr-case { display: inline-block; width: .95rem; height: .95rem; border: 2px solid var(--vert-fonce); border-radius: 3px; flex: none; position: relative; }
.fr-coche { background: var(--vert-fonce); }
.fr-coche::after { content: ""; position: absolute; left: .22rem; top: .02rem; width: .25rem; height: .5rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.fr-boite { border: 1.5px solid #9fb3a7; border-radius: 8px; padding: .5rem .7rem; min-height: 3.5rem; white-space: normal; }
.fr-texte { margin: .3rem 0; font-size: .88rem; }
.fr-liste { margin: 0 0 .5rem; padding-left: 1.1rem; font-size: .85rem; }
.fr-pied { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem; border-top: 1px solid #cfd9d3; margin-top: .9rem; padding-top: .4rem; font-size: .75rem; font-weight: 700; }
.fr-pied span:last-child { color: var(--vert-fonce); }
@media (max-width: 560px) { .fr-grille { grid-template-columns: 1fr; } .fr-moitie { max-width: none; } .fr-titre { text-align: left; } }

@media print {
  @page { size: A4; margin: 9mm; }
  body { background: #fff; font-size: 9.3pt; line-height: 1.32; }
  .entete, .pied, .ne-pas-imprimer, .evitement, .fil { display: none !important; }
  .page { max-width: none; padding: 0; }
  .guide-titre { margin-bottom: 3mm; }
  .guide-titre img { width: 44px; height: auto; }
  .guide-titre h1 { font-size: 17pt; }
  .guide-grille { grid-template-columns: 1fr 1fr; gap: 3mm; }
  .guide-bloc { box-shadow: none; border: 1px solid #cfd4d8; border-top: 4px solid var(--vert); padding: 2mm 3mm 1mm; break-inside: avoid; }
  .guide-bloc-alerte { border-top-color: var(--rouge); }
  .guide-bloc h2 { font-size: 11pt; }
  .guide-icone { width: 24px; height: 24px; padding: 2px; }
  .guide-pied { font-size: 8pt; margin-top: 2mm; }
  .fiche-impression { box-shadow: none; padding: 0; }
  .fiche-impression h2 { font-size: 12pt; margin: 4mm 0 1mm; }
  .fiche-impression .details, .fiche-impression .tableau { break-inside: auto; }
  .fiche-impression tr { break-inside: avoid; }
  .admin .page { padding: 0; }
  .feuille-rep { box-shadow: none; padding: 0; max-width: none; font-size: 9pt; line-height: 1.25; }
  .fr-tete { padding-bottom: 2mm; }
  .fr-bandeau { margin: 2mm 0; padding: 1.2mm 3mm; }
  .fr-section { margin: 2.5mm 0 1.5mm; padding: 1mm 2mm; font-size: 9.5pt; }
  .fr-grille { grid-template-columns: 1fr 1fr; gap: .5mm 6mm; }
  .fr-champ { margin-bottom: .5mm; }
  .fr-champ span { min-height: 5mm; padding: .5mm 0; }
  .fr-large span { min-height: 9mm; }
  .fr-cases { margin: 1mm 0 1.5mm; }
  .fr-boite { min-height: 12mm; padding: 1.5mm 2.5mm; }
  .fr-texte, .fr-liste { font-size: 8.5pt; margin-top: 1mm; margin-bottom: 1mm; }
  .fr-pied { margin-top: 3mm; padding-top: 1.5mm; font-size: 7.5pt; }
  .fr-titre { text-align: right; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Pied */
.pied { margin-top: 3rem; background: var(--texte); color: #e9ecef; border-top: 5px solid var(--vert); line-height: 1.6; }
.pied-int { max-width: 72rem; margin: 0 auto; padding: 2rem 1rem 1.5rem; display: grid; gap: 1.5rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.pied-col p { margin: 0; }
.pied-titre { margin-bottom: .5rem !important; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--jaune-logo); }
.pied-liens { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.pied a { color: #fff; text-decoration-color: rgba(255, 255, 145, .6); text-underline-offset: .2em; }
.pied a:hover { color: var(--jaune-logo); }
.pied-mail { white-space: nowrap; }
.pied-bas { border-top: 1px solid rgba(255, 255, 255, .12); }
.pied-bas p { max-width: 72rem; margin: 0 auto; padding: .8rem 1rem 1rem; font-size: .85rem; color: #adb5bd; }
.pied .petit { color: #c9ced3; }

/* Écrans plus larges */
@media (min-width: 640px) {
  .grille { grid-template-columns: repeat(3, 1fr); }
  .filtres { grid-template-columns: repeat(2, 1fr); }
  .champ-large { grid-column: 1 / -1; }
  .champ-case { grid-column: 1; }
  .champ-boutons { grid-column: 2 / -1; justify-content: flex-end; }
}
@media (min-width: 960px) {
  .grille { grid-template-columns: repeat(4, 1fr); }
  .filtres { grid-template-columns: 2fr 1fr 1fr; align-items: end; }
  .champ-large { grid-column: auto; }
  .champ-boutons { grid-column: 2 / -1; }
  .champ-case, .champ-boutons { min-height: 3rem; }
  .fiche { grid-template-columns: 5fr 6fr; align-items: start; }
  .accueil-hero { padding: 2rem 2.5rem; grid-template-columns: 256px 1fr; align-items: center; gap: 2rem; }
  .hero-logo { width: 256px; }
}
