/* ==========================================================================
   LES ÉCURIES DU GRAND MONTGENARD
   Optimisée par Gemini
   ========================================================================== */

/* --- VARIABLES GLOBALES --- */
:root {
    --primary-blue: #002e7a;
    --accent-gold: #C8A27A;
    --glass-white: rgba(255, 255, 255, 0.65);

    /* Échelle d'arrondis */
    --radius-tile: 32px;
    --radius-media: 28px;
    --radius-card: 20px;
    --radius-sm: 16px;
}

/* --- RESET ET BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overscroll-behavior-y: none;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* --- FOND FIXE --- */
.fixed-background, .fixed-background-2, .fixed-background-3 {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: -1;
}

.fixed-background { background-image: url('images/bg.jpg'); }
.fixed-background-2 { background-image: url('images/bg2.jpg'); }
.fixed-background-3 { background-image: url('images/bg3.jpg'); }

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER & NAVIGATION --- */
.main-header { padding: 40px 0 20px; text-align: center; width: 100%; }
.site-logo { max-height: 90px; width: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2)); }
.header-tarif { text-align: left; }

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-blue);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}
.back-button:hover { transform: translateX(-5px); background: var(--accent-gold); }

/* --- LAYOUT GLOBAL --- */
.vertical-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding-top: 110px;
    padding-bottom: 50px;
    width: 100%;
}

/* --- TUILES PRINCIPALES --- */
.glass-tile {
    background: var(--glass-white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-tile);
    padding: 40px 35px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    text-align: center;
    overflow: hidden;
}

/* --- TUILE HERO / ACCUEIL (Fusionnée & Centrée verticalement) --- */
.glass-tile.hero-tile {
    padding: 40px 35px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
}

