/* ==========================================================================
   YALOUTA — Système visuel v1 (25/11/2026)
   Couche de présentation uniquement : aucun id, aucun script, aucun parcours.
   Les classes y-* sont une référence ; à l'intégration, Muse les applique aux
   sélecteurs existants (ou les ajoute à côté des classes fonctionnelles,
   jamais à leur place).
   Points de rupture : téléphone < 768 px · tablette 768–1199 px · PC ≥ 1200 px
   Contrainte : tout en rem / em, aucune hauteur figée → impeccable à 140 %.
   ========================================================================== */

:root {
  /* Couleurs imposées */
  --nuit: #0B2A4A;
  --nuit-2: #12365C;
  --nuit-3: #071B31;
  --or: #C9A227;
  --or-clair: #F3E7B8;
  --creme: #FAF6EE;
  --texte: #1B2A3A;
  --gris: #5B6B7B;
  --trait: #E8E0CE;
  --vert: #2E7D5B;
  --rouge: #B3261E;
  --bord-champ: #CFC6B3;

  /* Dérivées (teintes de fond pour badges / alertes) */
  --blanc: #FFFFFF;
  --or-fonce: #7A5F0E;      /* texte sur or clair, contraste 6,1:1 */
  --vert-fond: #E7F2EC;
  --rouge-fond: #FBE9E7;
  --nuit-fond: #EAF0F6;
  --gris-fond: #F1EEE6;

  /* Typographie */
  --f-titre: "Lora", Georgia, "Times New Roman", serif;
  --f-texte: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-display: 2.5rem;   /* 40 — hero téléphone ; 56 sur PC */
  --fs-h1: 1.875rem;      /* 30 ; 36 sur PC */
  --fs-h2: 1.5rem;        /* 24 ; 28 sur PC */
  --fs-h3: 1.25rem;       /* 20 */
  --fs-h4: 1.0625rem;     /* 17 */
  --fs-body: 1rem;        /* 16 — jamais moins dans un champ (zoom iOS) */
  --fs-small: 0.875rem;   /* 14 */
  --fs-caption: 0.8125rem;/* 13 — minimum absolu */
  --lh-titre: 1.2;
  --lh-texte: 1.55;

  /* Espacements (base 4) */
  --s-1: 0.25rem;  --s-2: 0.5rem;  --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.25rem;  --s-6: 1.5rem;  --s-7: 1.75rem; --s-8: 2rem;
  --s-10: 2.5rem;  --s-12: 3rem;   --s-16: 4rem;   --s-24: 6rem;

  /* Rayons */
  --r-champ: 0.625rem;   /* 10 */
  --r-bouton: 0.75rem;   /* 12 */
  --r-carte: 1rem;       /* 16 */
  --r-feuille: 1.5rem;   /* 24 */
  --r-pilule: 999px;

  /* Ombres (teintées nuit, très légères) */
  --o-1: 0 1px 2px rgba(7, 27, 49, .06);
  --o-2: 0 2px 6px rgba(7, 27, 49, .06), 0 8px 24px rgba(7, 27, 49, .06);
  --o-3: 0 12px 40px rgba(7, 27, 49, .16);

  /* Gabarit */
  --largeur-max: 75rem;      /* 1200 — contenu admin */
  --largeur-form: 42rem;     /* 672 — formulaires : jamais étirés */
  --largeur-lecture: 40rem;  /* textes longs, pages légales */
  --entete: 4.5rem;          /* 72 */
  --logo-h: 2.875rem;        /* 46 */
  --menu-lateral: 17rem;     /* 272 */
  --cible: 2.75rem;          /* 44 — cible tactile minimum */
  --gouttiere: 1rem;
  --focus: 0 0 0 3px var(--blanc), 0 0 0 5px var(--or);
}

@media (min-width: 48em) {           /* tablette */
  :root { --gouttiere: 1.75rem; --fs-display: 3rem; }
}
@media (min-width: 75em) {           /* PC */
  :root {
    --gouttiere: 2.5rem;
    --fs-display: 3.5rem;
    --fs-h1: 2.25rem;
    --fs-h2: 1.75rem;
  }
}

/* -------------------------------------------------------------- Base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-texte);
  font-size: var(--fs-body);
  line-height: var(--lh-texte);
  color: var(--texte);
  background: var(--creme);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
h1, h2, h3, h4, .y-h1, .y-h2, .y-h3, .y-h4 {
  font-family: var(--f-titre);
  font-weight: 600;
  line-height: var(--lh-titre);
  color: var(--nuit);
  margin: 0;
  text-wrap: balance;
}
h1, .y-h1 { font-size: var(--fs-h1); }
h2, .y-h2 { font-size: var(--fs-h2); }
h3, .y-h3 { font-size: var(--fs-h3); }
h4, .y-h4 { font-size: var(--fs-h4); }
p { margin: 0; }
a { color: var(--nuit); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--nuit-2); text-decoration-color: var(--or); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-bouton); }
img, svg { max-width: 100%; }
.y-ico { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.y-eyebrow { font-size: var(--fs-caption); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--or-fonce); }
.y-lead { font-size: 1.125rem; color: var(--gris); max-width: 38em; }
.y-muted { color: var(--gris); }
.y-small { font-size: var(--fs-small); }
.y-num { font-variant-numeric: tabular-nums; }
.y-code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .9375em; letter-spacing: .06em; background: var(--gris-fond);
  padding: .1em .45em; border-radius: .375rem; white-space: nowrap; }

/* ----------------------------------------------------------- Gabarit ----- */
.y-container { width: 100%; max-width: calc(var(--largeur-max) + 2 * var(--gouttiere));
  margin-inline: auto; padding-inline: var(--gouttiere); }
