/* ══════════════════════════════════════════════════════════════
   member/shared.css — Shared client-area styles
   Navbar, pagination, cards, calendar, utilities, dashboard bar
   ══════════════════════════════════════════════════════════════ */

/* ---- Design Tokens (PartirTranquille editorial palette) ---- */
:root {
    --pt-ink: #1A2922;
    --pt-forest: #3D6B56;
    --pt-sage: #5D8876;
    --pt-mist: #8FB5A4;
    --pt-terra: #C4622D;
    --pt-terra-pale: #FAF0E8;
    --pt-terra-light: #F0D5C3;
    --pt-cream: #FAF8F4;
    --pt-fog: #F2F0EB;
    --pt-parchment: #EDE9E1;
    --pt-white: #FFFEFB;
    --pt-text: #2D3B35;
    --pt-muted: #6B7C75;
    --pt-radius-sm: 8px;
    --pt-radius-md: 14px;
    --pt-radius-lg: 20px;
    --pt-radius-pill: 100px;
    --pt-shadow-xs: 0 1px 3px rgba(26, 41, 34, 0.06);
    --pt-shadow-sm: 0 2px 8px rgba(26, 41, 34, 0.07), 0 1px 2px rgba(26, 41, 34, 0.04);
    --pt-shadow-md: 0 6px 24px rgba(26, 41, 34, 0.08), 0 2px 6px rgba(26, 41, 34, 0.05);
    --pt-shadow-lg: 0 16px 48px rgba(26, 41, 34, 0.10), 0 4px 12px rgba(26, 41, 34, 0.06);
    --pt-shadow-focus: 0 0 0 3px rgba(61, 107, 86, 0.18);
    --pt-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --pt-font-ui: system-ui, -apple-system, 'Segoe UI', sans-serif;
    --pt-transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --pt-transition-base: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --pt-transition-slow: 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Soft tinted backgrounds — bypass .badge.bg-* specificity overrides */
.bg-primary-10 { background-color: rgba(var(--bs-primary-rgb), 0.1) !important; }
.bg-success-10 { background-color: rgba(var(--bs-success-rgb), 0.1) !important; }
.bg-info-15 { background-color: rgba(var(--bs-info-rgb), 0.15) !important; }

.delete-btn {
    color: var(--bs-danger);
}


/* ── Subsection headers — unified label style for form sections ── */

.form-content .subsection-header {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--vt-text, #4A5650);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

/* Unify form_row labels with subsection-header style */
.form-content .form-group > div:first-child > .form-label,
.form-content .form-group > div:first-child > legend {
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--vt-text, #4A5650) !important;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 767.98px) {
    .form-content .subsection-header {
        font-size: 0.75rem !important;
        margin-top: 1.25rem !important;
        margin-bottom: 0.5rem !important;
    }

    .form-content .form-group > div:first-child > .form-label,
    .form-content .form-group > div:first-child > legend {
        font-size: 0.75rem !important;
        margin-top: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
}

/* Styling Utilities for Photos */
.group:hover .group-hover-opacity-100 { opacity: 1 !important; }
.group:hover .group-hover-opacity-50 { opacity: 0.5 !important; }
.group:focus-within .group-hover-opacity-100 { opacity: 1 !important; }
.group:focus-within .group-hover-opacity-50 { opacity: 0.5 !important; }
.hover-scale:hover { transform: scale(1.02); }
.btn-icon { width: 32px; height: 32px; padding: 0; display: flex; align-items: center; justify-content: center; }
.transition-opacity { transition: opacity var(--pt-transition-base); }
.drop-shadow-md { filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5)); }

/* Placeholder Hover Effect */
.hover-bg-light:hover { background-color: rgba(248, 249, 250, 0.8) !important; border-color: var(--bs-primary) !important; }

/* Fix Bootstrap modal behind backdrop when inside overflow-hidden + AOS */
#matching {
    overflow: visible !important;
}

#matching .modal {
    position: fixed !important;   /* forces it out of the card flow */
    z-index: 1060 !important;
}

/* Custom CSS to handle the Checked state visual overrides without writing new JS */
/* When the checkbox is checked, style the label immediately following it */
.btn-check:checked + .btn {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: white !important;
}

/* Ensure the icon inside turns white when checked */
.btn-check:checked + .btn i:not(.fa-question-circle) {
    color: white !important;
    opacity: 1 !important;
}

