/* ============================================
   CHALET ROYAL — CSS
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --gold: #c9a84c;
    --gold-light: #e8c97a;
    --dark: #0d0d0d;
    --dark-2: #141414;
    --dark-3: #1c1c1c;
    --dark-4: #242424;
    --text: #e0e0e0;
    --text-muted: #888;
    --white: #ffffff;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
    --radius: 12px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    background: var(--dark);
    color: var(--text);
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
strong { color: var(--white); }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   PRELOADER
   ============================================ */
#preloader {
    position: fixed; inset: 0;
    background: var(--dark);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; }

.preloader-inner {
    display: flex; align-items: center; justify-content: center;
}
.preloader-logo {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 0.1em;
    animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.95); }
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.5rem 0;
    transition: background var(--transition), padding var(--transition), backdrop-filter var(--transition);
}
.site-header.scrolled {
    background: rgba(13, 13, 13, 0.92);
    backdrop-filter: blur(16px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo-text {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.02em;
}
.logo-text em { color: var(--gold); font-style: normal; }

.main-nav { display: flex; align-items: center; gap: 2.5rem; }
.main-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color var(--transition);
}
.main-nav a:hover { color: var(--gold); }
.btn-nav {
    background: var(--gold) !important;
    color: var(--dark) !important;
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-weight: 600 !important;
    transition: background var(--transition), transform var(--transition) !important;
}
.btn-nav:hover { background: var(--gold-light) !important; transform: translateY(-1px); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav */
.mobile-nav {
    position: fixed;
    top: 0; right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    background: var(--dark-2);
    border-left: 1px solid rgba(201, 168, 76, 0.2);
    display: flex; flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    z-index: 99;
    transition: right var(--transition);
}
.mobile-nav.open { right: 0; }
.mobile-link {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--text);
    transition: color var(--transition);
}
.mobile-link:hover { color: var(--gold); }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--gold);
    color: var(--dark);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 168, 76, 0.3);
}
.btn-ghost {
    display: inline-flex; align-items: center; gap: 0.5rem;
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--white);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    transition: border-color var(--transition), background var(--transition);
}
.btn-ghost:hover {
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.08);
}

/* ============================================
   SECTION LABELS & TITLES
   ============================================ */
.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}
.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}
.section-header-center {
    text-align: center;
    margin-bottom: 4rem;
}
.section-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   HERO
   ============================================ */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
}
.hero-img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(
        135deg,
        rgba(13,13,13,0.85) 0%,
        rgba(13,13,13,0.5) 60%,
        rgba(13,13,13,0.7) 100%
    );
}
.hero-content {
    position: relative; z-index: 2;
    text-align: center;
    padding: 0 1.5rem;
    animation: fadeUp 1s ease 0.3s both;
}
.hero-overline {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}
.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 900;
    color: var(--white);
    line-height: 0.95;
    margin-bottom: 1.5rem;
}
.hero-title em {
    color: var(--gold);
    font-style: normal;
    display: block;
}
.hero-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.75);
    max-width: 520px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}