.y-narrow { max-width: var(--largeur-form); }
.y-reading { max-width: var(--largeur-lecture); }
.y-stack { display: flex; flex-direction: column; gap: var(--gap, var(--s-6)); }
.y-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, var(--s-3)); }
.y-section { padding-block: var(--s-10); }
@media (min-width: 75em) { .y-section { padding-block: var(--s-16); } }

/* Grilles auto-adaptatives : jamais de colonne plus étroite que --min */
.y-grid { display: grid; gap: var(--gap, var(--s-6));
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 18rem)), 1fr)); }

/* Vue d'ensemble 3 blocs : 1 col téléphone · 2 col tablette (1er bloc pleine largeur) · 3 col PC */
.y-overview { display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
@media (min-width: 48em) {
  .y-overview { grid-template-columns: 1fr 1fr; }
  .y-overview > :first-child { grid-column: 1 / -1; }
}
@media (min-width: 75em) {
  /* 3 colonnes à 100 % ; repasse seul à 2 colonnes quand le texte est agrandi (140 %) */
  .y-overview { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: var(--s-7); }
  .y-overview > :first-child { grid-column: auto; }
}

/* Formulaire : 1 col téléphone, 2 col dès tablette pour les champs courts */
.y-form-grid { display: grid; gap: var(--s-5) var(--s-6); grid-template-columns: 1fr; }
@media (min-width: 48em) {
  .y-form-grid { grid-template-columns: 1fr 1fr; }
  .y-form-grid > .y-span-2 { grid-column: 1 / -1; }
}

/* En-tête de page */
.y-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: var(--s-4) var(--s-6); margin-bottom: var(--s-8); }
.y-pagehead > div:first-child { flex: 1 1 18rem; min-width: 0; }
.y-pagehead p { color: var(--gris); margin-top: var(--s-2); }