/* Handle the Tooltip icon color when checked */
.btn-check:checked + .btn .fa-question-circle {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Matching skills 24h lock */
.matching-criteria-grid.is-locked {
    pointer-events: none;
    opacity: 0.5;
    filter: grayscale(0.3);
}
.skills-locked-banner {
    background-color: var(--pt-terra-pale, #FAF0E8);
    border: 1px solid var(--pt-terra-light, #F0D5C3);
    color: var(--pt-text, #2D3B35);
    border-radius: var(--pt-radius-sm, 8px);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}
.skills-locked-banner i {
    color: var(--pt-terra, #C4622D);
    font-size: 0.9rem;
}

/* Scope styling to this page/wrapper to avoid global pollution */
.address-step-wrapper .mapboxgl-ctrl-geocoder,
.funnel-form-wrapper .mapboxgl-ctrl-geocoder {
    width: 100%;
    max-width: 100%;
    box-shadow: none; /* Remove default mapbox shadow */
    background-color: #f9fbfd;
    border: 1px solid transparent;
    border-radius: 0.5rem; /* Bootstrap rounded-3 */
    font-family: inherit;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    transition: all 0.2s ease-in-out;
}

/* Focus state to match Bootstrap */
.address-step-wrapper .mapboxgl-ctrl-geocoder:focus-within,
.funnel-form-wrapper .mapboxgl-ctrl-geocoder:focus-within {
    background-color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(51, 94, 234, 0.25);
    border-color: #335eea;
}

.address-step-wrapper .mapboxgl-ctrl-geocoder--input,
.funnel-form-wrapper .mapboxgl-ctrl-geocoder--input {
    padding: 1rem 1rem 1rem 2.5rem; /* Space for icon */
    height: auto;
    font-size: 1.0625rem;
    color: #161c2d;
}

.address-step-wrapper .mapboxgl-ctrl-geocoder--icon,
.funnel-form-wrapper .mapboxgl-ctrl-geocoder--icon {
    top: 50%;
    transform: translateY(-50%);
}

/* Hide the ugly standard loading/close icons if you want to use FontAwesome via JS,
   otherwise keep them but position them better */
.address-step-wrapper .mapboxgl-ctrl-geocoder--icon-search,
.funnel-form-wrapper .mapboxgl-ctrl-geocoder--icon-search {
    left: 15px;
    fill: #95aac9; /* Text-muted color */
}


/* Input-group: propagate focus border to the icon span */
.input-group:focus-within > .input-group-text {
    border-color: var(--bs-primary, #335eea);
    transition: border-color 0.15s ease-in-out;
}

/* =========================================
   CALENDAR COMPONENT STYLES
   ========================================= */

/* Calendar wrapper — cap width so day cells stay compact */
.calendar-container {
    max-width: 600px;
    margin-inline: auto;
}

/* Month Container */
.month {
}

/* Day Headers (Lu, Ma, Me...) */
.day-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #95aac9;
    padding-bottom: 0.5rem;
    letter-spacing: 1px;
}

/* Day Cells */
.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.85rem;
    position: relative;
    transition: all 0.2s ease-in-out;
    border-radius: 0; /* default square for ranges */
}

/* Hover Effect for selectable days */
.day:not(.past):not(.highlighted):hover {
    background-color: #f1f4f8; /* Light gray hover */
    border-radius: 50%; /* Circle effect on hover */
    color: var(--bs-primary);
    font-weight: bold;
}

/* Past Dates */
.day.past {
    cursor: not-allowed;
    color: #d2ddec;
}

/* Currently Selecting (Visual feedback before saving) */
.day.selected {
    background-color: rgba(var(--bs-primary-rgb), 0.2);
    color: var(--bs-primary);
}

/* =========================================
   SAVED RANGES STYLES
   ========================================= */

/* Base style for any highlighted day (Saved) */
.day.highlighted {
    color: white !important; /* Ensure text is readable on colored bg */
    opacity: 1 !important;
    position: relative;
}

/* Range Start: Round left corners */
.day.range-start {
    border-top-left-radius: 50%;
    border-bottom-left-radius: 50%;
}

/* Range End: Round right corners */
.day.range-end {
    border-top-right-radius: 50%;
    border-bottom-right-radius: 50%;
}

/* Single Day Range: Circle */
.day.range-start.range-end {
    border-radius: 50%;
}

/* =========================================
   MODAL TYPE BUTTONS
   ========================================= */

/* Flexible (Blue) */
.btn-custom-flexible {
    color: #0478b3;
    border: 1px solid #0478b3;
    background-color: rgba(4, 120, 179, 0.05);
    transition: all 0.2s;
}
.btn-custom-flexible:hover {
    background-color: #0478b3;
    color: white;
}

/* Fixed (Green) */
.btn-custom-fixed {
    color: #49a75c;
    border: 1px solid #49a75c;
    background-color: rgba(73, 167, 92, 0.05);
    transition: all 0.2s;
}
.btn-custom-fixed:hover {
    background-color: #49a75c;
    color: white;
}

/* Unsure (Purple) */
.btn-custom-unsure {
    color: #ab61e7;
    border: 1px solid #ab61e7;
    background-color: rgba(171, 97, 231, 0.05);
    transition: all 0.2s;
}
.btn-custom-unsure:hover {
    background-color: #ab61e7;
    color: white;
}

/* -------------------------------------------------------------------------
       FIX: Handling the Form Theme Wrapper (<div><input></div>)
       ------------------------------------------------------------------------- */

/* 1. HIDE the native input */
div:has(+ .selectable-card) > input,
.btn-check {
    display: none !important;
}

/* 2. BASE CARD — vertical layout, icon above label */
.selectable-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    padding: 16px 8px;
    border: 1.5px solid var(--pt-parchment, #EDE9E1);
    border-radius: var(--pt-radius-md, 14px);
    background: transparent;
    cursor: pointer;
    transition: border-color var(--pt-transition-fast, 0.18s),
                background-color var(--pt-transition-fast, 0.18s),
                box-shadow var(--pt-transition-fast, 0.18s);
    margin: 0;
}

.selectable-card .icon-state {
    font-size: 1.75rem;
    color: var(--pt-muted, #6B7C75);
    transition: color var(--pt-transition-fast, 0.18s);
    line-height: 1;
}

.selectable-card .selectable-card-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--pt-text, #2D3B35);
    text-align: center;
    line-height: 1.2;
}

/* 3. CHECK INDICATOR — corner badge, hidden by default */
.selectable-card .check-indicator {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: transparent;
    opacity: 0;
    transition: opacity var(--pt-transition-fast, 0.18s);
}

.selectable-card .check-indicator i {
    font-size: 0.55rem;
    line-height: 1;
}

/* 4. CHECKED STATE */
div:has(> input:checked) + .selectable-card,
.btn-check:checked + .selectable-card {
    border-color: var(--bs-primary) !important;
    border-width: 2px;
    background-color: rgba(var(--bs-primary-rgb), 0.05) !important;
    box-shadow: 0 0.125rem 0.25rem rgba(22, 28, 45, 0.06);
}

div:has(> input:checked) + .selectable-card .check-indicator,
.btn-check:checked + .selectable-card .check-indicator {
    opacity: 1;
    background-color: var(--bs-primary);
    color: white !important;
}

div:has(> input:checked) + .selectable-card .icon-state,
.btn-check:checked + .selectable-card .icon-state {
    color: var(--bs-primary) !important;
}

div:has(> input:checked) + .selectable-card .selectable-card-label,
.btn-check:checked + .selectable-card .selectable-card-label {
    color: var(--pt-forest, #3D6B56);
}


/* 5. NUMBER CARD — quantity selector matching selectable-card style */
.number-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 8px;
    border: 1.5px solid var(--pt-parchment, #EDE9E1);
    border-radius: var(--pt-radius-md, 14px);
    background: transparent;
    transition: border-color var(--pt-transition-fast, 0.18s);
}

.number-card .icon-state {
    font-size: 1.75rem;
    color: var(--pt-muted, #6B7C75);
    line-height: 1;
}

.number-card .selectable-card-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--pt-text, #2D3B35);
    text-align: center;
    line-height: 1.2;
    cursor: default;
}

.number-card-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 2px;
}

.number-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--pt-sage, #5D8876);
    font-size: 0.75rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color var(--pt-transition-fast, 0.18s);
}

.number-card-btn:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

.number-card-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 28px;
    background: var(--pt-fog, #F2F0EB);
    border-radius: var(--pt-radius-sm, 8px);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pt-text, #2D3B35);
}

/* 6. SQUARE ASPECT in grid contexts only */
.equipment-grid .selectable-card,
.profil-animal-grid .selectable-card,
.habitation-type-grid .selectable-card,
.chambres-grid .number-card {
    aspect-ratio: 1;
    padding: 8px;
}

/* Habitation type grid — 2-column fixed */
.habitation-type-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 130px);
    gap: 10px !important;
}

.habitation-type-grid > * {
    width: 100% !important;
}

/* 7. CHAMBRES GRID — responsive CSS Grid for number cards */
.chambres-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px !important;
}