/* --- TYPOGRAPHIE & TITRES --- */
.hero-title {
    font-family: 'Abril Fatface', cursive;
    color: var(--accent-gold);
    font-size: 2.2rem;
    padding: 4px 0;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.title-wrapper { display: inline-block; margin-bottom: 0; max-width: 100%; }
.title-bar { width: 100%; height: 3px; background-color: var(--accent-gold); border-radius: 10px; }
.section-title { font-family: 'Abril Fatface', cursive; color: var(--accent-gold); font-size: 2rem; margin-bottom: 25px; text-transform: uppercase; }

/* --- BADGES D'ACTION --- */
.action-badges-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.badge-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex: 1 1 160px;
    max-width: 190px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    overflow: hidden;
}
.badge-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
    filter: brightness(1.08);
}
.badge-icon { width: 20px; height: 20px; object-fit: contain; }
.badge-icon-wrapper { display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.badge-label { margin-left: 8px; white-space: nowrap; }

.instagram-badge { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.facebook-badge { background-color: #3b5998; }
.boutique-badge { background-color: var(--accent-gold); }
.mes-ecuries-badge { background-color: #5c3d75; color: #ffffff; }

/* --- MEDIAS & CARROUSELS --- */
.carousel-full-tile {
    width: 100%;
    border-radius: var(--radius-media);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    aspect-ratio: 16 / 9;
    display: flex;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 16 / 9;
}

.swiper {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
}

.swiper-button-next, .swiper-button-prev { color: var(--accent-gold); }
.swiper-pagination-bullet-active { background: var(--accent-gold); }

/* --- CORRECTION BORD À BORD UNIVERSELLE POUR LES CARROUSELS DANS LES TUILES --- */
.glass-tile .carousel-full-tile {
    width: calc(100% + 70px);
    margin-left: -35px;
    margin-right: -35px;
    margin-bottom: -40px;
    margin-top: 20px;
    border-radius: 0;
    box-shadow: none;
}

/* --- VIGNETTES INTERNES --- */
.tuile-generique-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    width: 100%;
    margin-bottom: 25px;
}

.tuile-generique-item {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 18px 15px;
    border-radius: var(--radius-card);
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.tuile-generique-label {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.05rem;
    display: block;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tuile-generique-text {
    color: #444;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* --- GRILLE ÉQUIPE --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
}

.team-card {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-card);
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.team-photo {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.team-name {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.05rem;
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-role {
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.team-desc {
    color: #444;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-top: 10px;
    font-weight: 500;
}
.team-desc:empty { display: none; }

/* --- HORAIRES --- */
.schedule-container { max-width: 650px; margin: 0 auto; }
.schedule-container .schedule-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 46, 122, 0.1);
    gap: 10px;
}
.schedule-container .day { color: var(--primary-blue); font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.schedule-container .hours { text-align: right; font-weight: 500; white-space: nowrap; }
.schedule-container .hours-sep { color: var(--accent-gold); margin: 0 6px; font-weight: 700; }

/* --- LISTING ACTIVITÉS --- */
#pensions { scroll-margin-top: 90px; }

.activities-list { list-style: none; max-width: 760px; margin: 0 auto; padding: 0; }
.activities-list li { border-bottom: 1px solid rgba(0, 46, 122, 0.1); }
.activities-list li:last-child { border-bottom: none; }

.activities-list a.activity-row,
.activities-list a.activity-row:link,
.activities-list a.activity-row:visited,
.activities-list a.activity-row:hover,
.activities-list a.activity-row:active {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 48px;
    padding: 14px 10px;
    text-align: left;
    text-decoration: none;
    color: var(--primary-blue);
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.activities-list a.activity-row:hover { background: rgba(255, 255, 255, 0.35); }
.activities-list a.activity-row:focus-visible { outline: 2px solid var(--primary-blue); outline-offset: 2px; }

.activities-list .activity-icon { color: var(--accent-gold); font-size: 1.1rem; width: 24px; text-align: center; flex-shrink: 0; }
.activities-list .activity-name {
    flex: 1;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: clamp(0.85rem, 2.6vw, 1rem);
    line-height: 1.35;
}
.activities-list .activity-chevron { color: var(--accent-gold); opacity: 0.8; font-size: 0.85rem; flex-shrink: 0; transition: transform 0.2s ease, opacity 0.2s ease; }
.activities-list a.activity-row:hover .activity-chevron { transform: translateX(3px); opacity: 1; }

@media (max-width: 768px) {
    .activities-list a.activity-row { gap: 12px; padding: 14px 4px; }
}

/* --- CONTACT & CARTES --- */
.contact-tile { padding: 0 !important; }
.map-container { width: 100%; line-height: 0; border-top: 1px solid rgba(255, 255, 255, 0.3); aspect-ratio: 16 / 9; }
.map-container iframe { width: 100%; height: 100%; border: 0; }
.contact-split-wrapper { display: flex; align-items: center; justify-content: space-between; padding: 35px 45px; gap: 30px; }
.contact-left { flex: 1; text-align: left; }
.contact-right { flex: 1.5; text-align: left; }
.contact-title-left { font-size: 2.5rem; margin: 0; }
.desktop-br { display: inline; }

.contact-cards-container { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.contact-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.7);
    padding: 12px 16px;
    border-radius: var(--radius-card);
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.contact-card:hover { background: rgba(255, 255, 255, 0.8); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); }
.contact-icon {
    width: 38px; height: 38px; background: #ffffff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent-gold); font-size: 1.05rem; flex-shrink: 0; box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.contact-info { display: flex; flex-direction: column; text-align: left; }
.contact-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--accent-gold); letter-spacing: 0.5px; }
.contact-value { color: var(--primary-blue); font-weight: 700; font-size: 0.95rem; word-break: break-word; }

/* --- GRILLE TARIFS --- */
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; text-align: left; }
.pricing-category { background: rgba(255, 255, 255, 0.4); padding: 22px; border-radius: var(--radius-card); }
.category-subtitle { color: var(--primary-blue); font-family: 'Abril Fatface', cursive; font-size: 1.3rem; margin-bottom: 15px; border-bottom: 2px solid var(--accent-gold); padding-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px solid rgba(0, 46, 122, 0.1); font-weight: 600; gap: 10px; font-size: 0.95rem; }
.price { color: var(--primary-blue); font-weight: 800; white-space: nowrap; flex-shrink: 0; }

/* --- CONTENU LEGAL --- */
.legal-content { text-align: left; max-width: 800px; margin: 0 auto; }
.legal-section { margin-bottom: 25px; }
.legal-section h3 { color: var(--primary-blue); margin-bottom: 8px; font-size: 1.15rem; border-left: 4px solid var(--accent-gold); padding-left: 12px; }
.legal-section p { margin-bottom: 8px; font-size: 0.95rem; color: #444; }
.legal-section a { color: var(--primary-blue); font-weight: 600; }

/* --- FOOTER --- */
.main-footer {
    padding: 20px 0;
    background: white;
    border-top: 1px solid #ddd;
    width: 100%;
    box-shadow: 0 600px 0 0 white;
}
.footer-content { display: flex; justify-content: space-between; align-items: center; color: black; font-size: 0.9rem; }
.legal-link { color: black; text-decoration: underline; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    :root {
        --radius-tile: 20px;
        --radius-media: 16px;
        --radius-card: 14px;
        --radius-sm: 12px;
    }

    .hero-title { font-size: 1.4rem; }
    .glass-tile.hero-tile { padding: 25px 18px; gap: 18px; }
    .section-title { font-size: 1.25rem; margin-bottom: 18px; }
    .contact-title-left { font-size: 1.4rem; }
    .glass-tile { padding: 25px 18px; }
    .tuile-generique-details { grid-template-columns: 1fr; gap: 15px; }
    .badge-label { display: none; }
    .badge-item { padding: 10px; flex: 1 1 auto; max-width: 60px; }
    .badge-item:hover { transform: scale(1.08); }
    .pricing-grid { grid-template-columns: 1fr; }
    .contact-split-wrapper { flex-direction: column; text-align: center; padding: 25px 18px; gap: 18px; }
    .contact-left, .contact-right { text-align: center; width: 100%; }
    .desktop-br { display: none; }
    .footer-content { flex-direction: column; gap: 8px; text-align: center; }

    .glass-tile .carousel-full-tile {
        width: calc(100% + 36px);
        margin-left: -18px;
        margin-right: -18px;
        margin-bottom: -25px;
        margin-top: 15px;
    }

    .schedule-container .schedule-row { padding: 10px 0; gap: 6px; }
    .schedule-container .day { font-size: 0.85rem; }
    .schedule-container .hours { font-size: 0.82rem; }
    .schedule-container .hours-sep { margin: 0 2px; }
}

@media (max-width: 380px) {
    .hero-title { font-size: 1.2rem; padding: 4px 0; }
    .section-title { font-size: 1.1rem; }
    .glass-tile { padding: 20px 12px; }
    .contact-card { padding: 10px 12px; gap: 10px; }
    .contact-value { font-size: 0.85rem; }
    .contact-icon { width: 32px; height: 32px; font-size: 0.9rem; }
    .glass-tile .carousel-full-tile {
        width: calc(100% + 24px);
        margin-left: -12px;
        margin-right: -12px;
    }
}

/* ==========================================================================
   BLOC NAVBAR FLOTTANTE & FIXE
   ========================================================================== */
.nbx {
    position: fixed;
    top: 25px;
    left: 0;
    right: 0;
    z-index: 1000;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nbx-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    background: var(--glass-white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nbx.scrolled {
    top: 12px;
    padding: 0 35px;
}

.nbx.scrolled .nbx-bar {
    padding: 8px 18px;
    background: #002e7a;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(200, 162, 122, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.nbx.scrolled .nbx-logo-img {
    height: 30px;
}

.nbx.scrolled .nbx-mobile-title {
    color: var(--accent-gold);
}

.nbx.scrolled .nbx-icon {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.nbx-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    z-index: 2;
    grid-column: 1;
}

.nbx-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: height 0.3s ease;
}

.nbx-links {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-column: 2;
    justify-content: center;
}

.nbx-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.nbx.scrolled .nbx-link {
    color: #ffffff;
}

.nbx-link:hover, .nbx-link.nbx-active {
    background: var(--primary-blue);
    color: #ffffff;
}

.nbx.scrolled .nbx-link:hover, .nbx.scrolled .nbx-link.nbx-active {
    background: var(--accent-gold);
    color: #002e7a;
}

.nbx-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
    grid-column: 3;
    justify-content: flex-end;
}

.nbx-icon {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: var(--primary-blue);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.nbx-icon:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.nbx-mobile-title {
    grid-column: 2;
    font-family: 'Montserrat', sans-serif;
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
}

.nb2-mobile { display: none; }

/* --- PANNEAU MENU BURGER & BOUTONS PLEINE LARGEUR SANS TUILE --- */
.nbx-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 12px);
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 4px;
    z-index: 1005;
    animation: fadeInDropdown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.nbx-panel.hidden {
    display: none;
}

.nbx-panel-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.nbx-m-link {
    display: grid;
    grid-template-columns: 30px 1fr;
    align-items: center;
    width: 100%;
    padding: 14px 20px;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 700;
    border-radius: var(--radius-card);
    text-transform: uppercase;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    transition: all 0.25s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.nbx-m-link .nbx-m-icon {
    grid-column: 1;
    font-size: 1rem;
    text-align: left;
}

.nbx-m-link span {
    grid-column: 2;
    text-align: center;
    padding-right: 30px;
}

.nbx-m-link.nbx-m-active, .nbx-m-link:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 46, 122, 0.3);
}

/* --- VOILE ASSOMBRISSANT ET FLOU (BACKDROP) --- */
.menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 995;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}

.menu-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.nbx.menu-open {
    z-index: 1005;
}

@media(max-width: 900px) {
    .nb2-desktop { display: none !important; }
    .nb2-mobile { display: flex !important; }
}

.hidden {
    display: none !important;
}

/* --- Correction de l'état actif/ouvert du bouton burger sur mobile --- */
.nbx.menu-open .nbx-icon {
    background: var(--primary-blue) !important;
    color: white !important;
    border-color: var(--primary-blue) !important;
}

@media (hover: none) {
    .nbx-icon:hover {
        background: rgba(255, 255, 255, 0.5);
        color: var(--primary-blue);
        border-color: rgba(255, 255, 255, 0.6);
    }
}