/* ----------------------------------------------------------- Boutons ----- */
.y-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: var(--cible);
  padding: .625rem 1.25rem;
  font: 600 var(--fs-body)/1.25 var(--f-texte);
  text-align: center; text-decoration: none; white-space: normal;
  border: 1px solid transparent; border-radius: var(--r-bouton);
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  max-width: 100%;
}
.y-btn--primary { background: var(--nuit); color: var(--blanc); }
.y-btn--primary:hover { background: var(--nuit-2); color: var(--blanc); }
.y-btn--primary:active { background: var(--nuit-3); }
.y-btn--gold { background: var(--or); color: var(--nuit-3); }
.y-btn--gold:hover { background: #D6B23E; color: var(--nuit-3); }
.y-btn--secondary { background: var(--blanc); color: var(--nuit); border-color: var(--bord-champ); }
.y-btn--secondary:hover { border-color: var(--nuit); color: var(--nuit); }
.y-btn--ghost { background: transparent; color: var(--nuit); }
.y-btn--ghost:hover { background: var(--gris-fond); color: var(--nuit); }
.y-btn--danger { background: var(--rouge); color: var(--blanc); }
.y-btn--danger:hover { background: #962019; color: var(--blanc); }
.y-btn--on-dark { background: transparent; color: var(--blanc); border-color: rgba(255,255,255,.35); }
.y-btn--on-dark:hover { border-color: var(--or); color: var(--blanc); }
.y-btn--lg { min-height: 3.25rem; padding: .875rem 1.75rem; font-size: 1.0625rem; border-radius: .875rem; }
.y-btn--sm { min-height: 2.25rem; padding: .375rem .875rem; font-size: var(--fs-small); }
@media (pointer: coarse) { .y-btn--sm { min-height: var(--cible); } }
.y-btn--block { width: 100%; }
.y-btn--icon { padding: .5rem; min-width: var(--cible); }
.y-btn[disabled], .y-btn.is-disabled { background: var(--gris-fond); color: #9AA5B1;
  border-color: transparent; cursor: not-allowed; }
.y-btn.is-loading { pointer-events: none; opacity: .85; }
.y-btn.is-loading::before { content: ""; width: 1em; height: 1em; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: y-spin .7s linear infinite; }
.y-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
@media (max-width: 47.99em) {
  .y-actions--stack-phone { flex-direction: column-reverse; }
  .y-actions--stack-phone > .y-btn { width: 100%; }
}

/* ------------------------------------------------------------ Champs ----- */
.y-field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.y-label { font-weight: 600; font-size: .9375rem; color: var(--texte); }
.y-label .y-opt { font-weight: 400; color: var(--gris); }
.y-input, .y-select, .y-textarea {
  width: 100%; min-height: 3rem;
  padding: .75rem 1rem;
  font: 400 1rem/1.4 var(--f-texte); color: var(--texte);
  background: var(--blanc); border: 1px solid var(--bord-champ); border-radius: var(--r-champ);
  transition: border-color .15s, box-shadow .15s;
}
.y-textarea { min-height: 7.5rem; resize: vertical; }
.y-input::placeholder, .y-textarea::placeholder { color: #8A96A3; }
.y-input:hover, .y-select:hover, .y-textarea:hover { border-color: #A99F89; }
.y-input:focus, .y-select:focus, .y-textarea:focus { outline: none; border-color: var(--nuit);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, .35); }
.y-input[disabled], .y-select[disabled] { background: var(--gris-fond); color: var(--gris); }
.y-input[readonly] { background: var(--creme); }
.y-select { appearance: none; padding-inline-end: 2.75rem;
  background: var(--blanc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B2A4A' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .875rem center / 1.125rem; }
[dir="rtl"] .y-select { background-position: left .875rem center; }
.y-help { font-size: var(--fs-small); color: var(--gris); }
.y-field.is-invalid .y-input, .y-field.is-invalid .y-select, .y-field.is-invalid .y-textarea,
.y-input[aria-invalid="true"] { border-color: var(--rouge); box-shadow: 0 0 0 3px rgba(179, 38, 30, .12); }
.y-error { display: flex; gap: .4em; align-items: flex-start; font-size: var(--fs-small);
  font-weight: 500; color: var(--rouge); }
.y-field.is-valid .y-input { border-color: var(--vert); }
.y-input-group { display: flex; align-items: stretch; }
.y-input-group > .y-input { border-start-end-radius: 0; border-end-end-radius: 0; flex: 1; min-width: 0; }
.y-input-group > .y-btn { border-start-start-radius: 0; border-end-start-radius: 0; }

/* Code chambre / code hôtel : saisie large, espacée */
.y-input--code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.25rem; letter-spacing: .18em; text-transform: uppercase; text-align: center; min-height: 3.5rem; }

/* Cases, radios, interrupteurs */
.y-check { display: flex; align-items: flex-start; gap: .75rem; cursor: pointer;
  min-height: var(--cible); padding-block: .6rem; line-height: 1.45; }
.y-check input { appearance: none; flex: none; width: 1.375rem; height: 1.375rem; margin: .05rem 0 0;
  border: 1.5px solid var(--bord-champ); border-radius: .375rem; background: var(--blanc);
  display: grid; place-content: center; cursor: pointer; transition: .15s; }
.y-check input[type="radio"] { border-radius: 50%; }
.y-check input:checked { background: var(--nuit); border-color: var(--nuit); }
.y-check input[type="checkbox"]:checked::after { content: ""; width: .375rem; height: .7rem;
  border: solid var(--blanc); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.y-check input[type="radio"]:checked::after { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--blanc); }
.y-check input:focus-visible { box-shadow: var(--focus); }
.y-check input[disabled] { background: var(--gris-fond); }
.y-switch { display: flex; align-items: center; gap: .75rem; cursor: pointer; min-height: var(--cible); }
.y-switch input { appearance: none; flex: none; width: 2.75rem; height: 1.625rem; border-radius: 999px;
  background: #CBD2DA; position: relative; cursor: pointer; transition: .2s; margin: 0; }
.y-switch input::after { content: ""; position: absolute; top: .1875rem; inset-inline-start: .1875rem;
  width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--blanc); box-shadow: var(--o-1); transition: .2s; }
.y-switch input:checked { background: var(--vert); }
.y-switch input:checked::after { inset-inline-start: 1.3125rem; }
.y-switch input:focus-visible { box-shadow: var(--focus); }

/* Choix à cocher en tuiles (repas / activités / services de la fiche hôtel) */
.y-choices { display: grid; gap: var(--s-3);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.y-choice { display: flex; gap: .75rem; align-items: flex-start; padding: .875rem 1rem;
  background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r-champ); cursor: pointer; }
.y-choice:has(input:checked) { border-color: var(--nuit); background: var(--nuit-fond); }
.y-choice .y-check { min-height: 0; padding: 0; }

/* Groupe de champs (sections d'un formulaire long) */
.y-fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-5); }
.y-fieldset > legend { padding: 0; margin-bottom: var(--s-2); }

/* ------------------------------------------------------------ Cartes ----- */
.y-card { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r-carte);
  padding: var(--s-6); box-shadow: var(--o-1); min-width: 0; }
@media (min-width: 75em) { .y-card { padding: var(--s-7); } }
.y-card--flat { box-shadow: none; }
.y-card--link { text-decoration: none; color: inherit; display: block; transition: box-shadow .15s, border-color .15s; }
.y-card--link:hover { border-color: #D8CDB2; box-shadow: var(--o-2); color: inherit; }
.y-card--dark { background: var(--nuit); border-color: var(--nuit); color: rgba(255,255,255,.82); }
.y-card--dark h2, .y-card--dark h3 { color: var(--blanc); }
.y-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s-2) var(--s-4); margin-bottom: var(--s-5); }
.y-card__head > :first-child { min-width: 0; }
.y-card__foot { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--trait);
  display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between; align-items: center; }
.y-tile-ico { width: 2.75rem; height: 2.75rem; border-radius: .75rem; display: grid; place-items: center;
  background: var(--or-clair); color: var(--nuit); flex: none; }
.y-tile-ico .y-ico { width: 1.375rem; height: 1.375rem; }

/* Bloc « vue d'ensemble » */
.y-block__title { display: flex; align-items: center; gap: .625rem; }
.y-block__count { font: 600 .8125rem/1 var(--f-texte); background: var(--or); color: var(--nuit-3);
  border-radius: 999px; padding: .3rem .55rem; }
.y-list { list-style: none; margin: 0; padding: 0; }
.y-list > li { display: flex; gap: var(--s-3); align-items: flex-start; padding-block: var(--s-4);
  border-top: 1px solid var(--trait); }
.y-list > li:first-child { border-top: 0; padding-top: 0; }
.y-list > li { flex-wrap: wrap; }
.y-list > li > .y-list__main { flex: 1 1 8rem; min-width: 0; }
.y-list__meta { font-size: var(--fs-small); color: var(--gris); }