.chambres-grid > * {
    width: 100% !important;
}

/* 7. EQUIPMENT GRID — responsive CSS Grid for equal-width cards */
.equipment-grid,
.profil-animal-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px !important;
}

.equipment-grid > *,
.profil-animal-grid > * {
    width: 100% !important;
}

.icon-circle {
    /* Ensure these properties are applied */
    width: 40px;
    height: 40px;
    border-radius: 50%;

    /* Ensure centering */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Fix for Mapbox Geocoder & Filter Bar GUI */

/* 1. Ensure the dropdowns sit on top of everything (Leaflet/Mapbox maps usually have z-indexes around 400-1000) */
.mapboxgl-ctrl-geocoder,
.choices__list.is-active {
    z-index: 1055 !important; /* Bootstrap Dropdown is 1000, Modal 1050 */
}

/* 2. Style the Container to look like a unified input group */
.group-focus-ring {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;

    /* When any input inside is focused, simulate focus on the wrapper */
    &:focus-within {
        border-color: #86b7fe !important; /* Bootstrap primary-subtle or variable */
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15) !important;
    }
}

/* 3. MAPBOX SPECIFIC OVERRIDES */
/* Use this class on the parent div containing the mapbox input */
.geocoder-wrapper {
    position: relative;

    /* Mapbox inserts a complex div structure. We need to reset it to fit our Bootstrap styling */
    .mapboxgl-ctrl-geocoder {
        width: 100%;
        max-width: none;
        box-shadow: none;
        background-color: transparent;

        /* The input inside mapbox */
        .mapboxgl-ctrl-geocoder--input {
            height: auto;
            padding: 0.5rem 0.75rem 0.5rem 0; /* Align with Bootstrap sizing */
            border: none;
            background-color: transparent;
            outline: none;
            color: var(--bs-body-color);
            font-weight: 500;

            &:focus {
                outline: none;
                box-shadow: none;
            }
        }

        /* Hide the default search icon from Mapbox (we used our own FontAwesome one) */
        .mapboxgl-ctrl-geocoder--icon {
            display: none;
        }

        /* Result list styling */
        .suggestions-wrapper {
            /* Position the results dropdown correctly relative to our rounded container */
            .suggestions {
                background-color: #fff;
                border: 1px solid rgba(0,0,0,0.1);
                border-radius: 12px;
                box-shadow: 0 10px 25px rgba(0,0,0,0.1);
                margin-top: 8px;
                overflow: hidden;

                li {
                    padding: 10px 15px;
                    &:hover, &.active {
                        background-color: #f8f9fa; /* Bootstrap gray-100 */
                        color: var(--bs-primary);
                    }
                }
            }
        }

        /* Clear button positioning */
        .mapboxgl-ctrl-geocoder--button {
            background: transparent;
            top: 50%;
            transform: translateY(-50%);
        }
    }
}


