/* ==========================================================================
   NumiApp — module STAY (logements chez l'habitant), site public.
   Portée volontairement LIMITÉE à `.numi-stay` : aucune règle ne fuit vers le
   socle ni vers les autres modules (même discipline que grocery/shop/doctoso/
   restaurants/vtc/location/pieces_auto/services).
   L'accent est piloté par la variable --ns-accent, posée par le module
   (`resources/views/stay/_entete.blade.php`) depuis la configuration
   (`config/modules.php` → modules.stay.accent = #FF385C).
   ========================================================================== */

.numi-stay {
    --ns-accent: #FF385C;
    --ns-brand: #1CB084;
    --ns-encre: #16181d;
    --ns-gris: #6b7280;
    --ns-bord: #e6e8ec;
    --ns-fond: #ffffff;
    --ns-fond-doux: #f7f8fa;
    --ns-rayon: 18px;
    color: var(--ns-encre);
    font-family: inherit;
}

.ns-container { width: min(1200px, 94vw); margin: 0 auto; }
.ns-container.ns-narrow { width: min(880px, 94vw); }
.ns-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------------ entête */
.ns-topbar {
    background: var(--ns-fond);
    border-bottom: 1px solid var(--ns-bord);
    position: sticky; top: 0; z-index: 40;
}
.ns-topbar .ns-container { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; }
.ns-brandline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ns-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ns-encre); font-weight: 800; }
.ns-logo-ico { font-size: 22px; line-height: 1; }
.ns-logo-txt { font-size: 20px; letter-spacing: .3px; }
.ns-badge-brand {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
    color: #fff; background: var(--ns-brand); border-radius: 999px; padding: 3px 9px;
}
.ns-slogan { color: var(--ns-gris); font-size: 14px; }
.ns-quick { margin-left: auto; display: flex; gap: 16px; }
.ns-quicklink { color: var(--ns-encre); text-decoration: none; font-weight: 600; font-size: 14px; }
.ns-quicklink:hover { color: var(--ns-accent); }
.ns-searchbar { display: flex; gap: 8px; }
.ns-searchbar input {
    flex: 1; border: 1px solid var(--ns-bord); border-radius: 999px;
    padding: 11px 18px; font-size: 15px; background: var(--ns-fond-doux);
}
.ns-searchbar button {
    border: 0; border-radius: 999px; padding: 0 24px; font-weight: 700; cursor: pointer;
    background: var(--ns-accent); color: #fff;
}

/* -------------------------------------------------------------------- héros */
.ns-hero {
    display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px;
    padding: 40px 0 28px; align-items: start;
}
.ns-pill {
    display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .5px;
    color: var(--ns-accent); background: #fff0f3; border-radius: 999px; padding: 5px 12px; margin-bottom: 14px;
}
.ns-hero h1 { font-size: clamp(26px, 3.6vw, 42px); line-height: 1.15; margin: 0 0 14px; }
.ns-hl { color: var(--ns-accent); }
.ns-hero-copy p { color: var(--ns-gris); font-size: 16px; line-height: 1.6; max-width: 60ch; }
.ns-hero-stats { display: flex; gap: 26px; margin-top: 22px; }
.ns-stat { display: flex; flex-direction: column; }
.ns-stat b { font-size: 24px; }
.ns-stat span { color: var(--ns-gris); font-size: 13px; }

.ns-hero-form {
    background: var(--ns-fond); border: 1px solid var(--ns-bord); border-radius: var(--ns-rayon);
    padding: 22px; box-shadow: 0 14px 34px rgba(16, 24, 40, .08);
}
.ns-hero-form h2 { margin: 0 0 16px; font-size: 18px; }
.ns-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; flex: 1; }
.ns-field > span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ns-gris); }
.ns-field input, .ns-field select, .ns-field textarea {
    border: 1px solid var(--ns-bord); border-radius: 12px; padding: 10px 12px; font-size: 15px;
    background: var(--ns-fond); width: 100%;
}
.ns-field-row { display: flex; gap: 12px; }
.ns-form-note { font-size: 12px; color: var(--ns-gris); margin: 10px 0 0; }