.hero-actions {
    display: flex; align-items: center; justify-content: center;
    gap: 1rem; flex-wrap: wrap;
}
.scroll-down {
    position: absolute;
    bottom: 2.5rem; left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex; flex-direction: column; align-items: center;
}
.scroll-line {
    display: block;
    width: 1px; height: 60px;
    background: linear-gradient(to bottom, transparent, var(--gold));
    animation: scrollAnim 1.8s ease-in-out infinite;
}
@keyframes scrollAnim {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   ABOUT
   ============================================ */
.about-section {
    padding: 8rem 0;
    background: var(--dark-2);
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}
.about-image-wrap {
    position: relative;
}
.about-img {
    width: 100%;
    height: 580px;
    object-fit: cover;
    border-radius: var(--radius);
}
.about-badge {
    position: absolute;
    bottom: -1.5rem; right: -1.5rem;
    background: var(--gold);
    color: var(--dark);
    width: 110px; height: 110px;
    border-radius: 50%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    box-shadow: 0 8px 32px rgba(201, 168, 76, 0.4);
}
.badge-num {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
}
.badge-text {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
}
.about-content p {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-size: 1rem;
}
.about-content p strong { color: var(--white); }

/* ============================================
   SERVICES
   ============================================ */
.services-section {
    padding: 8rem 0;
    background: var(--dark);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.service-card {
    background: var(--dark-3);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.service-card:hover {
    border-color: rgba(201, 168, 76, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
.service-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.2);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
    margin-bottom: 1.4rem;
    transition: background var(--transition), border-color var(--transition);
}
.service-card:hover .service-icon {
    background: rgba(201, 168, 76, 0.15);
    border-color: rgba(201, 168, 76, 0.5);
}
.service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 0.75rem;
}
.service-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ============================================
   GALLERY — infinite scroll
   ============================================ */
.gallery-section {
    padding: 8rem 0;
    background: var(--dark-2);
    overflow: hidden;
}

/* wrapper masque le débordement */
.gallery-track-wrap {
    overflow: hidden;
    margin-bottom: 1rem;
    /* fade sur les bords */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.gallery-track-wrap:last-child { margin-bottom: 0; }

/* la piste qui contient les images */
.gallery-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    will-change: transform;
}

/* animations CSS pures */
@keyframes scrollLTR {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@keyframes scrollRTL {
    from { transform: translateX(-50%); }
    to   { transform: translateX(0); }
}

.track-ltr {
    animation: scrollLTR 35s linear infinite;
}
.track-rtl {
    animation: scrollRTL 40s linear infinite;
}

/* pause au survol */
.gallery-track-wrap:hover .gallery-track {
    animation-play-state: paused;
}

/* chaque vignette */
.gallery-thumb {
    display: block;
    flex-shrink: 0;
    width: 300px;
    height: 220px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}
.gallery-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    pointer-events: none;
}
.gallery-thumb:hover img { transform: scale(1.07); }

/* ============================================
   RESERVATION
   ============================================ */
.reservation-section {
    padding: 8rem 0;
    background: var(--dark);
}
.reservation-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: start;
}
.reservation-info p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}
.contact-items { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-item {
    display: flex; align-items: flex-start; gap: 1rem;
}
.contact-icon {
    flex-shrink: 0;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid rgba(201, 168, 76, 0.25);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
    margin-top: 0.1rem;
}
.contact-item strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.2rem;
}
.contact-item p, .contact-item a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color var(--transition);
}
.contact-item a:hover { color: var(--gold); }

/* Form */
.reservation-form-wrap {
    background: var(--dark-3);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 3rem;
}
.reservation-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.form-group input,
.form-group select,
.form-group textarea {
    background: var(--dark-4);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    padding: 0.85rem 1rem;
    outline: none;
    transition: border-color var(--transition);
    width: 100%;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.25); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--gold);
}
.form-group select option { background: var(--dark-4); }
.form-group textarea { resize: vertical; min-height: 100px; }

.btn-submit {
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
    background: var(--gold);
    color: var(--dark);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    margin-top: 0.5rem;
}
.btn-submit svg { width: 18px; height: 18px; }
.btn-submit:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 168, 76, 0.35);
}
.form-success {
    display: none;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    color: var(--gold-light);
    font-size: 0.9rem;
    text-align: center;
}
.form-success.show { display: block; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--dark-2);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 5rem 0 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}
.footer-brand .logo-text { font-size: 1.4rem; }
.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 1rem 0 1.5rem;
    max-width: 280px;
    line-height: 1.7;
}
.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    transition: border-color var(--transition), color var(--transition);
}
.footer-social a:hover { border-color: var(--gold); color: var(--gold); }
.footer-links h4, .footer-contact h4 {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 1.5rem;
}
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition);
}
.footer-links a:hover { color: var(--gold); }
.footer-contact p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}
.footer-contact a { color: var(--text-muted); transition: color var(--transition); }
.footer-contact a:hover { color: var(--gold); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 2rem;
    text-align: center;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.85rem; }

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { gap: 3rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: span 2; }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .nav-toggle { display: flex; }

    .about-grid { grid-template-columns: 1fr; }
    .about-img { height: 380px; }
    .about-badge { bottom: -1rem; right: -0.5rem; width: 90px; height: 90px; }
    .badge-num { font-size: 2rem; }

    .services-grid { grid-template-columns: 1fr; }

    .gallery-track-wrap {
        -webkit-mask-image: none;
        mask-image: none;
    }
    .gallery-thumb { width: 220px; height: 160px; }

    .reservation-grid { grid-template-columns: 1fr; gap: 3rem; }
    .reservation-form-wrap { padding: 2rem 1.5rem; }
    .form-row { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .footer-brand { grid-column: span 1; }

    .hero-title { font-size: clamp(3rem, 14vw, 5rem); }
}

@media (max-width: 480px) {
    .container { padding: 0 1.25rem; }
    .hero-actions { flex-direction: column; align-items: stretch; text-align: center; }
    .gallery-thumb { width: 180px; height: 130px; }
}