.y-kpis { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); }
.y-kpi__label { font-size: var(--fs-small); color: var(--gris); }
.y-kpi__value { font: 600 2rem/1.1 var(--f-titre); color: var(--nuit); font-variant-numeric: tabular-nums; margin-top: .25rem; }
.y-kpi__delta { font-size: var(--fs-caption); color: var(--vert); font-weight: 600; }

/* Barre de niveau (batterie vélos / stations) */
.y-meter { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.y-meter__bar { flex: 1; min-width: 3rem; height: .5rem; border-radius: 999px; background: var(--gris-fond); overflow: hidden; }
.y-meter__bar > i { display: block; height: 100%; border-radius: inherit; background: var(--vert); }
.y-meter--low .y-meter__bar > i { background: var(--rouge); }
.y-meter--mid .y-meter__bar > i { background: var(--or); }

/* ----------------------------------------------------------- Badges ------ */
.y-badge { display: inline-flex; align-items: center; gap: .4em; padding: .25rem .625rem;
  font: 600 var(--fs-caption)/1.3 var(--f-texte); border-radius: 999px;
  background: var(--gris-fond); color: var(--gris); white-space: normal; }
.y-badge::before { content: ""; width: .45em; height: .45em; border-radius: 50%; background: currentColor; flex: none; }
.y-badge--ok { background: var(--vert-fond); color: #22614A; }
.y-badge--wait { background: var(--or-clair); color: var(--or-fonce); }
.y-badge--alert { background: var(--rouge-fond); color: var(--rouge); }
.y-badge--info { background: var(--nuit-fond); color: var(--nuit); }
.y-badge--solid { background: var(--nuit); color: var(--blanc); }
.y-badge--pilot { background: transparent; color: var(--or-fonce); box-shadow: inset 0 0 0 1px var(--or); }
.y-badge--plain::before { display: none; }

/* ------------------------------------------------- Onglets / segmenté ---- */
.y-tabs { display: flex; gap: var(--s-1); overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--trait); margin-bottom: var(--s-6); scroll-snap-type: x proximity; }
.y-tabs::-webkit-scrollbar { display: none; }
.y-tab { flex: none; display: inline-flex; align-items: center; gap: .5em; min-height: var(--cible);
  padding: .625rem 1rem; font: 500 .9375rem/1.25 var(--f-texte); color: var(--gris);
  background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px;
  cursor: pointer; text-decoration: none; scroll-snap-align: start; white-space: nowrap; }
.y-tab:hover { color: var(--nuit); }
.y-tab[aria-selected="true"], .y-tab.is-active { color: var(--nuit); font-weight: 600; border-bottom-color: var(--or); }
.y-tab .y-badge { padding: .1rem .45rem; }

.y-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .25rem; padding: .25rem;
  background: var(--gris-fond); border-radius: .875rem; }
.y-seg > button, .y-seg > a { min-height: var(--cible); padding: .5rem .75rem; border: 0; border-radius: .625rem;
  background: transparent; font: 600 .9375rem/1.25 var(--f-texte); color: var(--gris); cursor: pointer;
  text-align: center; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: .4em; }
.y-seg > [aria-selected="true"], .y-seg > .is-active { background: var(--blanc); color: var(--nuit); box-shadow: var(--o-1); }
@media (max-width: 47.99em) { .y-seg--stack-phone { grid-auto-flow: row; } }

/* ----------------------------------------------------------- Tableaux ---- */
.y-table-wrap { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r-carte);
  overflow-x: auto; box-shadow: var(--o-1); }
.y-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.y-table th { text-align: start; font: 600 var(--fs-caption)/1.3 var(--f-texte); letter-spacing: .05em;
  text-transform: uppercase; color: var(--gris); padding: .875rem 1.25rem; background: #FCFAF5;
  border-bottom: 1px solid var(--trait); white-space: nowrap; }
.y-table td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.y-table tbody tr:last-child td { border-bottom: 0; }
.y-table tbody tr:hover { background: #FDFBF6; }
.y-table .y-td-num { text-align: end; font-variant-numeric: tabular-nums; }
.y-table .y-td-actions { text-align: end; white-space: nowrap; }
.y-table__primary { font-weight: 600; color: var(--nuit); }
.y-table__sub { font-size: var(--fs-small); color: var(--gris); }
.y-toolbar { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-bottom: var(--s-4); }
.y-toolbar > .y-search { flex: 1 1 16rem; }
.y-search { position: relative; }
.y-search .y-ico { position: absolute; inset-inline-start: .9rem; top: 50%; transform: translateY(-50%); color: var(--gris); }
.y-search .y-input { padding-inline-start: 2.75rem; }

/* Téléphone : chaque ligne devient une carte (libellé via data-label sur le td) */
@media (max-width: 47.99em) {
  .y-table--stack, .y-table--stack tbody, .y-table--stack tr, .y-table--stack td { display: block; }
  .y-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .y-table-wrap:has(.y-table--stack) { background: none; border: 0; box-shadow: none; overflow: visible; }
  .y-table--stack tr { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r-carte);
    padding: .5rem 1.125rem; margin-bottom: var(--s-3); box-shadow: var(--o-1); }
  .y-table--stack td { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem;
    padding: .625rem 0; border-bottom: 1px solid var(--trait); text-align: start; }
  .y-table--stack td:last-child { border-bottom: 0; }
  .y-table--stack td[data-label]::before { content: attr(data-label); font-size: var(--fs-caption);
    font-weight: 600; color: var(--gris); text-transform: uppercase; letter-spacing: .04em; }
  .y-table--stack td.y-td-actions { justify-content: flex-start; white-space: normal; }
  .y-table--stack td.y-td-num { text-align: start; }
}