/* --- 1. INTERACTION & DEPTH (The "Lift") --- */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    will-change: transform, box-shadow;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08) !important;
}

/* --- 2. IMAGE ZOOM EFFECT --- */
/* Applied to the <img> tag. Triggers when the parent Card is hovered. */
.hover-lift:hover .hover-scale {
    transform: scale(1.05);
}

.hover-scale {
    /* Smooth, slow zoom */
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Set origin to center so it zooms evenly */
    transform-origin: center center;
}

/* --- 3. GLASSMORPHISM (The "Blur") --- */
.backdrop-blur {
    /* Safari support */
    -webkit-backdrop-filter: blur(8px);
    /* Standard */
    backdrop-filter: blur(8px);
    /* Fallback logic is handled by bg-opacity classes in HTML */
}

/* --- 4. TEXT GRADIENTS (Perfect Match Badge) --- */
.bg-gradient-warning {
    /* A rich gold-to-orange gradient */
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.bg-clip-text {
    /* Clips the background to the text shape */
    -webkit-background-clip: text;
    background-clip: text;
    /* Makes text transparent so background shows through */
    color: transparent;
}

/* --- 5. UTILITIES --- */
.icon-square {
    /* Enforces a perfect square for icons/numbers with centering */
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.grayscale {
    /* For Offline/Archived states */
    filter: grayscale(100%);
}

/* Optional: Scrollbar for horizontal chips if they overflow */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- PAGINATION MODERN REFRESH --- */

/* 1. Conteneur global: Supprime les bordures et ajoute de l'espace */
.pagination {
    /* Supprime les bordures visibles qui cassent l'esthétique sans bordure */
    --bs-pagination-border-width: 0;
    /* Augmente la taille du texte pour la lisibilité */
    --bs-pagination-font-size: 1rem;
    /* Ajoute un espacement uniforme entre les éléments (Look 2025) */
    gap: 0.5rem;
    /* Retire la marge négative par défaut de BS5 */
    margin: 0;
}

/* Retire l'effet de chevauchement par défaut de Bootstrap */
.pagination > li {
    margin: 0;
}

/* 2. Style de base des liens (Taille, Forme, Typographie) */
.page-link {
    /* Taille fixe pour une zone de tap mobile conforme (44x44px) */
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;

    /* Forme pilule/ronde pour un aspect plus doux */
    border-radius: var(--bs-border-radius-pill) !important;
    /* Couleur du texte foncé pour un bon contraste sur fond blanc */
    color: var(--bs-gray-700);
    transition: all 0.3s ease;
    font-weight: var(--bs-font-weight-medium);
}

/* 3. État Survol (Tactile / Subtle Lift) */
.page-link:hover,
.page-link:focus {
    /* Utilise une couleur très subtile du thème */
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    /* Petit effet d'élévation, rappelant le hover-lift des cartes */
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.08);
    border-color: transparent; /* S'assurer qu'aucune bordure n'apparaît */
}

/* 4. État Actif (Haute Visibilité / Élévation) */
.page-item.active .page-link {
    z-index: 2;
    color: var(--bs-white);
    background-color: var(--bs-primary); /* Couleur principale du thème */
    border-color: var(--bs-primary);
    font-weight: var(--bs-font-weight-bold);
    /* Ombre d'élévation teintée de la couleur primaire */
    box-shadow: 0 0.5rem 1rem rgba(var(--bs-primary-rgb), 0.3);
}

/* 5. État Désactivé (Subdued) */
.page-item.disabled .page-link {
    color: var(--bs-gray-400);
    background-color: transparent;
    border-color: transparent;
}

/* S'assurer que les flèches (Précédent/Suivant) restent centrées dans le cercle */
.page-item:first-child .page-link,
.page-item:last-child .page-link {
    border-radius: var(--bs-border-radius-pill) !important;
}

/********************/


.form-check-input:checked {
    background-color: var(--bs-success);
    border-color: var(--bs-success);
}

/* Supprime l'outline tant que le dropdown n'est pas ouvert */
.no-outline {
    outline: none !important;
    box-shadow: none !important;
}

/* Rétablit l'outline uniquement quand le menu est ouvert (accessibilité) */
.dropdown.show > .no-outline,
.no-outline:focus-visible {
    outline: none !important;
}

/* Style de la popup Mapbox */
.custom-mapbox-popup .mapboxgl-popup-content {
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Ajustement du contenu à l'intérieur */
.custom-mapbox-popup .card {
    border: none; /* Souvent les cards bootstrap ont des bordures qu'on veut éviter ici */
    box-shadow: none;
}

/* S'assurer que l'image ne dépasse pas */
.custom-mapbox-popup img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}
.sejour-popup-content .sejour-item {
    width: 100% !important;
}

/* ===== Dashboard Status Bar ===== */

:root {
    --dash-ring-good: #2eaa5e;
    --dash-ring-mid: #e8a517;
    --dash-ring-low: #dc4c4c;
}

.dash-status-bar {
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.04), rgba(var(--bs-primary-rgb), 0.01));
    border: 1px solid rgba(var(--bs-primary-rgb), 0.08);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
}

