/* Espace mariés : sobre et lisible */
body.admin { background: #F4F5F8; font-size: 15px; }
.connexion { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.connexion form { width: 100%; max-width: 400px; }
.connexion h1 { margin: 0 0 4px; font-family: var(--titre); font-weight: 400; font-size: 34px; }
.connexion .aide { margin-bottom: 20px; display: block; }

.barre-admin { background: var(--fond); border-bottom: 1px solid var(--ligne); }
.barre-admin-int { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.barre-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bouton.petit { min-height: 40px; padding: 0 16px; font-size: 14px; }

.coque { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-top: 28px; padding-bottom: 64px; }
.onglets { flex: 1 1 200px; max-width: 230px; display: flex; flex-direction: column; gap: 4px; }
.onglets button { text-align: left; min-height: 44px; padding: 0 14px; border: none; border-radius: 8px; background: transparent; color: var(--encre); font: inherit; cursor: pointer; }
.onglets button[aria-current="page"] { background: var(--fond); font-weight: 600; box-shadow: inset 0 0 0 1px var(--ligne); }
.contenu-admin { flex: 999 1 560px; min-width: 0; }
.contenu-admin h2 { margin: 0 0 16px; font-family: var(--titre); font-weight: 400; font-size: 30px; }
.contenu-admin h3 { margin: 28px 0 10px; font-size: 16px; }
.tete-panneau { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tete-panneau h2 { margin: 0; }
.statut { margin: 0 0 12px; min-height: 1.4em; font-size: 14px; color: var(--doux); }
.statut.erreur-statut { color: #B42318; font-weight: 500; }

.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tuile { background: var(--fond); border: 1px solid var(--ligne); border-radius: 8px; padding: 16px 18px; }
.tuile p { margin: 0; }
.tuile .libelle { font-size: 14px; color: var(--doux); margin-bottom: 6px; }
.tuile .valeur { font-size: 26px; font-weight: 600; }
.a-faire { margin: 0; padding: 0; list-style: none; background: var(--fond); border: 1px solid var(--ligne); border-radius: 8px; }
.a-faire li { padding: 12px 16px; border-bottom: 1px solid var(--ligne); }
.a-faire li:last-child { border-bottom: none; }

.filtre { margin: 0 0 14px; }
.filtre button { min-height: 36px; font-size: 14px; }
.tableau-defile { overflow-x: auto; background: var(--fond); border: 1px solid var(--ligne); border-radius: 8px; }
.tableau { width: 100%; border-collapse: collapse; min-width: 900px; }
.tableau th { text-align: left; font-weight: 600; font-size: 13px; color: var(--doux); padding: 10px 12px; border-bottom: 1px solid var(--ligne); white-space: nowrap; }
.tableau td { padding: 10px 12px; border-bottom: 1px solid #EEF0F4; vertical-align: top; }
.tableau tr:last-child td { border-bottom: none; }
.tableau input, .tableau select, .ajout input, .ajout select, .code-coffre input { font: inherit; font-size: 14px; color: var(--encre); background: #F7F8FB; border: 1px solid var(--ligne); border-radius: 6px; padding: 8px 10px; min-height: 40px; width: 100%; min-width: 110px; }
.tableau select { min-width: 150px; }
.tableau input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; min-width: 0; accent-color: var(--encre); }
.tableau .vide { padding: 24px 12px; color: var(--doux); text-align: center; }
.pastille { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 13px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pastille.oui { background: #E3F1E7; color: #1E6B3A; }
.pastille.non { background: #F7E4E2; color: #9A2A1E; }
.pastille.attente { background: #FFF4D6; color: #7A5600; }
.lien-supprimer { background: none; border: none; color: #9A2A1E; font: inherit; font-size: 14px; cursor: pointer; min-height: 40px; padding: 0 6px; text-decoration: underline; text-underline-offset: 3px; }
.ajout { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: var(--fond); border: 1px solid var(--ligne); border-radius: 8px; padding: 14px; margin-bottom: 14px; }
.ajout .champ { flex: 1 1 160px; }
.ajout .champ.etroit { flex: 0 1 110px; }
.ajout label, .code-coffre label { font-size: 13px; }
.code-coffre { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: var(--fond); border: 1px solid var(--ligne); border-radius: 8px; padding: 14px; margin: 16px 0; }
.code-coffre .champ { flex: 0 1 220px; }
.tableau td.message { max-width: 280px; white-space: pre-line; font-size: 14px; }
.personnes-liste { margin: 0; padding: 0; list-style: none; font-size: 14px; }

@media (max-width: 760px) { .onglets { max-width: none; flex-direction: row; flex-wrap: wrap; } }

/* Réponses : synthèse visuelle et cartes par foyer */
.synthese { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr) minmax(0, 1.2fr); gap: 14px; margin-bottom: 20px; }
.synthese > div { background: var(--fond); border: 1px solid var(--ligne); border-radius: 10px; padding: 16px 18px; }
.synthese h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--doux); }
.synthese-chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; align-content: start; }
.synthese-chiffres > div { display: flex; flex-direction: column; font-size: 13px; color: var(--doux); }
.synthese-chiffres > div:first-child { grid-column: 1 / -1; }
.grand-chiffre { font-family: var(--titre); font-size: 44px; line-height: 1; color: var(--encre); }
.moyen-chiffre { font-size: 22px; font-weight: 600; color: var(--encre); }
.barre-groupes { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: #EEF0F5; gap: 2px; }
.barre-groupes .segment { min-width: 6px; }
.barre-groupes .vide-barre { flex: 1; font-size: 11px; color: var(--doux); display: flex; align-items: center; padding-left: 10px; }
.legende-groupes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 14px; font-size: 13px; }
.legende-groupes li { display: flex; align-items: center; gap: 8px; }
.legende-groupes strong { margin-left: auto; }
.point-groupe { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.legende-groupes .point-groupe { margin-right: 0; }
.jauges-moments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 13px; }
.jauges-moments li { display: grid; grid-template-columns: 112px minmax(60px, 1fr) 26px; align-items: center; gap: 10px; }
.jauges-moments strong { text-align: right; }
.jauge { height: 10px; border-radius: 5px; background: #EEF0F5; overflow: hidden; }
.jauge-remplie { display: block; height: 100%; background: var(--encre); border-radius: 5px; }

.filtres-reponses { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 16px; }
.filtres-reponses .filtre { margin: 0; }
.filtre-groupes { display: flex; flex-wrap: wrap; gap: 6px; }
.filtre-groupes button { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--ligne); background: var(--fond); color: var(--encre); font: inherit; font-size: 13px; cursor: pointer; }
.filtre-groupes button[aria-pressed="true"] { font-weight: 600; }
.recherche { margin-left: auto; min-width: 200px; }
.recherche input { font: inherit; font-size: 14px; padding: 8px 12px; min-height: 38px; border: 1px solid var(--ligne); border-radius: 19px; background: var(--fond); width: 100%; }

.cartes-reponses { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.carte-reponse { --groupe: #9AA3BA; position: relative; display: flex; flex-direction: column; gap: 12px; background: var(--fond); border: 1px solid var(--ligne); border-left: 6px solid var(--groupe); border-radius: 10px; padding: 16px 16px 12px; }
.carte-reponse.absente { opacity: .72; }
.carte-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.carte-tete h3 { margin: 0 0 2px; font-size: 16px; font-weight: 600; }
.carte-tete a { font-size: 13px; color: var(--doux); word-break: break-all; }
.compte-personnes { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; border-radius: 18px; background: var(--groupe); color: #fff; font-weight: 700; font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 600; background: #EEF0F5; color: var(--encre); }
.chip.m15 { background: #FFF1D6; color: #7A4E00; }
.chip.m18 { background: #E5EEFB; color: #24507A; }
.chip.mbrunch { background: #E3F1E7; color: #1E6B3A; }
.chip.absent { background: #F7E4E2; color: #9A2A1E; }
.personnes-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.personnes-chips li { font-size: 13px; padding: 4px 10px; border-radius: 6px; background: #F4F5F8; border: 1px solid var(--ligne); }
.personnes-chips li.enfant { background: #FFF8E8; border-color: #F2E2B6; }
.message-invite { margin: 0; padding: 10px 12px; border-left: 3px solid var(--groupe); background: #F7F8FB; border-radius: 0 6px 6px 0; font-size: 14px; font-style: italic; white-space: pre-line; }
.carte-pied { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; border-top: 1px solid #EEF0F4; }
.choix-groupe { font: inherit; font-size: 13px; min-height: 34px; padding: 4px 8px; border: 1px solid var(--ligne); border-radius: 6px; background: var(--fond); color: var(--encre); max-width: 100%; }
.date-reponse { font-size: 12px; color: var(--doux); margin-left: auto; }
.carte-pied .lien-supprimer { font-size: 13px; min-height: 34px; }
.vide-cartes { grid-column: 1 / -1; padding: 28px; text-align: center; color: var(--doux); background: var(--fond); border: 1px dashed var(--ligne); border-radius: 10px; }
@media (max-width: 1100px) { .synthese { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .synthese > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 760px) { .synthese { grid-template-columns: minmax(0, 1fr); } .recherche { margin-left: 0; width: 100%; } }

/* Onglets en haut : toute la largeur pour les tableaux */
.coque { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 22px; }
.onglets { flex: none; max-width: none; flex-direction: row; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--ligne); padding-bottom: 10px; }
.onglets button { min-height: 40px; }
.contenu-admin { flex: none; width: 100%; }

/* Tuiles */
.tuiles-invites { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 18px; }
.tuile .sous-valeur { margin-top: 4px; font-size: 12px; color: var(--doux); }
.tuile-forte { background: var(--encre); border-color: var(--encre); color: var(--fond); }
.tuile-forte .libelle, .tuile-forte .sous-valeur { color: #C9D1E6; }
.tuile-moments ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.tuile-moments li { display: flex; justify-content: space-between; gap: 8px; }

/* Synthèse par tag */
.bloc-synthese { background: var(--fond); border: 1px solid var(--ligne); border-radius: 10px; padding: 16px; margin-bottom: 22px; }
.bloc-tete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 10px; }
.bloc-tete h3 { margin: 0; font-size: 16px; }
.bloc-tete .aide { margin: 0; font-size: 13px; }
.bloc-synthese .tableau-defile { border: none; }
.tableau-synthese { min-width: 760px; }
.tableau .nombre { text-align: right; font-variant-numeric: tabular-nums; }
.tableau .centre { text-align: center; }
.tableau-synthese td, .tableau-synthese th { padding: 6px 10px; vertical-align: middle; }
.tableau-synthese tbody tr { --groupe: #9AA3BA; }
.tableau-synthese tfoot th, .tableau-synthese tfoot td { border-top: 2px solid var(--encre); font-weight: 600; padding-top: 10px; }
.cellule-tag { display: flex; align-items: center; gap: 6px; min-width: 220px; }
.pastille-couleur { flex: none; width: 26px; height: 26px; padding: 0; border: 2px solid var(--fond); border-radius: 50%; box-shadow: 0 0 0 1px var(--ligne); background: var(--groupe); cursor: pointer; overflow: hidden; }
span.pastille-couleur { cursor: default; display: inline-block; }
.pastille-couleur::-webkit-color-swatch-wrapper { padding: 0; }
.pastille-couleur::-webkit-color-swatch { border: none; border-radius: 50%; }
.pastille-couleur::-moz-color-swatch { border: none; border-radius: 50%; }
.nom-tag { font-weight: 600; max-width: none; }
.nom-sans-tag { padding: 0 9px; color: var(--doux); font-style: italic; }
.total { white-space: nowrap; }
.mini-barre { display: inline-flex; vertical-align: middle; width: 90px; height: 8px; margin-left: 10px; border-radius: 4px; background: #EEF0F5; overflow: hidden; }
.mini-adultes { background: var(--groupe); }
.mini-enfants { background: var(--groupe); opacity: .4; }
.lien-filtre { background: none; border: none; font: inherit; color: var(--encre); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; padding: 0 4px; }
.actions-tag { white-space: nowrap; text-align: right; }
.bouton-icone { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--ligne); background: var(--fond); color: var(--encre); font: inherit; font-size: 16px; cursor: pointer; }
.bouton-icone[disabled] { opacity: .3; cursor: default; }
.bouton-icone.supprimer { border-color: transparent; color: var(--doux); font-size: 20px; }
.bouton-icone.supprimer:hover { color: #9A2A1E; border-color: #F2D3CF; background: #FDF3F2; }
.ajout-tag { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--ligne); }
.ajout-tag input[type="text"], .ajout-tag input:not([type]) { font: inherit; font-size: 14px; min-height: 38px; padding: 6px 10px; border: 1px solid var(--ligne); border-radius: 6px; background: #F7F8FB; min-width: 220px; }
.ajout-tag input[type="color"] { width: 38px; height: 38px; padding: 2px; border: 1px solid var(--ligne); border-radius: 6px; background: var(--fond); cursor: pointer; }

/* Barre de filtres */
.barre-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; scroll-margin-top: 16px; }
.barre-outils .recherche { margin-left: 0; flex: 1 1 240px; max-width: 340px; }
.filtre-select { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--doux); }
.filtre-select select { font: inherit; font-size: 14px; color: var(--encre); min-height: 38px; padding: 4px 8px; border: 1px solid var(--ligne); border-radius: 6px; background: var(--fond); }
.compte-filtre { margin-left: auto; font-size: 13px; color: var(--doux); }

/* Tableau des foyers */
.tableau-foyers { min-width: 1080px; }
.tableau-foyers thead th { position: sticky; top: 0; background: var(--fond); z-index: 1; font-size: 12px; }
.tableau-foyers td { padding: 5px 6px; vertical-align: middle; }
.tableau-foyers tr.foyer td:first-child { box-shadow: inset 5px 0 0 var(--groupe); padding-left: 12px; }
.tableau-foyers tr.foyer:hover td { background: #FAFBFD; }
.tableau-foyers tr.foyer.absent td { background: #FCF6F6; }
.tableau-foyers tr.foyer.absent .col-adulte, .tableau-foyers tr.foyer.absent .col-conjoint { opacity: .6; }
.entete-tag { --groupe: #9AA3BA; }
.entete-tag th { padding: 14px 12px 6px; background: #F7F8FB; border-bottom: 2px solid var(--groupe); text-align: left; font-size: 14px; color: var(--encre); white-space: normal; }
.entete-tag .point-groupe { width: 11px; height: 11px; margin-right: 8px; background: var(--groupe); }
.entete-nom { font-weight: 700; margin-right: 12px; }
.entete-compte { font-weight: 400; font-size: 13px; color: var(--doux); }
.tableau .champ-ligne, .tableau .champ-enfants { font: inherit; font-size: 14px; color: var(--encre); background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 6px 7px; min-height: 34px; width: 100%; min-width: 0; }
.tableau .champ-ligne:hover, .tableau .champ-enfants:hover { border-color: var(--ligne); background: #F7F8FB; }
.tableau .champ-ligne:focus, .tableau .champ-enfants:focus { outline: none; border-color: var(--encre); background: var(--fond); }
.tableau .champ-ligne::placeholder { color: #A6ADC0; }
.tableau .champ-ligne.nom-principal { font-weight: 600; }
.col-tag { width: 160px; }
.col-adulte { min-width: 150px; }
.col-conjoint { min-width: 190px; }
.col-email { min-width: 170px; }
.col-notes { min-width: 120px; }
.col-actions { width: 40px; }
.choix-tag { font: inherit; font-size: 13px; width: 100%; min-height: 34px; padding: 4px 6px; border: 1px solid var(--ligne); border-radius: 6px; background: var(--fond); color: var(--encre); }
.conjoint { display: flex; align-items: center; gap: 4px; }
.conjoint input[type="checkbox"], .grande-case { width: 20px; height: 20px; min-width: 20px; accent-color: var(--encre); margin: 0 4px 0 0; cursor: pointer; }
.grande-case { width: 22px; height: 22px; margin: 0; accent-color: #2F9E5B; }
.sans-conjoint { font-size: 13px; color: #A6ADC0; padding-left: 6px; }
.compteur { display: inline-flex; align-items: center; border: 1px solid var(--ligne); border-radius: 17px; background: var(--fond); }
.compteur button { width: 30px; height: 32px; border: none; background: transparent; font: inherit; font-size: 17px; color: var(--encre); cursor: pointer; border-radius: 16px; }
.compteur button:hover:not([disabled]) { background: #EEF0F5; }
.compteur button[disabled] { opacity: .3; cursor: default; }
.tableau .compteur .champ-enfants { width: 36px; padding: 4px 0; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.compteur .champ-enfants::-webkit-outer-spin-button, .compteur .champ-enfants::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.col-pers strong { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; border-radius: 14px; background: var(--groupe); color: #fff; font-size: 14px; }

.presence { display: inline-flex; gap: 4px; }
.presence button { min-height: 32px; min-width: 44px; padding: 0 10px; border-radius: 16px; border: 1px solid var(--ligne); background: var(--fond); color: var(--encre); font: inherit; font-size: 13px; cursor: pointer; }
.presence button.oui[aria-pressed="true"] { background: #2F9E5B; border-color: #2F9E5B; color: #fff; font-weight: 600; }
.presence button.non[aria-pressed="true"] { background: #D9534F; border-color: #D9534F; color: #fff; font-weight: 600; }
.moments-mini { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin-top: 5px; }
.moments-mini button { min-height: 26px; padding: 0 8px; border-radius: 13px; border: 1px solid var(--ligne); background: var(--fond); color: var(--doux); font: inherit; font-size: 12px; cursor: pointer; }
.moments-mini button.m15[aria-pressed="true"] { background: #FFF1D6; border-color: #EBC57A; color: #7A4E00; font-weight: 600; }
.moments-mini button.m18[aria-pressed="true"] { background: #E5EEFB; border-color: #9DBBE6; color: #24507A; font-weight: 600; }
.moments-mini button.mbrunch[aria-pressed="true"] { background: #E3F1E7; border-color: #9CCBAA; color: #1E6B3A; font-weight: 600; }
.info-site { display: block; margin-top: 4px; font-size: 11px; color: var(--doux); white-space: nowrap; }
.info-site.alerte { color: #9A5B00; }

.ligne-ajout td { background: #F7F8FB; padding-top: 10px; padding-bottom: 10px; border-top: 2px dashed var(--ligne); }
.ligne-ajout input, .ligne-ajout select { font: inherit; font-size: 14px; width: 100%; min-height: 36px; padding: 5px 8px; border: 1px solid var(--ligne); border-radius: 6px; background: var(--fond); color: var(--encre); }
.ligne-ajout #inv-enfants { width: 64px; }

/* Saisie manuelle d'une réponse */
.ajout-reponse { align-items: flex-start; }
.ajout-reponse .ajout-titre { flex: 1 1 100%; margin: 0; font-size: 14px; color: var(--doux); }
.ajout-reponse .champ.large { flex: 2 1 280px; }
.ajout-reponse .etiquette { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.ajout-reponse .moments-mini { justify-content: flex-start; margin-top: 0; }
.ajout-reponse .moments-mini button { min-height: 34px; font-size: 13px; padding: 0 12px; }
.ajout-reponse .presence button { min-height: 36px; }
.ajout-reponse .erreur { flex: 1 1 100%; margin: 0; }
.ajout-reponse .erreur:empty { display: none; }
.ajout-actions { flex: 1 1 100%; display: flex; gap: 8px; }
.chip.manuel { margin-top: 4px; background: #F1EAF9; color: #5B3A86; }

/* Téléphone : chaque foyer devient une fiche */
@media (max-width: 900px) {
  .tableau-foyers { min-width: 0; }
  .tableau-foyers-defile { overflow: visible; background: transparent; border: none; }
  .tableau-foyers, .tableau-foyers tbody, .tableau-foyers tfoot { display: block; }
  .tableau-foyers thead { display: none; }
  .entete-tag { display: block; }
  .entete-tag th { display: block; background: transparent; padding: 18px 2px 6px; }
  .tableau-foyers tr.foyer, .ligne-ajout { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; background: var(--fond); border: 1px solid var(--ligne); border-left: 6px solid var(--groupe); border-radius: 10px; padding: 10px; margin-top: 8px; position: relative; }
  .ligne-ajout { --groupe: var(--ligne); }
  .tableau-foyers td { display: block; padding: 0; border: none; width: auto; min-width: 0; }
  .tableau-foyers tr.foyer td:first-child { box-shadow: none; padding-left: 0; }
  .tableau-foyers tr.foyer:hover td, .tableau-foyers tr.foyer.absent td, .ligne-ajout td { background: transparent; border: none; padding: 0; }
  .tableau-foyers td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--doux); margin-bottom: 2px; }
  .tableau-foyers .col-adulte, .tableau-foyers .col-conjoint, .tableau-foyers .col-email, .tableau-foyers .col-notes, .tableau-foyers .col-vient { grid-column: 1 / -1; }
  .tableau-foyers .col-adulte { padding-right: 40px; }
  .tableau-foyers .col-actions { position: absolute; top: 6px; right: 6px; }
  .tableau-foyers .col-pers, .tableau-foyers .col-enfants, .tableau-foyers .col-invitation, .tableau-foyers .col-vient { text-align: left; }
  .tableau-foyers .col-vient { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .tableau-foyers .col-vient::before { width: 100%; }
  .tableau-foyers .moments-mini { margin-top: 0; justify-content: flex-start; }
  .tableau .champ-ligne { border-color: var(--ligne); background: #F7F8FB; }
  .ligne-ajout td[colspan] { grid-column: 1 / -1; }
  .ligne-ajout td:empty { display: none; }
  .compte-filtre { margin-left: 0; }
  .barre-outils .recherche { max-width: none; }
}

/* Les libellés invisibles restent dans leur tableau (sinon la page déborde sur téléphone) */
.tableau-defile { position: relative; }
@media (max-width: 700px) {
  .tableau-synthese { min-width: 0; }
  .tableau-synthese .mini-barre, .tableau-synthese th:nth-child(6), .tableau-synthese td:nth-child(6), .tableau-synthese th:nth-child(7), .tableau-synthese td:nth-child(7) { display: none; }
  .cellule-tag { min-width: 150px; }
  .actions-tag .bouton-icone { display: none; }
  .tableau-synthese td, .tableau-synthese th { padding: 6px 5px; }
}

/* Tableau d'édition : colonnes de largeur fixe (plus stable pendant la saisie) */
.tableau-foyers { table-layout: fixed; width: 100%; min-width: 1000px; }
.tableau-foyers thead th { white-space: normal; line-height: 1.25; vertical-align: bottom; }
.c-tag { width: 12%; } .c-adulte { width: 14%; } .c-conjoint { width: 17%; } .c-enfants { width: 10%; } .c-pers { width: 5%; }
.c-email { width: 14%; } .c-invitation { width: 7%; } .c-vient { width: 12%; } .c-notes { width: 6%; } .c-actions { width: 3%; }
.tableau-foyers .col-tag, .tableau-foyers .col-adulte, .tableau-foyers .col-conjoint, .tableau-foyers .col-email, .tableau-foyers .col-notes, .tableau-foyers .col-actions { width: auto; min-width: 0; }
.tableau-foyers .col-actions { padding-left: 0; padding-right: 0; text-align: center; }
.tableau-foyers .col-notes:focus-within { position: relative; }
.ligne-ajout td[colspan] { text-align: left; }

/* Synthèse : pastille de couleur ronde, nom du tag lisible */
.tableau .pastille-couleur { width: 26px; height: 26px; min-width: 26px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid var(--fond); background: var(--groupe); }
.tableau .nom-tag { flex: 1 1 auto; }
@media (max-width: 900px) {
  .tableau-foyers { table-layout: auto; min-width: 0; }
  .tableau-foyers colgroup { display: none; }
}
.tableau .choix-tag { min-width: 0; }
.c-email { width: 13%; } .c-vient { width: 14%; } .c-notes { width: 5%; }
.tableau-foyers .moments-mini { flex-wrap: nowrap; }
.tableau-foyers .moments-mini button { padding: 0 7px; }
@media (max-width: 900px) { .tableau-foyers .moments-mini { flex-wrap: wrap; } }

/* Moments choisis : bien visibles (couleur pleine + coche) */
.moments-mini button[aria-pressed="true"]::before { content: "✓ "; font-weight: 700; }
.moments-mini button.m15[aria-pressed="true"] { background: #D98A0B; border-color: #D98A0B; color: #fff; font-weight: 700; }
.moments-mini button.m18[aria-pressed="true"] { background: #2F67B1; border-color: #2F67B1; color: #fff; font-weight: 700; }
.moments-mini button.mbrunch[aria-pressed="true"] { background: #2F9E5B; border-color: #2F9E5B; color: #fff; font-weight: 700; }
/* Repris de la réponse de l'invité (pas encore confirmé à la main) : même couleur, en pointillés */
.moments-mini button:hover:not([aria-pressed="true"]) { border-color: var(--encre); color: var(--encre); }
.moments-mini button { white-space: nowrap; }
.moments-mini button[aria-pressed="true"]::before { content: "✓"; margin-right: 3px; }
.tableau-foyers .moments-mini { flex-wrap: wrap; }

/* Onglet du jeu */
.carte-plateau { display: flex; align-items: center; gap: 18px; padding: 18px 20px; margin-bottom: 26px; border-radius: 14px; background: var(--encre); color: var(--fond); text-decoration: none; }
.carte-plateau:hover { color: var(--fond); background: #2C3A5E; }
.mini-plateau { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 56px; height: 56px; flex: none; }
.mini-plateau span { border-radius: 5px; }
.carte-plateau-texte { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.carte-plateau-texte strong { font-family: var(--titre); font-weight: 400; font-size: 24px; }
.carte-plateau-texte span { font-size: 14px; color: #C9D1E6; }
.carte-plateau-fleche { font-size: 28px; }
.liste-stations { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.liste-stations a { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 12px; border-radius: 10px; background: var(--fond); border: 1px solid var(--ligne); color: var(--encre); text-decoration: none; }
.liste-stations a:hover { border-color: var(--encre); color: var(--encre); }
.numero-station { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 14px; flex: none; }
.titre-station { font-weight: 600; flex: 1; }
.statut-station { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #EEF0F5; color: var(--doux); }
.statut-station.statut-conception { background: #FFF1D6; color: #7A4E00; }
.statut-station.statut-prototype { background: #E5EEFB; color: #24507A; }
.statut-station.statut-testee { background: #EDE5F8; color: #5B3A86; }
.statut-station.statut-prete { background: #2E9B5A; color: #fff; }
.gardien-station { flex-basis: 100%; padding-left: 38px; font-size: 12px; color: var(--doux); }
.gardien-station:empty { display: none; }

/* Invités sur téléphone : une ligne de résumé par foyer, un tap déplie la fiche complète */
.tableau-foyers .col-resume { display: none; }
@media (max-width: 900px) {
  .tableau-foyers tr.foyer { margin-top: 5px; }
  .tableau-foyers tr.foyer:not(.ouvert) { padding: 0; gap: 0; }
  .tableau-foyers tr.foyer:not(.ouvert) > td:not(.col-resume) { display: none; }
  .tableau-foyers .col-resume { display: block; grid-column: 1 / -1; padding: 0 !important; }
  .tableau-foyers tr.foyer.ouvert .col-resume { margin: -10px -10px 4px; border-bottom: 1px solid var(--ligne); }
  .tableau-foyers tr.foyer.ouvert .col-actions { position: static; grid-column: 1 / -1; justify-self: end; }
  .resume-foyer { width: 100%; display: flex; align-items: center; gap: 9px; min-height: 52px; padding: 6px 10px 6px 8px; border: none; background: transparent; color: var(--encre); font: inherit; text-align: left; cursor: pointer; }
  .res-nb { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--groupe); color: #fff; font-weight: 800; font-size: 14px; }
  .res-nom { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
  .res-nom strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .res-nom small { font-size: 12px; color: var(--doux); }
  .res-invit { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; border: 1.5px dashed #C9CEDB; color: #A6ADC0; }
  .res-invit.envoyee { border: none; background: #E3F1E7; color: #1E6B3A; }
  .res-presence { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; }
  .res-presence.oui { background: #2F9E5B; color: #fff; }
  .res-presence.non { background: #F7E4E2; color: #9A2A1E; }
  .res-presence.attente { background: #EEF0F5; color: var(--doux); }
  .res-nom small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* Filtres sur une seule rangée */
  .barre-outils { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .barre-outils .recherche { grid-column: 1 / -1; }
  .barre-outils .filtre-select { flex-direction: column; align-items: stretch; gap: 2px; font-size: 11px; min-width: 0; }
  .barre-outils .filtre-select select { width: 100%; min-width: 0; font-size: 13px; min-height: 36px; padding: 2px 4px; }
  .barre-outils .compte-filtre { grid-column: 1 / -1; }
  .res-chevron { flex: none; font-size: 22px; line-height: 1; color: #A6ADC0; transition: transform .2s; }
  tr.foyer.ouvert .res-chevron { transform: rotate(90deg); }
  .tableau-foyers tr.foyer.absent:not(.ouvert) .res-nom strong { color: var(--doux); }
}

/* Réponses : case « demande traitée » (réponse reportée dans la liste des invités) */
.case-traitee { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; min-height: 36px; padding: 4px 12px 4px 8px; border-radius: 18px; border: 1.5px solid #E2B04A; background: #FFF6E0; color: #7A4E00; font-size: 14px; font-weight: 600; cursor: pointer; }
.case-traitee input { width: 20px; height: 20px; margin: 0; accent-color: #2F9E5B; cursor: pointer; }
.carte-reponse.traitee .case-traitee { border-color: #2F9E5B; background: #E9F6EE; color: #1E6B3A; }
.carte-reponse.traitee { background: #FAFBFC; }
.carte-reponse.traitee > :not(.case-traitee):not(.carte-pied) { opacity: .6; }