/* ------------------------------------------------------- Navigation ------ */
/* Coquille admin : menu latéral (PC) → bandeau défilant (tablette, téléphone). Aucun script. */
.y-shell { min-height: 100vh; min-height: 100dvh; }
.y-sidebar { background: var(--nuit-3); color: rgba(255,255,255,.78); }
.y-sidebar__brand { display: flex; align-items: center; gap: .75rem; min-height: var(--entete);
  padding: .75rem var(--gouttiere); border-bottom: 1px solid rgba(255,255,255,.08); }
.y-sidebar__brand img, .y-logo { height: 2.25rem; width: auto; }
.y-sidebar__role { font-size: var(--fs-caption); color: var(--or-clair); letter-spacing: .06em; text-transform: uppercase; }
.y-nav { list-style: none; margin: 0; padding: .75rem; display: flex; flex-direction: column; gap: .125rem; }
.y-nav__group { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.45); padding: 1rem .875rem .375rem; }
.y-nav a { display: flex; align-items: center; gap: .75rem; min-height: var(--cible); padding: .625rem .875rem;
  border-radius: .625rem; color: inherit; text-decoration: none; font-weight: 500; font-size: .9375rem; line-height: 1.3; }
.y-nav a:hover { background: rgba(255,255,255,.06); color: var(--blanc); }
.y-nav a[aria-current="page"], .y-nav a.is-active { background: var(--nuit-2); color: var(--blanc);
  box-shadow: inset 3px 0 0 var(--or); }
[dir="rtl"] .y-nav a[aria-current="page"], [dir="rtl"] .y-nav a.is-active { box-shadow: inset -3px 0 0 var(--or); }
.y-nav a .y-badge { margin-inline-start: auto; background: var(--or); color: var(--nuit-3); }
.y-nav a .y-badge::before { display: none; }
.y-main { min-width: 0; }
.y-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s-4);
  min-height: var(--entete); padding: .5rem var(--gouttiere); background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--trait); }
.y-topbar__title { flex: 1; min-width: 0; font: 600 1.0625rem/1.25 var(--f-titre); color: var(--nuit); }
.y-topbar__user { display: flex; align-items: center; gap: .625rem; font-size: var(--fs-small); }
.y-avatar { width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--or-clair); color: var(--nuit); font: 600 .875rem/1 var(--f-texte); }
.y-content { padding: var(--s-8) var(--gouttiere) var(--s-16); max-width: calc(var(--largeur-max) + 2 * var(--gouttiere)); }

@media (min-width: 75em) {
  .y-shell { display: grid; grid-template-columns: var(--menu-lateral) minmax(0, 1fr); }
  .y-sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; }
  .y-content { padding-top: var(--s-10); }
}
@media (max-width: 74.99em) {
  .y-sidebar { position: sticky; top: 0; z-index: 30; }
  .y-sidebar__brand { min-height: 3.75rem; border-bottom: 0; }
  .y-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gouttiere) .75rem;
    gap: .375rem; scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  [dir="rtl"] .y-nav { -webkit-mask-image: linear-gradient(270deg, #000 85%, transparent); mask-image: linear-gradient(270deg, #000 85%, transparent); }
  .y-nav::-webkit-scrollbar { display: none; }
  .y-nav__group { display: none; }
  .y-nav a { flex: none; white-space: nowrap; border-radius: 999px; padding: .5rem 1rem; background: rgba(255,255,255,.06);
    scroll-snap-align: start; }
  .y-nav a[aria-current="page"], .y-nav a.is-active { background: var(--or); color: var(--nuit-3); box-shadow: none; }
  .y-nav a[aria-current="page"] .y-badge { background: var(--nuit-3); color: var(--blanc); }
  .y-topbar { position: static; }
}

/* Navigation du bas (vacancier, téléphone) */
.y-bottomnav { position: fixed; inset-inline: 0; bottom: 0; z-index: 40; display: grid;
  grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--blanc); border-top: 1px solid var(--trait);
  padding: .375rem .25rem calc(.375rem + env(safe-area-inset-bottom)); box-shadow: 0 -4px 20px rgba(7,27,49,.06); }
.y-bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .25rem;
  min-height: 3.5rem; padding: .375rem .125rem; text-decoration: none; color: var(--gris);
  font: 500 .75rem/1.15 var(--f-texte); text-align: center; border-radius: .75rem; hyphens: auto; }
.y-bottomnav a .y-ico { width: 1.5rem; height: 1.5rem; }
.y-bottomnav a[aria-current="page"], .y-bottomnav a.is-active { color: var(--nuit); font-weight: 600; }
.y-bottomnav a[aria-current="page"] .y-ico, .y-bottomnav a.is-active .y-ico { color: var(--nuit);
  background: var(--or-clair); border-radius: 999px; padding: .1875rem .875rem; box-sizing: content-box; }