.dash-greeting {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--bs-body-color);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

/* Verification inline badge */
.dash-verif-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.15rem 0.6rem;
    border-radius: 2rem;
    transition: opacity 0.15s;
}
.dash-verif-badge:hover { opacity: 0.8; }
.dash-verif-badge--verified  { background: #e6f9ee; color: #1a8a4a; }
.dash-verif-badge--pending   { background: #e8f0fe; color: #3b72d9; }
.dash-verif-badge--unverified { background: #fef4e6; color: #b8860b; }

/* Score rings */
.dash-ring-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    transition: transform 0.15s;
}
.dash-ring-item:hover { transform: translateY(-2px); }

.dash-ring {
    width: 44px;
    height: 44px;
}
.dash-ring__track {
    fill: none;
    stroke: rgba(var(--bs-body-color-rgb), 0.07);
    stroke-width: 2.8;
}
.dash-ring__fill {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dasharray 0.6s ease;
}
.dash-ring__value {
    fill: var(--bs-body-color);
    font-size: 9px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: central;
}

.dash-ring-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Separator dot */
.dash-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(var(--bs-body-color-rgb), 0.2);
    flex-shrink: 0;
}

/* Plan badge */
.dash-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    background: rgba(var(--bs-body-color-rgb), 0.05);
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    transition: background 0.15s, color 0.15s;
}
.dash-plan-badge:hover {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}
.dash-plan-badge .fa-gem {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Next stay indicator */
.dash-next-stay {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--bs-primary);
}
.dash-next-stay .fa-calendar-check {
    opacity: 0.7;
    margin-right: 0.25rem;
}

/* Mobile tweaks */
@media (max-width: 767.98px) {
    .dash-status-bar {
        padding: 1rem 1.15rem;
    }
    .dash-greeting {
        font-size: 1.15rem;
    }
    .dash-ring {
        width: 40px;
        height: 40px;
    }
}

