/**
 * Maison Claude — Landing page responsive
 * Breakpoints : 360 / 480 / 576 / 768 / 992 / 1200 / 1400+
 */

:root {
    --primary-blue: #244cfd;
    --secondary-blue: #0481f7;
    --bg-light: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.78);
    --glass-border: rgba(0, 0, 0, 0.06);
    --text-color: #1e293b;
    --text-muted: #64748b;
    --header-h: 64px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --radius-card: clamp(20px, 4vw, 40px);
    --shadow-card: 0 20px 40px -10px rgba(0, 0, 0, 0.06), 0 10px 20px -5px rgba(0, 0, 0, 0.03);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-light);
    background-image:
        radial-gradient(at 0% 0%, rgba(36, 76, 253, 0.06) 0, transparent 52%),
        radial-gradient(at 100% 100%, rgba(4, 129, 247, 0.06) 0, transparent 52%);
    color: var(--text-color);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
}

/* Décorations — réduites sur petits écrans */
.decoration {
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.14;
    pointer-events: none;
}

.shape-1 {
    width: min(500px, 90vw);
    height: min(500px, 90vw);
    background: var(--primary-blue);
    top: -20%;
    left: -25%;
}

.shape-2 {
    width: min(450px, 85vw);
    height: min(450px, 85vw);
    background: var(--secondary-blue);
    bottom: -20%;
    right: -25%;
}

/* ─── Header ─── */
.header-area {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding-top: calc(12px + var(--safe-top));
    padding-bottom: 12px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 24px);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}

.brand-link img {
    height: clamp(32px, 8vw, 40px);
    width: auto;
    display: block;
}

/* Menu desktop */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
    background: #fff;
    border-color: rgba(36, 76, 253, 0.25);
    outline: none;
}

.nav-toggle-icon {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    position: relative;
    border-radius: 2px;
    transition: background 0.2s;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.25s ease, top 0.25s ease;
}

.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-icon {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

.site-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 32px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.875rem, 2.5vw, 0.95rem);
    transition: color 0.2s, opacity 0.2s;
    opacity: 0.85;
    white-space: nowrap;
    padding: 8px 4px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
    opacity: 1;
    color: var(--primary-blue);
    outline: none;
}

.nav-menu li.menu-active a {
    color: var(--primary-blue);
    opacity: 1;
}

/* ─── Hero ─── */
.hero-section {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding:
        calc(var(--header-h) + var(--safe-top) + 24px)
        clamp(12px, 4vw, 24px)
        calc(24px + var(--safe-bottom));
}

.hero-content {
    width: 100%;
    max-width: min(850px, 100%);
    padding: clamp(28px, 6vw, 60px) clamp(20px, 5vw, 40px);
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.hero-logo-box {
    background: #fff;
    display: inline-block;
    padding: clamp(16px, 4vw, 25px) clamp(24px, 6vw, 45px);
    border-radius: clamp(16px, 3vw, 25px);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: clamp(20px, 4vw, 35px);
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.12);
}

.hero-logo-box img {
    height: clamp(64px, 18vw, 100px);
    width: auto;
    max-width: 100%;
    display: block;
}

.hero-section h1 {
    font-size: clamp(1.75rem, 7vw, 4.5rem);
    font-weight: 800;
    margin: 0 0 clamp(14px, 3vw, 25px);
    letter-spacing: clamp(-1px, -0.5vw, -3px);
    line-height: 1.08;
    background: linear-gradient(135deg, #0f172a 0%, #244cfd 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    word-break: break-word;
}

.hero-section .hero-tagline {
    font-size: clamp(0.95rem, 2.8vw, 1.35rem);
    color: var(--text-muted);
    margin: 0 auto clamp(24px, 5vw, 45px);
    line-height: 1.55;
    font-weight: 500;
    max-width: 38ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.btn-main {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border: none;
    padding: clamp(14px, 3vw, 18px) clamp(28px, 6vw, 45px);
    border-radius: clamp(14px, 2.5vw, 18px);
    color: #fff !important;
    font-weight: 700;
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    text-decoration: none !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    min-width: min(100%, 220px);
    box-shadow: 0 15px 35px -10px rgba(36, 76, 253, 0.45);
    -webkit-tap-highlight-color: transparent;
}

.btn-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px -8px rgba(36, 76, 253, 0.55);
    color: #fff;
}

.btn-main:active {
    transform: translateY(-1px);
}

/* Preloader */
.preloader {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: clamp(44px, 12vw, 60px);
    height: clamp(44px, 12vw, 60px);
    border: 5px solid #f1f5f9;
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Tablette portrait ─── */
@media (max-width: 991.98px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: fixed;
        top: calc(var(--header-h) + var(--safe-top));
        left: var(--safe-left);
        right: var(--safe-right);
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
        padding: 12px clamp(16px, 4vw, 24px) 16px;
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s;
        pointer-events: none;
    }

    .site-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        width: 100%;
    }

    .nav-menu a {
        width: 100%;
        padding: 14px 16px;
        border-radius: 12px;
        background: rgba(248, 250, 252, 0.8);
        justify-content: center;
    }

    .nav-menu a:hover,
    .nav-menu li.menu-active a {
        background: rgba(36, 76, 253, 0.08);
    }
}

/* ─── Mobile ─── */
@media (max-width: 575.98px) {
    :root {
        --header-h: 56px;
    }

    .hero-section {
        align-items: flex-start;
        padding-top: calc(var(--header-h) + var(--safe-top) + 16px);
    }

    .hero-content {
        margin-top: 8px;
    }

    .shape-1,
    .shape-2 {
        opacity: 0.08;
        filter: blur(70px);
    }
}

/* ─── Très petits écrans ─── */
@media (max-width: 359.98px) {
    .hero-section h1 {
        letter-spacing: -0.5px;
    }

    .btn-main {
        width: 100%;
    }
}

/* ─── Paysage mobile ─── */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        align-items: flex-start;
        padding-top: calc(var(--header-h) + var(--safe-top) + 12px);
        padding-bottom: 16px;
    }

    .hero-content {
        padding: 20px 24px;
    }

    .hero-logo-box {
        margin-bottom: 12px;
        padding: 12px 20px;
    }

    .hero-logo-box img {
        height: 48px;
    }

    .hero-section .hero-tagline {
        margin-bottom: 16px;
    }
}

/* ─── Grands écrans ─── */
@media (min-width: 1400px) {
    .header-inner {
        max-width: 1320px;
    }

    .hero-content {
        max-width: 900px;
    }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .spinner {
        animation-duration: 1.5s;
    }

    .btn-main,
    .site-nav,
    .nav-toggle-icon::before,
    .nav-toggle-icon::after {
        transition: none;
    }

    .btn-main:hover {
        transform: none;
    }
}
