/* ======================================================================
   1. PERSONNALISATION RAPIDE
   Modifiez ces variables pour changer les couleurs et l'espacement.
   Les trois variantes Aller sont chargées depuis assets/font/ uniquement.
   Pour changer de police, remplacez les fichiers et les chemins ci-dessous.
   ====================================================================== */
@font-face {
  font-family: "Aller";
  src: url("assets/font/Aller_light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Aller";
  src: url("assets/font/aller.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Aller";
  src: url("assets/font/aller_bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --ink: #0f1f16;
  --muted: #0f1f16;
  /* Vert forêt lumineux, commun aux boutons et aux accents des champs. */
  --green: #2f8050;
  --green-dark: #256941;
  --sage: #e0eee3;
  --cream: #f8f7f0;
  --paper: #fffef9;
  /* Opacité du tableau et des cartes : .65 = 65 %. Le texte reste opaque. */
  --surface: rgba(255, 254, 249, .65);
  --line: #dedfd4;
  --orange: #9c3e00;
  --danger: #ab2e24;
  --radius: 18px;
  --page-width: 1140px;
  font-family: "Aller", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
  accent-color: var(--green);
}

/* ======================================================================
   2. BASE ET ACCESSIBILITÉ
   min-width: 0 permet aux éléments de se replier au lieu de déborder.
   On corrige les largeurs à la source, sans masquer un débordement horizontal.
   ====================================================================== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.55; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; border: 0; }
a { color: inherit; text-underline-offset: 4px; }
p, h1, h2, h3 { margin: 0; overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.16; }
h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 300; letter-spacing: -.02em; }
h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
h3 { font-size: 1.05rem; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
::selection { background: var(--green); color: white; }
h1:focus, main:focus { outline: none; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 20; padding: 12px; background: white; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
/* Masquer visuellement sans retirer les libellés et radios de l'accessibilité. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 12px 20px; border: 0; border-radius: 8px; font-size: .83rem; font-weight: 700; text-decoration: none; line-height: 1.4; text-align: center; transition: background-color .15s; }
.button span { font-size: 1.2rem; line-height: 1; }
.button-primary { color: white; background: var(--green); }
.button-primary:hover { background: var(--green-dark); }
.button-outline { color: var(--green-dark); background: transparent; }
.button-outline:hover { background: var(--sage); }
.button-light { color: var(--ink); background: var(--paper); }
.button-light:hover { background: var(--sage); }
.button-danger { color: white; background: var(--danger); }
.icon-button { display: inline-grid; place-items: center; flex-shrink: 0; min-width: 44px; min-height: 44px; padding: 4px; background: transparent; border: 0; border-radius: 8px; color: var(--muted); font-size: 1.6rem; }
.icon-button:hover { color: var(--danger); background: #f6e9e1; }
.text-button { min-height: 44px; background: transparent; border: 0; padding: 8px 0; color: var(--green); font-weight: 700; text-align: left; }
button:disabled { opacity: .45; cursor: default; }
button:disabled:hover { background: transparent; color: var(--muted); }

/* ======================================================================
   3. ACCUEIL ET FONDS
   La couleur reste visible si l'image n'est pas encore dans le dossier.
   La vidéo est décorative : texte et boutons restent sur un fond lisible.
   ====================================================================== */
/* La grille découpe l'écran en trois colonnes égales. Le groupe occupe les
   deux premières : son centre se trouve exactement à 1/3 de l'écran.
   Sa largeur se réduit sur téléphone et le titre peut passer sur deux lignes.
   cover remplit l'écran sans déformer la photo, avec recadrage si nécessaire. */
.welcome { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; padding-block: max(24px, env(safe-area-inset-top), env(safe-area-inset-bottom)); background-color: #314e40; background-image: linear-gradient(rgba(20, 40, 31, .25), rgba(20, 40, 31, .25)), url("assets/images/fondaccueil.jpg"); background-position: center; background-size: cover; background-repeat: no-repeat; }
.welcome-content { grid-column: 1 / 3; justify-self: center; display: grid; justify-items: center; gap: 26px; width: calc(100% - 2 * max(24px, env(safe-area-inset-left), env(safe-area-inset-right))); max-width: 640px; min-width: 0; text-align: center; }
.welcome h1 { position: relative; isolation: isolate; color: var(--paper); font-size: clamp(1.8rem, 7vw, 4rem); text-shadow: 0 1px 4px rgba(0,0,0,.25); }
/* Le flou léger porte sur la photo, jamais sur les lettres. Le masque radial
   estompe progressivement les bords au lieu de dessiner un rectangle.
   Les préfixes -webkit permettent le même effet dans Safari sur iOS. */
.welcome h1::before { content: ""; position: absolute; inset: -14px -20px; z-index: -1; background: rgba(20,40,31,.06); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, rgba(0,0,0,.55) 60%, transparent 85%); mask-image: radial-gradient(ellipse at center, #000 35%, rgba(0,0,0,.55) 60%, transparent 85%); pointer-events: none; }
/* Fond à 38 % d'opacité ; le libellé reste à pleine opacité, sans bordure. */
.welcome .button { min-width: min(200px, 100%); max-width: 100%; font-size: 1rem; font-weight: 400; padding: 15px 26px; background: rgba(255,254,249,.38); color: var(--paper); text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.welcome .button:hover { background: rgba(255,254,249,.46); }
/* Le fond est au niveau 0 et le contenu au niveau 1 : aucune couche négative.
   L'image de secours remplit l'écran sans déformation. La vidéo la recouvre
   uniquement lorsqu'elle joue. Le voile crème léger est à 20 % d'opacité. */
.site-background { position: fixed; inset: 0; z-index: 0; background: var(--cream) url("assets/images/fond.jpg") center / cover no-repeat; pointer-events: none; }
.site-background video { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.site-background[data-video-playing="true"] video { opacity: 1; }
.site-background::after { content: ""; position: absolute; inset: 0; background: rgba(248,247,240,.20); }

/* ======================================================================
   4. NAVIGATION ET STRUCTURE DES PAGES
   ====================================================================== */
.welcome, .app { position: relative; z-index: 1; }
.app { padding: 0 max(28px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left)); }
/* Seul l'onglet actif reçoit une capsule verte ; son texte devient blanc.
   Tous les onglets ont le même espacement pour éviter un décalage au clic. */
.site-header { max-width: var(--page-width); min-height: 80px; margin: 0 auto; display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 16px 28px; }
.main-nav { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 24px; width: 100%; }
.main-nav-left { display: flex; flex-wrap: wrap; flex: 1 1 0; gap: 6px 24px; min-width: 0; }
.main-nav > a[data-page="sondage"] { margin-left: auto; justify-content: flex-end; text-align: right; }
.main-nav a { display: flex; align-items: center; justify-content: flex-start; min-height: 44px; padding: 10px 14px; border-radius: 999px; color: var(--ink); font-size: 1.05rem; font-weight: 700; text-decoration: none; }
.main-nav a:hover { text-decoration: underline; }
.main-nav a[aria-current="page"] { background: var(--green); color: white; text-decoration: none; }
main { max-width: var(--page-width); margin-inline: auto; }
/* Message discret et persistant : une panne ne ressemble pas à un succès. */
.connection-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 12px 18px; margin-top: 16px; background: var(--surface); border-radius: var(--radius); font-size: .85rem; }
.connection-status p { flex: 1 1 220px; min-width: 0; }
.data-tools { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.data-tools summary { cursor: pointer; color: var(--green-dark); font-size: .85rem; }
.page { padding-top: 52px; padding-bottom: 60px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 32px; }
.page-heading > div { min-width: 0; }
.page-heading > .button { flex-shrink: 0; align-self: flex-start; margin-top: 5px; }
/* Le tableau, les cartes et les informations du récap, ainsi que le sondage,
   partagent la même surface claire et translucide, qui laisse voir la vidéo.
   Ne pas utiliser opacity sur le conteneur : cela atténuerait aussi le texte. */
.panel { min-width: 0; background: transparent; border: 0; border-radius: var(--radius); }
.organisation-panel, .person-card, .unassigned-panel, .stay-info,
.vote-panel, .results-panel, .respondents-panel, #poll-empty,
#page-sondage .page-heading { background: var(--surface); border: 1px solid rgba(222,223,212,.7); border-radius: var(--radius); }
#page-sondage .page-heading { padding: 22px 28px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding: 26px 28px; }
.panel-heading > div { min-width: 0; }
.panel-heading p { margin-top: 7px; color: var(--muted); font-size: .78rem; }
.panel-heading > a { font-size: .8rem; }

/* ======================================================================
   5. TABLEAU D'ORGANISATION
   Les lignes gardent quatre colonnes sur ordinateur. Sur téléphone, l'objet
   occupe toute la largeur ; quantité et personne restent côte à côte.
   ====================================================================== */
.preparation-columns, .item-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, .9fr) minmax(0, 1.15fr) 160px; align-items: center; gap: 14px; padding: 14px 28px; }
.preparation-columns { background: rgba(241,242,233,.3); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; font-size: .8rem; color: var(--muted); font-weight: 700; }
.item-row { margin: 0; padding-block: 9px; }
.item-row + .item-row { border-top: 1px solid #ecece2; }
.item-field { min-width: 0; }
.item-label { display: block; margin-bottom: 5px; font-size: .73rem; font-weight: 700; }
/* Les titres visuels du tableau doublent les vrais labels accessibles. */
@media (min-width: 701px) { .item-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; } }
input:not([type="radio"]):not([type="checkbox"]), select { display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 46px; padding: 11px 12px; border: 1px solid #a4b19c; border-radius: 7px; background: transparent; color: var(--ink); font-size: 16px; line-height: 1.35; }
input::placeholder { color: var(--muted); opacity: 1; }
/* Seuls les exemples du tableau sont atténués. Le texte saisi reste à 16px,
   à pleine opacité, pour conserver la lisibilité et éviter le zoom d'iOS. */
.item-editor input::placeholder { font-size: .8rem; color: #65736a; opacity: .5; }
.person-select-field { position: relative; min-width: 0; }
.person-select-placeholder { position: absolute; top: 50%; left: 12px; right: 26px; transform: translateY(-50%); pointer-events: none; font-size: .8rem; color: #65736a; opacity: .5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-select-field select[data-empty="true"] { color: transparent; }
.person-select-field select[data-empty="false"] + .person-select-placeholder { display: none; }
/* Le menu natif doit rester lisible une fois déplié. */
option { background: var(--paper); color: var(--ink); }
select { padding-right: 26px; text-overflow: ellipsis; }
input:hover, select:hover, input:focus, select:focus { border-color: var(--green); }
input { caret-color: var(--green); }
/* Les lignes validées affichent du texte, sans champ modifiable.
   Modifier ouvre une copie : Annuler conserve les valeurs déjà validées. */
.item-text { display: block; min-width: 0; font-size: .92rem; overflow-wrap: anywhere; }
.item-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.item-actions .text-button { font-size: .75rem; }
.item-actions .button { padding-inline: 14px; }
.item-actions [data-edit-item] { color: var(--orange); }
.danger-text { color: var(--danger); }
.item-error { grid-column: 1 / -1; margin: 0; }
.item-error:empty { display: none; }
.panel-foot { display: flex; justify-content: center; padding: 26px 28px; border-top: 1px solid var(--line); }
.recap-button { min-height: 54px; min-width: min(280px, 100%); max-width: 100%; font-size: 1.1rem; padding: 15px 24px; }

/* ======================================================================
   6. SONDAGE, RÉSULTATS ET LISTES PAR PERSONNE
   ====================================================================== */
.empty-state { padding: 52px 24px; text-align: center; }
.empty-state p { max-width: 560px; margin: 12px auto 0; color: var(--muted); font-size: .86rem; }
.poll-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; align-items: start; }
.field-label { display: block; margin: 0 0 7px; font-size: .8rem; font-weight: 700; }
.field-hint { margin-top: 8px; font-size: .72rem; color: var(--muted); }
#vote-form { padding: 26px 28px 28px; }
.vote-options { display: grid; gap: 12px; margin-block: 25px; }
.vote-date { min-width: 0; border: 0; margin: 0; padding: 0; }
.vote-date + .vote-date { border-top: 1px solid var(--line); padding-top: 12px; }
/* Les boutons suivent la date s'il reste de la place, puis passent dessous.
   La hauteur minimale de 44px conserve une cible confortable sur téléphone. */
.vote-option-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; }
.vote-period { flex: 1 1 200px; min-width: 0; font-size: .84rem; font-weight: 700; }
.vote-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choice { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 54px; min-height: 44px; padding: 7px 12px; border: 0; border-radius: 999px; background: var(--choice-light); color: var(--choice-ink); font-size: .75rem; font-weight: 700; cursor: pointer; transition: background-color .15s; }
.choice-yes { --choice-light: var(--sage); --choice-ink: var(--green-dark); --choice-selected: var(--green); --choice-selected-ink: #ffffff; }
.choice-maybe { --choice-light: #fff0b7; --choice-ink: #614909; --choice-selected: #f2c855; --choice-selected-ink: #51370a; }
.choice-no { --choice-light: #f7ddd7; --choice-ink: var(--danger); --choice-selected: var(--danger); --choice-selected-ink: #ffffff; }
.choice:hover { filter: brightness(.96); }
.choice:has(input:checked) { background: var(--choice-selected); color: var(--choice-selected-ink); }
.choice:has(input:focus-visible) { outline: 3px solid var(--green); outline-offset: 3px; }
.response-count { font-size: .78em; font-weight: 400; }
#poll-results { padding: 0 28px 28px; }
.date-result + .date-result { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.date-result h3 { font-size: .84rem; line-height: 1.5; }
.result-track { display: flex; height: 8px; margin: 13px 0; border-radius: 20px; overflow: hidden; background: #eeeee4; }
.result-track span { height: 100%; }
.segment-yes { background: var(--green); }
.segment-maybe { background: #d5b14d; }
.segment-no { background: var(--danger); }
.result-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .72rem; color: var(--muted); }
.result-legend b { color: var(--ink); }
.legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.respondents-panel { margin-top: 24px; }
.respondent { padding: 18px 28px; border-top: 1px solid var(--line); }
.respondent-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 12px; }
.respondent-heading h3 { min-width: 0; }
.response-delete { min-height: 44px; padding: 7px 13px; border-radius: 999px; color: var(--danger); font-size: .75rem; }
.response-delete:hover { background: #f7ddd7; }
.response-details { display: grid; gap: 8px; }
.response-detail { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: .76rem; color: var(--muted); }
.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: .69rem; font-weight: 700; white-space: nowrap; }
.badge-yes, .badge-maybe, .badge-no { color: var(--ink); }
.no-responses { color: var(--muted); font-size: .83rem; padding: 0 28px 24px; }
/* Le bloc d'informations remplit la largeur du contenu, avec le même fond
   translucide que les cartes. Son texte reste à pleine opacité.
   Deux colonnes : lieu / adresse / dates à gauche ; prix / répartition à
   droite, avec une largeur 1,4 fois supérieure. Les colonnes se superposent
   à moins de 800px (voir section 8). */
.stay-info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; gap: 32px; width: 100%; max-width: 100%; min-width: 0; padding: 26px 28px; margin-bottom: 30px; font-size: .86rem; }
.stay-info dl { display: grid; gap: 12px; min-width: 0; margin: 0; }
.stay-info-row { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: start; gap: 10px; }
.stay-info dt { font-size: 1.1rem; line-height: 1.4; }
.stay-info dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.stay-info a { text-decoration-thickness: 1px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; }
.summary-grid > .empty-state { grid-column: 1 / -1; }
.person-card { padding: 25px; }
.person-card-header { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 18px; text-align: center; }
.person-card-header > div { min-width: 0; width: 100%; }
.packing-list { list-style: none; padding: 0; margin: 0; }
.packing-list li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; padding: 13px 0; border-top: 1px solid var(--line); font-size: .82rem; }
.packing-list .quantity { color: var(--muted); font-size: .76rem; }
.unassigned-panel { margin-top: 24px; }
.unassigned-panel .packing-list { padding: 0 28px 20px; }

/* ======================================================================
   7. FENÊTRES ET MESSAGES
   dialog fournit la gestion native du focus, du clavier et de la touche Échap.
   ====================================================================== */
dialog { width: min(520px, calc(100% - 32px)); max-width: calc(100% - 32px); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: var(--paper); box-shadow: 0 20px 80px #182d3430; }
dialog::backdrop { background: rgba(23,40,31,.48); }
body:has(dialog[open]) { overflow: hidden; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.poll-dialog-heading { justify-content: flex-end; margin-bottom: 6px; }
dialog form > p:not(.form-error):not(.field-hint) { font-size: .85rem; color: var(--muted); margin-bottom: 22px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.form-error { color: var(--danger); font-size: .8rem; margin-top: 10px; }
#person-name::placeholder { color: #65736a; opacity: .6; }
#person-error:empty { display: none; }
.poll-dialog { width: min(640px, calc(100% - 32px)); }
.date-ranges { display: grid; gap: 14px; margin-top: 24px; }
.date-range { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) 44px; align-items: end; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.date-range > div { min-width: 0; }
input[type="date"] { appearance: none; -webkit-appearance: none; min-height: 46px; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; min-height: 1.35em; }
.replace-warning { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 14px; border-left: 3px solid var(--danger); font-size: .77rem; }
.replace-warning input { margin-top: 4px; accent-color: var(--green); flex-shrink: 0; }
.toast { position: fixed; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 30; width: max-content; max-width: calc(100% - 32px); padding: 14px 20px; background: var(--green-dark); border-radius: 10px; color: white; font-size: .83rem; box-shadow: 0 6px 28px #21332b26; overflow-wrap: anywhere; }
.noscript-notice { position: fixed; bottom: 0; left: 0; right: 0; padding: 16px; background: var(--paper); color: var(--ink); text-align: center; }

/* ======================================================================
   8. TABLETTES ET TÉLÉPHONES
   Les cartes remplacent les colonnes quand l'espace devient insuffisant.
   Les champs restent à 16px pour éviter le zoom automatique d'iOS.
   ====================================================================== */
@media (max-width: 1000px) {
  .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .preparation-columns, .item-row { gap: 10px; padding-inline: 20px; }
}
@media (max-width: 800px) {
  .stay-info { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .poll-layout { grid-template-columns: minmax(0,1fr); }
  .page-heading { align-items: flex-start; }
  .page-heading > .button { flex-shrink: 1; }
}
@media (max-width: 700px) {
  .app { padding-inline: max(18px, env(safe-area-inset-left)) max(18px, env(safe-area-inset-right)); }
  .site-header { flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px 0 16px; min-height: auto; }
  .main-nav { width: 100%; gap: 4px 16px; }
  .main-nav-left { gap: 4px 16px; }
  .main-nav a { font-size: .95rem; }
  .page { padding-top: 32px; padding-bottom: 36px; }
  .page-heading { flex-wrap: wrap; gap: 20px; margin-bottom: 25px; }
  .page-heading > .button { margin-top: 0; }
  #page-sondage .page-heading { padding: 22px 18px; }
  .panel-heading { padding: 22px 18px; }
  .stay-info { padding: 22px 18px; }
  .preparation-columns { display: none; }
  /* TABLEAU MOBILE — trois informations sur deux niveaux, sans défilement
     horizontal. « Quoi » utilise la première ligne ; « Combien » et « Qui »
     se partagent la suivante. Un peu plus de place est réservée aux noms.
     Ces règles restent limitées aux écrans de 700px ou moins. */
  .item-row { grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); align-items: start; gap: 10px 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
  .item-row > .item-field { grid-column: auto; }
  .item-row > .item-field:first-child { grid-column: 1 / -1; }
  .item-actions { grid-column: 1 / -1; gap: 4px 14px; }
  .item-editor .item-actions > .button { flex: 0 1 auto; min-width: 108px; }
  /* Une ligne validée se lit comme une petite fiche : le nom de l'objet est
     son titre. Les deux autres libellés restent visibles pour comparer les
     quantités et les personnes. Les longs textes se replient naturellement. */
  .item-saved > .item-field:first-child .item-label { display: none; }
  .item-saved > .item-field:first-child .item-text { font-size: 1rem; font-weight: 700; }
  .item-saved .item-label { margin-bottom: 3px; }
  .item-saved .item-actions .text-button { padding-block: 6px; }
  .panel-foot { padding: 22px 18px; }
  #vote-form { padding: 22px 18px; }
  #poll-results { padding: 0 18px 22px; }
  .respondent { padding: 18px; }
  .summary-grid { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .person-card { padding: 22px; }
  .unassigned-panel .packing-list { padding-inline: 18px; }
  dialog { padding: 20px; }
  .date-range { grid-template-columns: minmax(0,1fr) 44px; gap: 12px 8px; }
  .date-range > div { grid-column: 1; }
  .date-range > .icon-button { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .dialog-actions > .button { flex: 1; }
}
/* Respecter le réglage système "réduire les animations" (dont iOS). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .site-background video { display: none; }
}