/* Dashboard: equal-height annonce cards */
.dashboard-annonce-row .sejour-item {
    margin-bottom: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.dashboard-annonce-row .sejour-item > .card {
    flex: 1;
}

/* Dashboard: horizontal scroll on mobile */
@media (max-width: 767.98px) {
    .dashboard-annonce-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        scrollbar-width: none;
    }
    .dashboard-annonce-row::-webkit-scrollbar {
        display: none;
    }
    .dashboard-annonce-row > * {
        flex: 0 0 80% !important;
        max-width: 80% !important;
        scroll-snap-align: start;
    }
}

/* Ensure guidance card bodies expand to fill available space */
.guidance-cards .card-body {
    flex-grow: 1;
}

/********************/


/* Additional styles for phone input */
.iti {
    width: 100%;
}

/* Unread message indicator on avatar */
.avatar-unread {
    position: relative;
}

.avatar-unread:after {
    content: "";
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background-color: var(--bs-danger);
    border: 2px solid white;
    border-radius: 50%;
}

/* Global fix: Center icons inside avatar components without requiring .avatar-title wrapper */
.avatar:has(> i[class*="fa-"]) {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Make avatar-title transparent so parent's bg-* class shows through */
.avatar-title {
    background-color: transparent;
}

/* ═══════════════════════════════════════
   VIEW MODE BADGE (navbar)
   ═══════════════════════════════════════ */
.view-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid rgba(61, 107, 86, 0.18);
    border-radius: 2rem;
    background-color: rgba(61, 107, 86, 0.07);
    color: var(--vt-forest, #3D6B56);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.view-mode-badge:hover {
    border-color: var(--vt-forest, #3D6B56);
    background-color: rgba(61, 107, 86, 0.06);
}

/* ═══════════════════════════════════════
   VIEW MODE MODAL OPTIONS
   ═══════════════════════════════════════ */
.view-mode-option {
    display: block;
    padding: 1rem 1.25rem;
    border: 1px solid var(--vt-parchment, #EDE9E1);
    border-radius: 0.75rem;
    background: var(--vt-warm-white, #FFFEFB);
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.25s ease;
}

.view-mode-option:hover {
    border-color: var(--vt-forest, #3D6B56);
    background-color: var(--vt-fog, #F2F0EB);
    box-shadow: 0 2px 8px rgba(26, 41, 34, 0.06);
}

.view-mode-option.active {
    border-color: var(--vt-forest, #3D6B56);
    border-left: 4px solid var(--vt-forest, #3D6B56);
    background-color: rgba(61, 107, 86, 0.06);
}

.view-mode-option-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(61, 107, 86, 0.08);
    border: 1px solid rgba(61, 107, 86, 0.12);
    color: var(--vt-forest, #3D6B56);
}

/* ═══════════════════════════════════════
   OTP VERIFICATION DIGIT INPUTS
   ═══════════════════════════════════════ */
.otp-verify-digits {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.otp-verify-digit {
    width: 3rem;
    height: 3.5rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--bs-border-color);
    border-radius: 0.75rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.3s;
    caret-color: var(--bs-primary);
    -moz-appearance: textfield;
}

.otp-verify-digit::-webkit-inner-spin-button,
.otp-verify-digit::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.otp-verify-digit:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15);
}

.otp-verify-error .otp-verify-digit {
    border-color: var(--bs-danger) !important;
    background-color: rgba(var(--bs-danger-rgb), 0.05);
}

@keyframes otp-verify-shake {
    0%, 100% { transform: translateX(0); }
    10%, 50%, 90% { transform: translateX(-4px); }
    30%, 70% { transform: translateX(4px); }
}

.otp-verify-shake {
    animation: otp-verify-shake 0.5s ease-in-out;
}

@media (max-width: 767.98px) {
    .otp-verify-digits {
        gap: 0.375rem;
    }
    .otp-verify-digit {
        flex: 1;
        min-width: 0;
        max-width: 2.75rem;
        height: 3rem;
        font-size: 1.25rem;
        border-radius: 0.5rem;
    }
}

@media (max-width: 400px) {
    .otp-verify-digit {
        max-width: 2.25rem;
        height: 2.75rem;
        font-size: 1.125rem;
    }
    .otp-verify-digits {
        gap: 0.25rem;
    }
}

/* ── Toggle Save Feedback ── */

.toggle-save-feedback {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.4s ease;
    min-width: 0;
    text-align: right;
}

.toggle-save-feedback--success {
    color: var(--bs-success);
}

.toggle-save-feedback--error {
    color: var(--bs-danger);
}

.toggle-save-feedback--fade {
    opacity: 0;
}

/* ── pt-select: reusable custom dropdown ─────────────────────────── */

.pt-select {
    position: relative;
}

.pt-select__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 50px;
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
    color: var(--vt-text);
    background: var(--vt-warm-white);
    border: 1px solid var(--vt-parchment);
    border-radius: 0.625rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pt-select__trigger:hover {
    border-color: var(--vt-mist);
}

.pt-select__trigger:focus-visible {
    outline: none;
    border-color: var(--vt-forest);
    box-shadow: 0 0 0 3px rgba(61, 107, 86, 0.15);
}

.pt-select--open .pt-select__trigger {
    border-color: var(--vt-forest);
    box-shadow: 0 0 0 3px rgba(61, 107, 86, 0.15);
}

.pt-select__trigger--placeholder {
    color: var(--vt-muted);
}

.pt-select__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    text-align: left;
}

.pt-select__chevron {
    font-size: 0.75rem;
    color: var(--vt-muted);
    margin-left: 0.75rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.pt-select--open .pt-select__chevron {
    transform: rotate(180deg);
}

.pt-select__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1060;
    background: var(--vt-warm-white);
    border: 1px solid var(--vt-parchment);
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(26, 41, 34, 0.1);
    max-height: 300px;
    overflow-y: auto;
    padding: 0.25rem;
}

.pt-select__option {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    color: var(--vt-text);
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s ease;
}

.pt-select__option:hover,
.pt-select__option--focused {
    background: var(--vt-fog);
}

.pt-select__option--active {
    color: var(--vt-forest);
    font-weight: 600;
}

.pt-select__option:focus-visible {
    outline: none;
    background: var(--vt-fog);
}

/* ---- Avatar ring + Privilège premium ring ---- */
:root {
    --loyalty-gold: #C8A96E;
    --loyalty-gold-light: #E8D5A3;
}

.avatar-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.avatar-ring img,
.avatar-ring > div {
    border-radius: 50%;
}

/* Profile show avatar ring — preserves original profil-show-avatar styling */
.profil-show-avatar-ring {
    border: 4px solid var(--vt-warm-white);
    box-shadow: 0 4px 16px rgba(26, 41, 34, 0.12);
    border-radius: 50%;
}
.profil-show-avatar-ring--premium {
    border: none;
    background: linear-gradient(145deg, #b8973f, var(--loyalty-gold), var(--loyalty-gold-light), var(--loyalty-gold));
    padding: 4px;
    box-shadow: 0 4px 16px rgba(200, 169, 110, 0.25);
}
@media (max-width: 991.98px) {
    .profil-show-avatar-ring,
    .profil-show-avatar-ring img { width: 120px !important; height: 120px !important; }
}

/* Trust level badge inline */
.trust-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pt-forest);
}

.trust-level-badge i {
    font-size: 0.9rem;
}

/* Earned badges grid */
.badge-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--pt-fog);
    color: var(--pt-text);
    border: 1px solid var(--pt-parchment);
}

.badge-chip i {
    font-size: 0.8rem;
    color: var(--pt-sage);
}

/* ── Referral CTA (dashboard) ──────────────────────────────────── */
.ref-cta {
    background: var(--pt-white, #FFFEFB);
    border-radius: var(--pt-radius-md, 14px);
    box-shadow: var(--pt-shadow-xs);
    border: 1px solid var(--pt-parchment, #EDE9E1);
    padding: 20px 24px;
}
.ref-cta-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}
.ref-cta-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pt-sage, #5D8876), var(--pt-forest, #3D6B56));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.ref-cta-content {
    flex: 1;
    min-width: 0;
}
.ref-cta-title {
    font-family: var(--pt-font-ui, system-ui, sans-serif);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pt-ink, #1A2922);
    margin: 0 0 4px;
}
.ref-cta-text {
    font-size: 0.82rem;
    color: var(--pt-muted, #6B7C75);
    margin: 0;
    line-height: 1.5;
}
.ref-cta-btn {
    flex-shrink: 0;
    white-space: nowrap;
}
@media (max-width: 767.98px) {
    .ref-cta-inner {
        flex-wrap: wrap;
    }
    .ref-cta-btn {
        width: 100%;
        text-align: center;
    }
}

/* Site message — modal */
.site-message-dialog {
    border: none;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: calc(100% - 2rem);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.site-message-dialog::backdrop {
    background: rgba(0, 0, 0, 0.4);
}

.site-message-dialog__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.site-message-dialog__body {
    text-align: left;
    width: 100%;
}

.site-message-dialog__content--alerte {
    border-top: 4px solid #e67e22;
}

.site-message-dialog__content--info {
    border-top: 4px solid #3498db;
}

.site-message-dialog__icon {
    font-size: 2rem;
}

.site-message-dialog__content--alerte .site-message-dialog__icon {
    color: #e67e22;
}

.site-message-dialog__content--info .site-message-dialog__icon {
    color: #3498db;
}

.site-message-dialog__title {
    font-weight: 600;
    margin-bottom: 0;
}

.site-message-dialog__text {
    color: #555;
    line-height: 1.5;
    margin-bottom: 0;
}

.site-message-dialog__text p:last-child,
.site-message-encart__body p:last-child {
    margin-bottom: 0;
}

.site-message-dialog__text ul,
.site-message-dialog__text ol,
.site-message-encart__body ul,
.site-message-encart__body ol {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.site-message-dialog__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.925rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    outline: none;
}

.site-message-dialog__content--alerte .site-message-dialog__close {
    background: #e67e22;
    color: #fff;
}

.site-message-dialog__content--alerte .site-message-dialog__close:hover {
    background: #cf6d17;
}

.site-message-dialog__content--info .site-message-dialog__close {
    background: #3498db;
    color: #fff;
}

.site-message-dialog__content--info .site-message-dialog__close:hover {
    background: #2980b9;
}

/* Site message — dashboard encart */
.site-message-encart {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    position: relative;
}

.site-message-encart--alerte {
    background: #fef3e2;
    border-left: 4px solid #e67e22;
}

.site-message-encart--info {
    background: #ebf5fb;
    border-left: 4px solid #3498db;
}

.site-message-encart__icon {
    flex-shrink: 0;
    font-size: 1.1rem;
    padding-top: 0.1rem;
}

.site-message-encart--alerte .site-message-encart__icon {
    color: #e67e22;
}

.site-message-encart--info .site-message-encart__icon {
    color: #3498db;
}

.site-message-encart__body {
    flex: 1;
    font-size: 0.925rem;
    line-height: 1.5;
    color: #333;
}

.site-message-encart__close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.85rem;
    transition: color 0.15s;
}

.site-message-encart__close:hover {
    color: #333;
}

/* ── Flash Toast ── */
.flash-toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1080;
    max-width: 400px;
    display: flex;
    flex-direction: column-reverse;
    gap: .5rem;
    pointer-events: none;
}
.flash-toast {
    pointer-events: auto;
    animation: flash-slide-in 0.3s ease;
    font-size: .875rem;
    margin: 0;
}
/* Opaque alert backgrounds (default --bs-*-bg-subtle are 10% transparent, causing bleed-through on toasts and faded alerts in modals) */
.alert-danger  { --bs-alert-bg: #fcedee; }
.alert-warning { --bs-alert-bg: #fdf9f0; }
.alert-success { --bs-alert-bg: #f0f7f4; }
.alert-info    { --bs-alert-bg: #f1f6f9; }
@keyframes flash-slide-in {
    from { opacity: 0; transform: translateX(1rem); }
    to { opacity: 1; transform: translateX(0); }
}
@media (max-width: 575.98px) {
    .flash-toast-container {
        right: .75rem;
        left: .75rem;
        max-width: none;
    }
}

/* ── Discovery Flash ── */
.flash-discovery {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    background: var(--pt-white);
    border: 1px solid var(--pt-parchment);
    border-left: 3px solid var(--pt-sage);
    border-radius: var(--pt-radius-sm);
    padding: .875rem 1rem;
    box-shadow: var(--pt-shadow-md);
}
.flash-discovery-close {
    position: absolute;
    top: .5rem;
    right: .5rem;
    background: none;
    border: none;
    color: var(--pt-muted);
    font-size: .75rem;
    padding: .25rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--pt-transition-fast) ease;
}
.flash-discovery-close:hover {
    color: var(--pt-text);
}
.flash-discovery-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--pt-sage) 12%, transparent);
    color: var(--pt-sage);
    border-radius: var(--pt-radius-sm);
    font-size: .875rem;
}
.flash-discovery-body {
    display: flex;
    flex-direction: column;
    gap: .375rem;
    padding-right: 1rem;
    min-width: 0;
}
.flash-discovery-text {
    font-size: .8125rem;
    color: var(--pt-text);
    line-height: 1.4;
}
.flash-discovery-link {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--pt-sage);
    text-decoration: none;
    transition: color var(--pt-transition-fast) ease;
}
.flash-discovery-link:hover {
    color: var(--pt-forest);
}
.flash-discovery-link .fa-arrow-right {
    font-size: .625rem;
    transition: transform var(--pt-transition-fast) ease;
}
.flash-discovery-link:hover .fa-arrow-right {
    transform: translateX(2px);
}

/* ─── Expired subscription: disabled buttons + reactivation banner ─── */
.btn-expired-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.expired-subscription-banner {
    padding: 1rem;
    text-align: center;
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-warning-bg-subtle);
    border: 1px solid var(--bs-warning-border-subtle);
}

.expired-subscription-banner p {
    margin-bottom: 0.75rem;
    color: var(--bs-warning-text-emphasis);
}

.expired-subscription-banner .btn {
    font-size: 0.8125rem;
}