.y-has-bottomnav { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
@media (min-width: 48em) {   /* tablette / PC : la nav du bas devient une barre haute centrée */
  .y-bottomnav { position: sticky; top: 0; bottom: auto; border-top: 0; border-bottom: 1px solid var(--trait);
    box-shadow: none; grid-auto-columns: minmax(0, 9rem); justify-content: center; padding: .25rem var(--gouttiere); }
  .y-bottomnav a { flex-direction: row; justify-content: center; min-height: 3.25rem; font-size: .875rem; gap: .5rem; }
  .y-bottomnav a[aria-current="page"] .y-ico { padding: 0; background: none; }
  .y-bottomnav a[aria-current="page"] { background: var(--or-clair); }
  .y-has-bottomnav { padding-bottom: var(--s-16); }
}

/* En-tête public (accueil, connexion…) : 72 px, logo 46 px */
.y-public-header { min-height: var(--entete); display: flex; align-items: center; gap: var(--s-4);
  justify-content: space-between; padding-inline: var(--gouttiere); background: var(--blanc);
  border-bottom: 1px solid var(--trait); }
.y-public-header .y-logo { height: var(--logo-h); }
.y-lang { width: auto; min-height: 2.5rem; padding: .375rem 2rem .375rem .75rem; font-size: var(--fs-small); border-radius: 999px; }

/* ------------------------------------- Alertes, toasts, modales ---------- */
.y-alert { display: flex; gap: .75rem; align-items: flex-start; padding: 1rem 1.125rem; border-radius: var(--r-champ);
  border: 1px solid; font-size: .9375rem; line-height: 1.5; }
.y-alert .y-ico { margin-top: .1rem; }
.y-alert strong { display: block; margin-bottom: .125rem; }
.y-alert--info { background: var(--nuit-fond); border-color: #C9D6E4; color: var(--nuit); }
.y-alert--ok { background: var(--vert-fond); border-color: #BBDACB; color: #1F5A43; }
.y-alert--warn { background: #FBF4DA; border-color: #EAD68E; color: var(--or-fonce); }
.y-alert--error { background: var(--rouge-fond); border-color: #F0C3BE; color: var(--rouge); }

.y-toasts { position: fixed; z-index: 60; inset-inline-end: var(--gouttiere); bottom: var(--gouttiere);
  display: flex; flex-direction: column; gap: .75rem; width: min(24rem, calc(100% - 2 * var(--gouttiere))); }
.y-has-bottomnav .y-toasts { bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
@media (min-width: 48em) { .y-has-bottomnav .y-toasts { bottom: var(--gouttiere); } }
.y-toast { display: flex; gap: .75rem; align-items: flex-start; padding: .875rem 1rem; border-radius: .875rem;
  background: var(--nuit-3); color: var(--blanc); box-shadow: var(--o-3); font-size: .9375rem; }
.y-toast .y-ico { margin-top: .1rem; }
.y-toast--ok .y-ico { color: #7BD3A8; }
.y-toast--error .y-ico { color: #FF9C93; }
.y-toast__close { margin-inline-start: auto; background: none; border: 0; color: rgba(255,255,255,.7);
  min-width: 2rem; min-height: 2rem; cursor: pointer; border-radius: .5rem; display: grid; place-items: center; }

.y-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(7, 27, 49, .55);
  display: flex; align-items: center; justify-content: center; padding: var(--gouttiere); }
.y-modal { background: var(--blanc); border-radius: 1.25rem; box-shadow: var(--o-3); width: 100%;
  max-width: 34rem; max-height: calc(100dvh - 2 * var(--gouttiere)); overflow-y: auto; padding: var(--s-8); }
.y-modal--wide { max-width: 52rem; }
.y-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); }
.y-modal__foot { margin-top: var(--s-8); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-3); }
@media (max-width: 47.99em) {     /* téléphone : feuille qui monte du bas */
  .y-backdrop { align-items: flex-end; padding: 0; }
  .y-modal { border-radius: var(--r-feuille) var(--r-feuille) 0 0; max-height: 92dvh; padding: var(--s-6) var(--s-5) calc(var(--s-6) + env(safe-area-inset-bottom)); }
  .y-modal::before { content: ""; display: block; width: 2.5rem; height: .25rem; border-radius: 999px; background: var(--trait); margin: -.5rem auto var(--s-4); }
  .y-modal__foot { flex-direction: column-reverse; }
  .y-modal__foot .y-btn { width: 100%; }
}

/* ------------------------------------------------------------ États ------ */
.y-empty { text-align: center; padding: var(--s-12) var(--s-6); display: flex; flex-direction: column; align-items: center; gap: var(--s-3); }
.y-empty__ico { width: 4rem; height: 4rem; border-radius: 50%; background: var(--gris-fond); color: var(--gris);
  display: grid; place-items: center; margin-bottom: var(--s-2); }
.y-empty__ico .y-ico { width: 1.75rem; height: 1.75rem; }
.y-empty p { color: var(--gris); max-width: 26rem; }
.y-empty .y-btn { margin-top: var(--s-3); }

.y-skel { display: block; border-radius: .5rem; min-height: .9em;
  background: linear-gradient(90deg, #EFEAE0 0%, #F7F3EB 40%, #EFEAE0 80%); background-size: 200% 100%;
  animation: y-shimmer 1.4s ease-in-out infinite; }
.y-spinner { width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 3px solid var(--trait);
  border-top-color: var(--nuit); animation: y-spin .8s linear infinite; }
@keyframes y-spin { to { transform: rotate(360deg); } }
@keyframes y-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .y-skel, .y-spinner, .y-btn.is-loading::before { animation: none; } }

.y-divider { height: 1px; background: var(--trait); border: 0; margin: var(--s-6) 0; }
.y-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }


/* ==========================================================================
   INTÉGRATION AUX SÉLECTEURS DU SITE (25/11/2026)
   Le système ci-dessus est appliqué aux classes RÉELLES des pages
   (home.css reste la base ; cette feuille est chargée après elle).
   Aucun sélecteur renommé, aucun id touché, aucun script concerné :
   uniquement les valeurs de présentation (espacements, rayons, ombres,
   couleurs des états, tailles minimales).
   ========================================================================== */

/* ---- Rythme général : gouttières et espacements « aérés » du système ---- */
.container { padding-inline: var(--gouttiere); }
.app-main { padding-inline: var(--gouttiere); }
.admin { padding-inline: var(--gouttiere); }
.sheet-in { gap: var(--s-6); padding-top: var(--s-6); }
.panel, .sub-panel { gap: var(--s-6); }
.tabpane > * { margin-bottom: var(--s-6); }
.admin-sec { gap: var(--s-6); }
.admin-sec > h2 { font-size: var(--fs-h2); }
.section-title { font-size: var(--fs-h2); }
.hero h1 { font-size: var(--fs-display); }
.card h2 { font-size: var(--fs-h2); }

/* ---- Cartes : rayon 16, padding 24 (28 sur PC), ombre très légère -------- */
.card { border-radius: var(--r-carte); padding: var(--s-6); box-shadow: var(--o-1); }
.stat { border-radius: var(--r-carte); padding: var(--s-6); }
.report { border-radius: var(--r-carte); padding: var(--s-5) var(--s-6); }
.table-wrap { border-radius: var(--r-carte); box-shadow: var(--o-1); }
@media (min-width: 75em) { .card { padding: var(--s-7); } }

/* ---- Boutons : géométrie et états du système ----------------------------- */
.btn { border-radius: var(--r-bouton); }
.btn.small, .btn-sm { min-height: var(--cible); }
.btn.secondary { border: 1px solid var(--bord-champ); }
.btn.secondary:hover { border-color: var(--nuit); }
.btn.ghost { border: 1px solid var(--trait); }
.btn.ghost:hover { border-color: var(--nuit); }
.btn.danger:hover, .btn-danger:hover { background: #962019; }
.btn.warn { border: 1px solid var(--err); }
.btn.warn:hover { background: var(--rouge-fond); }

/* ---- Champs : filet 1 px, rayon 10, anneau de focus du système ----------- */
.input { border-width: 1px; border-radius: var(--r-champ); }
.input:focus { box-shadow: 0 0 0 3px rgba(201, 162, 39, .35); }
.tabpane input[type="text"], .tabpane input[type="email"], .tabpane input[type="password"],
.tabpane input[type="date"], .tabpane input[type="number"], .tabpane input[type="tel"],
.tabpane select { border-width: 1px; border-radius: var(--r-champ); }
.tabpane input:focus, .tabpane select:focus, textarea:focus { box-shadow: 0 0 0 3px rgba(201, 162, 39, .35); }
textarea { border-width: 1px; border-radius: var(--r-champ); }
.label, .lbl { font-size: .9375rem; }
.check { border-width: 1px; border-radius: var(--r-champ); padding: .875rem 1rem; }
.check input { width: 1.375rem; height: 1.375rem; }
.chip-btn { border: 1px solid var(--bord-champ); }
.chip-btn:hover { border-color: var(--nuit); background: var(--blanc); }

/* ---- Sélecteur segmenté : piste grise, pastille blanche (système) -------- */
.seg { background: var(--gris-fond); border: 0; border-radius: .875rem; padding: .25rem; }
.seg button { border-radius: .625rem; color: var(--gris); }
.seg button.is-active, .seg button[aria-selected="true"] { background: var(--blanc); color: var(--nuit); box-shadow: var(--o-1); }

/* ---- Onglets des espaces (admin, direction, personnel) -------------------
   Le bandeau de pastilles du système : fond nuit profond, pastilles
   translucides, actif or. Sur PC (≥ 1200 px), le rail latéral existant
   prend les couleurs du menu latéral du système (fond nuit-3, actif
   nuit-2 + filet or à gauche). Entre 900 et 1199 px (tablette), on
   revient au bandeau horizontal : la grille latérale ne s'applique
   qu'à partir de 1200 px. */
.tabs { background: var(--nuit-3); border-radius: var(--r-carte); padding: .5rem; gap: .375rem; }
.tabs .tab { background: rgba(255, 255, 255, .06); color: #DCE3EB; border-color: transparent; }
.tabs .tab:hover { background: rgba(255, 255, 255, .12); color: var(--blanc); }
.tabs .tab.active { background: var(--or); color: var(--nuit-3); border-color: transparent; }
@media (min-width: 56.25em) and (max-width: 74.99em) {
  body.wide main.container { display: block; }
  body.wide .tabs { flex-direction: row; overflow-x: auto; position: sticky; top: 5.25rem; padding: .5rem; }
  body.wide .tabs .tab { justify-content: center; border-radius: 999px; }
  body.wide .tabpane { grid-column: auto; }
  /* Revue à froid G21 : dans cette bande, les 13 onglets de la Direction
     défilent horizontalement sans aucun indice visuel (barre masquée).
     Un chevron doré épinglé au bord droit signale qu'il y a plus
     d'onglets à droite ; il reste visible pendant tout le défilement. */
  body.wide .tabs::after { content: '›'; position: sticky; right: 0; flex: none; align-self: center; margin-left: auto; padding: 0 .3rem 0 .9rem; font-size: 1.3rem; font-weight: 700; line-height: 1; color: var(--or); background: linear-gradient(to right, transparent, var(--nuit-3) 55%); }
}
@media (min-width: 75em) {
  body.wide .tabs { background: var(--nuit-3); border: 0; padding: .75rem; }
  body.wide .tabs .tab { color: rgba(255, 255, 255, .78); border-radius: .625rem; }
  body.wide .tabs .tab:hover { background: rgba(255, 255, 255, .06); color: var(--blanc); }
  body.wide .tabs .tab.active { background: var(--nuit-2); color: var(--blanc); box-shadow: inset 3px 0 0 var(--or); }
}

/* ---- Navigation basse du vacancier : blanche (système), actif nuit
   avec pastille or clair derrière l'icône. Le fond nuit historique est
   remplacé ; la variante « très grands caractères » (max-width:21em de
   home.css) est réalignée en tuile or clair. */
.bottom-nav, .tabbar { background: var(--blanc); border-top: 1px solid var(--trait); box-shadow: 0 -4px 20px rgba(7, 27, 49, .06); }
.bottom-nav button, .tabbar .tab { color: var(--gris); border-top: 0; }
.bottom-nav button.active { color: var(--nuit); }
.bottom-nav button.active .ico { color: var(--nuit); background: var(--or-clair); border-radius: 999px; padding: .1875rem .875rem; box-sizing: content-box; }
.tabbar .tab.is-active { color: var(--nuit); }
.tabbar .tab.is-active .ico { color: var(--nuit); background: var(--or-clair); border-radius: 999px; padding: .1875rem .875rem; box-sizing: content-box; }
@media (max-width: 21em) {
  .bottom-nav button.active { background: var(--or-clair); color: var(--nuit); }
  .tabbar .tab.is-active { background: var(--or-clair); color: var(--nuit); }
}

/* ---- Tableaux : en-têtes et cellules du système -------------------------- */
table.admin th, .table th { background: #FCFAF5; padding: .875rem 1.25rem; }
table.admin td, .table td { padding: 1rem 1.25rem; }
table.admin tbody tr:hover, .table tbody tr:hover { background: #FDFBF6; }

/* ---- Statistiques : grille auto-adaptative à toutes les largeurs
   (passe seule de 2 à 1 colonne quand le texte grandit — critère 140 %
   du système ; mesuré : à 390 px et 140 %, l'ancienne grille fixe
   2 colonnes débordait de 24 px) ------------------------------------------ */
.stat-grid, .kpis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }

/* ---- Champs fichier : leur largeur intrinsèque (bouton + nom du fichier)
   ne doit jamais forcer la colonne — mesuré à 140 % sur la fiche hôtel
   (débordement de 81 px sur les champs photo et document) ------------------ */
.field, label.field { min-width: 0; }
input[type="file"] { max-width: 100%; min-width: 0; }

/* ---- Listes, états vides, avatars, toasts -------------------------------- */
.list-item { padding-block: var(--s-4); }
.empty { padding: var(--s-12) var(--s-6); }
.avatar { background: var(--or-clair); color: var(--nuit); }
.avatar.staff { background: var(--accent); color: var(--nuit-3); }
#toast { background: var(--nuit-3); border-radius: .875rem; box-shadow: var(--o-3); }
.toast { background: var(--nuit-3); border-radius: .875rem; }

/* ---- Onglets des espaces : barre défilante sur petit écran (décision
   d'Hafid du 26/11/2026) — une seule rangée qui se fait défiler du doigt,
   le contenu redevient visible dès le premier écran ; la pastille coupée
   au bord signale qu'on peut faire défiler. ---- */
@media (max-width: 37.5em) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs .tab { flex: 0 0 auto; }
  /* Le super-admin porte un bloc intégré qui force le retour à la ligne
     (ancien choix, pour tout voir d'un coup) : la décision du 26/11 prime
     sous 600 px — spécificité égale, cette feuille est chargée après. */
  #tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #tabs::-webkit-scrollbar { display: none; }
}

/* ---- Alertes de formulaire : fonds du système quand elles s'affichent ---- */
.form-error.show { background: var(--rouge-fond); border: 1px solid #F0C3BE; border-radius: var(--r-champ); padding: .875rem 1rem; }
.form-ok.show { background: var(--vert-fond); border: 1px solid #BBDACB; border-radius: var(--r-champ); padding: .875rem 1rem; color: #1F5A43; }

/* ---- Espace personnel sur PC : menu à gauche (point 1, 27/11/2026) ----
   Au comptoir, la réception travaille sur PC : même logique que la
   direction (rail vertical). Sous 1200 px, la barre du bas reste la
   navigation. */
@media (min-width: 75em) {
  body.staff-space { padding-bottom: 0; }
  body.staff-space .bottom-nav {
    position: fixed; top: 5.25rem; left: 0; bottom: 0; right: auto;
    width: 15rem; display: flex; flex-direction: column; justify-content: flex-start;
    gap: .375rem; background: var(--nuit-3); padding: .75rem; z-index: 25;
    box-shadow: none; border-top: 0; border-radius: 0; transform: none;
  }
  body.staff-space .bottom-nav button {
    flex-direction: row; justify-content: flex-start; align-items: center; gap: .625rem;
    min-height: 3rem; padding: .625rem .75rem; border: 0; border-radius: .625rem;
    color: #DCE3EB; font-size: .9rem; text-align: left; background: transparent;
  }
  body.staff-space .bottom-nav button:hover { background: rgba(255,255,255,.06); color: var(--blanc); }
  body.staff-space .bottom-nav button.active { background: var(--nuit-2); color: var(--blanc); box-shadow: inset 3px 0 0 var(--or); border-top-color: transparent; }
  body.staff-space .bottom-nav button .ico { width: 22px; height: 22px; flex: none; }
  body.staff-space .bottom-nav .badge { position: static; margin-left: auto; }
  body.staff-space main.container { margin-left: 15rem; }
}