/* ------------------------------------------------------------------ boutons */
.ns-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 12px; padding: 12px 20px; font-weight: 700; font-size: 15px;
    text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .06s ease;
}
.ns-btn:active { transform: translateY(1px); }
.ns-btn-primary { background: var(--ns-accent); color: #fff; }
.ns-btn-ghost { background: transparent; color: var(--ns-encre); border-color: var(--ns-bord); }
.ns-btn-block { width: 100%; }

/* ----------------------------------------------------------------- sections */
.ns-section { padding: 26px 0; }
.ns-section-title { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.ns-section-title h2 { font-size: 21px; margin: 0; }
.ns-section-title a { margin-left: auto; color: var(--ns-accent); text-decoration: none; font-weight: 600; font-size: 14px; }
.ns-sub { color: var(--ns-gris); font-size: 14px; }

.ns-avantages { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.ns-avantage { background: var(--ns-fond); border: 1px solid var(--ns-bord); border-radius: var(--ns-rayon); padding: 18px; }
.ns-avantage-ico { font-size: 22px; display: block; margin-bottom: 8px; }
.ns-avantage b { display: block; margin-bottom: 6px; }
.ns-avantage p { margin: 0; color: var(--ns-gris); font-size: 14px; line-height: 1.5; }

.ns-cats { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.ns-cat {
    min-width: 124px; border: 1px solid var(--ns-bord); border-radius: var(--ns-rayon);
    background: var(--ns-fond); padding: 12px; text-align: center; text-decoration: none; color: var(--ns-encre);
    display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.ns-cat img { width: 100%; height: 68px; object-fit: cover; border-radius: 12px; }
.ns-cat-emoji { font-size: 30px; }
.ns-cat span { font-size: 13px; font-weight: 600; }
.ns-cat em { font-size: 12px; color: var(--ns-gris); font-style: normal; }

/* ------------------------------------------------------------------- grille */
.ns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 20px; }
.ns-carte {
    background: var(--ns-fond); border: 1px solid var(--ns-bord); border-radius: var(--ns-rayon);
    overflow: hidden; display: flex; flex-direction: column;
}
.ns-carte-media { display: block; position: relative; aspect-ratio: 4 / 3; background: var(--ns-fond-doux); }
.ns-carte-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ns-carte-visuel { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 48px; }
.ns-carte-badge {
    position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 700;
    border-radius: 999px; padding: 4px 9px; background: #fff;
}
.ns-carte-badge-libre { color: #0f766e; }
.ns-carte-badge-complet { color: #b91c1c; }
.ns-carte-badge-instant { left: auto; right: 10px; background: var(--ns-accent); color: #fff; }
.ns-carte-corps { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.ns-carte-ligne1 { display: flex; align-items: center; gap: 8px; }
.ns-carte-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ns-accent); }
.ns-carte-note { margin-left: auto; font-weight: 700; font-size: 13px; }
.ns-carte-titre { margin: 0; font-size: 16px; line-height: 1.3; }
.ns-carte-titre a { color: var(--ns-encre); text-decoration: none; }
.ns-carte-lieu, .ns-carte-specs { margin: 0; font-size: 13px; color: var(--ns-gris); }
.ns-carte-equip { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 0; }
.ns-carte-equip span { font-size: 11px; background: var(--ns-fond-doux); border-radius: 999px; padding: 2px 8px; color: var(--ns-gris); }
.ns-carte-prix { margin: 6px 0 10px; }
.ns-carte-prix b { font-size: 17px; }
.ns-carte-prix span { color: var(--ns-gris); font-size: 13px; }

/* --------------------------------------------------------------- état vide  */
.ns-empty {
    border: 1px dashed var(--ns-bord); border-radius: var(--ns-rayon); background: var(--ns-fond-doux);
    padding: 30px; text-align: center;
}
.ns-empty b { display: block; font-size: 17px; margin-bottom: 8px; }
.ns-empty p { margin: 0 auto 12px; color: var(--ns-gris); max-width: 62ch; line-height: 1.55; }
.ns-empty-note { font-size: 12px; }
.ns-empty-big { padding: 46px 30px; }

.ns-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.ns-step { background: var(--ns-fond); border: 1px solid var(--ns-bord); border-radius: var(--ns-rayon); padding: 18px; }
.ns-step span {
    display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center;
    border-radius: 999px; background: var(--ns-accent); color: #fff; font-weight: 700; font-size: 13px; margin-bottom: 10px;
}
.ns-step b { display: block; margin-bottom: 6px; }
.ns-step p { margin: 0; color: var(--ns-gris); font-size: 14px; line-height: 1.5; }

.ns-panel { background: var(--ns-fond-doux); border: 1px solid var(--ns-bord); border-radius: var(--ns-rayon); padding: 18px; }
.ns-reassurance { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.ns-reassurance span { font-size: 12px; font-weight: 600; background: var(--ns-fond); border: 1px solid var(--ns-bord); border-radius: 999px; padding: 5px 11px; }
.ns-fee-note { margin: 0; font-size: 12px; color: var(--ns-gris); line-height: 1.55; }

/* -------------------------------------------------------------- fil d'ariane */
.ns-crumb { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ns-gris); padding: 14px 0 6px; }
.ns-crumb a { color: var(--ns-gris); text-decoration: none; }
.ns-crumb a:hover { color: var(--ns-accent); }

/* ---------------------------------------------------------------- filtres  */
.ns-filtres { background: var(--ns-fond); border: 1px solid var(--ns-bord); border-radius: var(--ns-rayon); padding: 18px; margin: 12px 0 8px; }
.ns-filtres-ligne { display: flex; gap: 12px; flex-wrap: wrap; }
.ns-filtres-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ---------------------------------------------------------------- galerie  */
.ns-galerie { padding: 12px 0 6px; }
.ns-galerie-principale { border-radius: var(--ns-rayon); overflow: hidden; aspect-ratio: 16 / 9; background: var(--ns-fond-doux); }
.ns-galerie-principale img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ns-galerie-vignettes { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.ns-vignette { border: 2px solid transparent; border-radius: 12px; padding: 0; background: none; cursor: pointer; overflow: hidden; width: 92px; height: 64px; flex: 0 0 auto; }
.ns-vignette img { width: 100%; height: 100%; object-fit: cover; }
.ns-vignette.active { border-color: var(--ns-accent); }
.ns-galerie-vide {
    border: 1px dashed var(--ns-bord); border-radius: var(--ns-rayon); background: var(--ns-fond-doux);
    padding: 40px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.ns-galerie-vide span { font-size: 44px; }
.ns-galerie-vide p { margin: 0; color: var(--ns-gris); }

/* ------------------------------------------------------------------ fiche   */
.ns-fiche { display: grid; grid-template-columns: 1.6fr .9fr; gap: 28px; padding: 18px 0 10px; align-items: start; }
.ns-fiche-tete { display: flex; gap: 8px; align-items: center; }
.ns-fiche-principale h1 { font-size: clamp(22px, 2.6vw, 30px); margin: 8px 0 8px; }
.ns-fiche-lieu { color: var(--ns-gris); font-size: 15px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ns-fiche-avis { font-size: 13px; }
.ns-fiche-specs { color: var(--ns-gris); font-size: 14px; }
.ns-fiche-hote { display: flex; gap: 12px; align-items: center; margin: 18px 0; padding: 14px; background: var(--ns-fond-doux); border-radius: var(--ns-rayon); }
.ns-hote-avatar { font-size: 24px; }
.ns-fiche-hote b { display: block; }
.ns-fiche-hote span { color: var(--ns-gris); font-size: 13px; }
.ns-fiche-bloc { border-top: 1px solid var(--ns-bord); padding-top: 18px; margin-top: 18px; }
.ns-fiche-bloc h2 { font-size: 18px; margin: 0 0 10px; }
.ns-fiche-texte { color: #374151; line-height: 1.65; white-space: pre-line; }
.ns-fiche-note { color: var(--ns-gris); font-size: 13px; margin: 0 0 12px; }
.ns-fiche-liste { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.ns-fiche-liste li { display: flex; gap: 8px; font-size: 14px; color: #374151; }
.ns-fiche-liste li span { color: var(--ns-brand); font-weight: 700; }

/* -------------------------------------------------------------- calendrier  */
.ns-calendrier { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.ns-nuit {
    border: 1px solid var(--ns-bord); border-radius: 12px; padding: 8px 10px;
    display: flex; align-items: center; justify-content: space-between; font-size: 12px; background: var(--ns-fond);
}
.ns-nuit-libre { border-color: #86efac; background: #f0fdf4; }
.ns-nuit-occupee { border-color: #fca5a5; background: #fef2f2; }
.ns-nuit-passee { opacity: .5; }
.ns-nuit-etat { font-size: 11px; }
.ns-legende { display: flex; gap: 16px; margin-top: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ns-gris); }
.ns-pastille { display: inline-block; width: 10px; height: 10px; border-radius: 999px; margin-right: 5px; }
.ns-pastille-libre { background: #22c55e; }
.ns-pastille-occupee { background: #ef4444; }
.ns-pastille-passee { background: #d1d5db; }

/* -------------------------------------------------------------- réservation */
.ns-fiche-reservation { position: sticky; top: 96px; }
.ns-resa-carte { background: var(--ns-fond); border: 1px solid var(--ns-bord); border-radius: var(--ns-rayon); padding: 20px; box-shadow: 0 14px 34px rgba(16, 24, 40, .08); }
.ns-resa-prix { margin: 0 0 4px; }
.ns-resa-prix b { font-size: 24px; }
.ns-resa-prix span { color: var(--ns-gris); }
.ns-resa-menage { font-size: 13px; color: var(--ns-gris); margin: 0 0 14px; }
.ns-resa-decompte { border-top: 1px solid var(--ns-bord); margin-top: 12px; padding-top: 12px; }
.ns-resa-ligne { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.ns-resa-ligne-faible { color: var(--ns-gris); font-size: 13px; }
.ns-resa-total { border-top: 1px solid var(--ns-bord); margin-top: 8px; padding-top: 10px; font-size: 16px; }
.ns-resa-note { font-size: 12px; color: var(--ns-gris); margin: 10px 0 0; line-height: 1.5; }
.ns-resa-note-adresse { color: #92400e; }
.ns-resa-periodes { margin-top: 14px; background: var(--ns-fond-doux); border-radius: 12px; padding: 14px; font-size: 13px; }
.ns-resa-periodes ul { margin: 8px 0 0; padding-left: 18px; color: var(--ns-gris); }
.ns-alerte { border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-top: 12px; }
.ns-alerte-erreur { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.ns-alerte-succes { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ------------------------------------------------------------------ succès  */
.ns-succes { text-align: center; padding: 34px 0 18px; }
.ns-succes-ico { font-size: 46px; display: block; margin-bottom: 10px; }
.ns-succes h1 { font-size: 26px; margin: 0 0 8px; }
.ns-succes-ref { color: var(--ns-gris); }
.ns-recap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 14px 0; }
.ns-recap-bloc { background: var(--ns-fond); border: 1px solid var(--ns-bord); border-radius: var(--ns-rayon); padding: 18px; }
.ns-recap-bloc h2 { font-size: 17px; margin: 0 0 12px; }
.ns-recap-ligne { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 5px 0; border-bottom: 1px dashed var(--ns-bord); }
.ns-recap-ligne:last-child { border-bottom: 0; }
.ns-recap-ligne-faible { color: var(--ns-gris); }
.ns-recap-total { font-size: 16px; border-top: 1px solid var(--ns-bord); border-bottom: 0; padding-top: 10px; }
.ns-statut { color: var(--ns-accent); }
.ns-note-bas { font-size: 13px; color: var(--ns-gris); margin: 12px 0; }
.ns-actions-bas { display: flex; gap: 10px; margin: 18px 0 30px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ séjours */
.ns-sejours { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ns-sejour { background: var(--ns-fond); border: 1px solid var(--ns-bord); border-radius: var(--ns-rayon); padding: 16px; }
.ns-sejour-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ns-statut { font-size: 12px; font-weight: 700; margin-left: auto; background: var(--ns-fond-doux); border-radius: 999px; padding: 3px 10px; }
.ns-sejour-dates, .ns-sejour-lieu { margin: 0 0 6px; font-size: 14px; color: var(--ns-gris); }
.ns-sejour-total { margin: 0 0 12px; font-size: 14px; }
.ns-paye { color: #15803d; font-size: 12px; font-weight: 700; margin-left: 8px; }
.ns-a-regler { color: #b45309; font-size: 12px; font-weight: 700; margin-left: 8px; }

/* ------------------------------------------------------------------ mobile  */
@media (max-width: 980px) {
    .ns-hero { grid-template-columns: 1fr; }
    .ns-fiche { grid-template-columns: 1fr; }
    .ns-fiche-reservation { position: static; }
    .ns-recap { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .ns-quick { display: none; }
    .ns-hero-stats { gap: 16px; }
    .ns-field-row { flex-direction: column; gap: 0; }
    .ns-grid { grid-template-columns: 1fr; }
    .ns-vignette { width: 76px; height: 54px; }
    .ns-topbar .ns-container { gap: 8px; }
}

/* --------------------------------------------------------------- FAVORIS */
/* Le cœur est un VRAI bouton (jamais un lien déguisé) : il ne navigue pas, il
   écrit. Positionné dans la vignette de la carte, hors du lien de la fiche
   (imbriquer un bouton dans un <a> serait du HTML invalide). */
.ns-carte-media-lien { position: absolute; inset: 0; display: block; }
.ns-fav {
    position: absolute; right: 10px; bottom: 10px; z-index: 3;
    width: 34px; height: 34px; padding: 0; border-radius: 50%;
    border: 1px solid var(--ns-bord); background: rgba(255, 255, 255, .94);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px; line-height: 1; cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}
.ns-fav:hover { transform: scale(1.06); box-shadow: 0 2px 10px rgba(0, 0, 0, .16); }
.ns-fav:disabled { opacity: .6; cursor: progress; }
.ns-fav-on { border-color: var(--ns-accent); }
/* Sur la fiche, le cœur est posé dans la ligne de tête (pas sur une photo). */
.ns-fav-fiche {
    position: static; margin-left: auto; width: auto; height: auto;
    border-radius: 999px; padding: 6px 12px; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--ns-encre);
}
.ns-fav-fiche .ns-fav-txt { white-space: nowrap; }
/* Compteur de favoris de l'en-tête du module. */
.ns-quick-compteur {
    display: inline-block; min-width: 18px; text-align: center;
    background: var(--ns-accent); color: #fff; border-radius: 999px;
    font-size: 11px; font-weight: 700; padding: 1px 6px; margin-left: 4px;
}
/* Bulle de confirmation des pages SANS formulaire de réservation (accueil,
   résultats, favoris) : l'utilisateur doit savoir si son favori est enregistré. */
.ns-toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 9999;
    transform: translate(-50%, 18px); opacity: 0; pointer-events: none;
    padding: 10px 16px; border-radius: 12px; font-size: 13px; font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18); transition: opacity .18s ease, transform .18s ease;
    max-width: min(90vw, 420px);
}
.ns-toast-visible { opacity: 1; transform: translate(-50%, 0); }
.ns-toast-succes { background: #15803d; color: #fff; }
.ns-toast-erreur { background: #b91c1c; color: #fff; }
