/* =========================================================================
 * Simit & Café — main.css
 * Design system COMPLET (desktop). Les overrides mobile sont dans responsive.css.
 * Webscale (webscalelab.fr)
 * ========================================================================= */

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

/* ===== DESIGN TOKENS ===== */
:root {
    --white: #FFFFFF;
    --off-white: #FAFAFA;
    --gray-50: #F8F8F8;
    --gray-100: #F0F0F0;
    --gray-200: #E5E5E5;
    --gray-300: #D4D4D4;
    --gray-500: #737373;
    --gray-700: #404040;
    --gray-900: #171717;
    --black: #0A0A0A;
    --accent: #8B5E3C;
    --accent-hover: #73482C;
    --success: #3D7A3D;
    --error: #C44A4A;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;

    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 48px;
    --space-xl: 80px;
    --space-2xl: 120px;

    --container: 1200px;
    --radius-sm: 2px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== BASE ===== */
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--white);
    color: var(--gray-900);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

/* ===== SKIP LINK (a11y) ===== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: var(--black);
    color: var(--white);
    padding: 12px 24px;
    z-index: 9999;
    font-size: 14px;
    text-decoration: none;
    border-radius: var(--radius-sm);
}
.skip-link:focus { top: 16px; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; }
h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.15; letter-spacing: -0.01em; }
h3 { font-size: clamp(20px, 2.5vw, 26px); line-height: 1.3; }
h2 em, h1 em { font-style: italic; font-weight: 400; }

p { font-size: 16px; margin-bottom: var(--space-sm); color: var(--gray-700); }

.label {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: var(--space-sm);
}

.subtitle {
    font-size: 17px;
    color: var(--gray-500);
    max-width: 520px;
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }

/* ===== FOCUS STATES (a11y) ===== */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 40px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
    border-radius: 0;
    text-align: center;
    text-decoration: none;
    min-height: 48px;
    touch-action: manipulation;
}
.btn-primary {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}
.btn-primary:hover { background: var(--gray-900); }
.btn-secondary {
    background: transparent;
    color: var(--gray-900);
    border-color: var(--gray-300);
}
.btn-secondary:hover { border-color: var(--black); }
.btn-white {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}
.btn-white:hover { background: rgba(255,255,255,0.9); }
.btn-outline-white {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}
.btn-outline-white:hover {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.btn[disabled], .btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-md);
}
.section { padding: var(--space-2xl) 0; }
.section-sm { padding: var(--space-xl) 0; }
.bg-white { background: var(--white); }
.bg-gray { background: var(--gray-50); }
.bg-dark { background: var(--gray-900); color: var(--white); }
.bg-dark h2, .bg-dark h3 { color: var(--white); }
.bg-dark p, .bg-dark .label { color: var(--gray-300); }
.text-center { text-align: center; }

/* ===== NAVIGATION ===== */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), box-shadow var(--transition);
    padding: 20px 0;
}
.nav.scrolled {
    border-bottom-color: var(--gray-200);
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
    padding: 14px 0;
}
.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-logo {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--black);
    letter-spacing: -0.01em;
}
.nav-logo img { max-height: 40px; width: auto; }
.nav-links {
    display: flex;
    gap: 36px;
    list-style: none;
}
.nav-links a {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gray-500);
    position: relative;
    padding: 4px 0;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--black);
    transition: width var(--transition);
}
.nav-links a:hover { color: var(--black); }
.nav-links a:hover::after { width: 100%; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}
.hamburger span {
    width: 22px;
    height: 1.5px;
    background: var(--black);
    transition: all 0.3s ease;
    display: block;
}

/* Mobile overlay */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: var(--white);
    z-index: 200;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.mobile-overlay.active { display: flex; }
.mobile-overlay .nav-links {
    display: flex;
    flex-direction: column;
    gap: 28px;
    text-align: center;
    list-style: none;
}
.mobile-overlay .nav-links a {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gray-900);
    padding: 8px 0;
}
.mobile-overlay .nav-links a::after { display: none; }
.mobile-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--black);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: flex-end;
    padding: var(--space-2xl) var(--space-md) var(--space-xl);
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(10,10,10,0.1) 0%, rgba(10,10,10,0.55) 70%, rgba(10,10,10,0.7) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 620px;
}
.hero .label { color: rgba(255,255,255,0.7); }
.hero h1 { color: var(--white); margin-bottom: var(--space-sm); }
.hero-sub {
    font-size: 18px;
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
    max-width: 480px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== MARQUEE (brand strip) ===== */
.marquee {
    padding: var(--space-md) 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    overflow: hidden;
    background: var(--white);
}
.marquee-track {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.marquee-item {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gray-500);
    white-space: nowrap;
}
.marquee-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gray-300);
    display: inline-block;
}

/* ===== PRODUCTS SHOWCASE ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}
.product-card {
    position: relative;
    overflow: hidden;
}
.product-img-wrap {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--gray-100);
}
.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.product-card:hover .product-img-wrap img { transform: scale(1.04); }
.product-name {
    padding: var(--space-sm) 0 4px;
    font-size: 15px;
    font-weight: 500;
    color: var(--black);
    text-align: center;
}
.product-tag {
    font-size: 12px;
    color: var(--gray-500);
    text-align: center;
    display: block;
    margin-bottom: var(--space-xs);
}

/* ===== SPLIT SECTION (image + text) ===== */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 600px;
}
.split-image {
    position: relative;
    overflow: hidden;
}
.split-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.split-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-xl) var(--space-xl);
}
.split-text h2 { margin-bottom: var(--space-sm); }
.split-text p { max-width: 440px; }
.split-text .btn { margin-top: var(--space-lg); align-self: flex-start; }

.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }

/* ===== CARTE PDF ===== */
.carte-block {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}
.carte-block h2 { margin-bottom: var(--space-sm); }
.carte-block .subtitle { margin: 0 auto var(--space-lg); }
.carte-block .btn { margin-bottom: var(--space-md); }
.carte-note {
    font-size: 13px;
    color: var(--gray-500);
    font-style: italic;
}

/* Page Carte (PDF viewer) */
.carte-page {
    padding: var(--space-xl) 0;
}
.carte-page .carte-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}
.carte-page .carte-header h1 { margin-bottom: var(--space-sm); }
.carte-page .carte-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}
.carte-viewer {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    border: 1px solid var(--gray-200);
    background: var(--gray-50);
}
.carte-viewer iframe,
.carte-viewer embed {
    width: 100%;
    height: 80vh;
    min-height: 600px;
    border: none;
    display: block;
}
.carte-empty {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    background: var(--gray-50);
    border: 1px dashed var(--gray-300);
}

/* ===== GALLERY MASONRY ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
    gap: 6px;
}
.gallery-grid .g-item {
    overflow: hidden;
    cursor: pointer;
    position: relative;
}
.gallery-grid .g-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
}
.gallery-grid .g-item:hover img { transform: scale(1.03); }
.g-tall { grid-row: span 2; }
.g-wide { grid-column: span 2; }

/* ===== REVIEWS ===== */
.reviews-score {
    margin-bottom: var(--space-lg);
}
.reviews-number {
    font-family: var(--font-display);
    font-size: clamp(48px, 6vw, 72px);
    font-weight: 400;
    color: var(--black);
    line-height: 1;
    margin-bottom: 4px;
}
.reviews-stars {
    letter-spacing: 6px;
    font-size: 18px;
    color: #D4A44A;
    margin-bottom: 8px;
}
.reviews-source {
    font-size: 13px;
    color: var(--gray-500);
}
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}
.review-card {
    border-top: 1px solid var(--gray-200);
    padding-top: var(--space-md);
}
.review-text {
    font-size: 15px;
    font-style: italic;
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}
.review-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
}

/* ===== CONTACT ===== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
}
.contact-info h3 { margin-bottom: var(--space-lg); }
.contact-detail { margin-bottom: var(--space-md); }
.contact-detail-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 6px;
}
.contact-detail p { color: var(--gray-300); margin-bottom: 0; }
.contact-detail a { color: var(--white); font-weight: 500; }
.contact-detail a:hover { color: var(--gray-300); }

/* Form */
.form-group { margin-bottom: var(--space-md); position: relative; }
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 8px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 0;
    border: none;
    border-bottom: 1px solid var(--gray-700);
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--white);
    background: transparent;
    transition: border-color var(--transition);
    border-radius: 0;
    -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-bottom-color: var(--white);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--gray-500); }
.form-group select { color: var(--gray-300); }
.form-group select option { background: var(--gray-900); color: var(--white); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-submit { margin-top: var(--space-lg); }
.form-error {
    color: #ff8c8c;
    font-size: 13px;
    margin-top: 8px;
}
.form-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    visibility: hidden;
}
#contactSuccess {
    display: none;
    text-align: center;
    padding: var(--space-xl) 0;
}
#contactSuccess p { color: var(--white); }

.map-wrap {
    margin-top: var(--space-xl);
    height: 380px;
    overflow: hidden;
}
.map-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(100%) brightness(0.9) contrast(1.1);
}

/* ===== LEGAL PAGES (Mentions, Confidentialité) ===== */
.legal-page { padding: var(--space-xl) 0; }
.legal-page .legal-content {
    max-width: 720px;
    margin: 0 auto;
}
.legal-page .legal-content h1 {
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: var(--space-lg);
}
.legal-page .legal-content h2 {
    font-size: clamp(22px, 3vw, 28px);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}
.legal-page .legal-content h3 {
    font-size: 18px;
    margin-top: var(--space-md);
    margin-bottom: 8px;
}
.legal-page .legal-content p,
.legal-page .legal-content li {
    color: var(--gray-700);
    line-height: 1.75;
}
.legal-page .legal-content ul,
.legal-page .legal-content ol {
    margin-left: 24px;
    margin-bottom: var(--space-sm);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--black);
    padding: var(--space-lg) 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    font-size: 13px;
    color: var(--gray-500);
}
.footer-inner a { color: var(--gray-500); }
.footer-inner a:hover { color: var(--white); }
.footer-links { display: flex; gap: var(--space-md); }

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    cursor: zoom-out;
}
.lightbox.active { display: flex; }
.lightbox img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: default;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 32px;
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition);
}
.lightbox-close:hover { color: white; }

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

/* ===== WORDPRESS CORE STYLES ===== */
.wp-block-image { margin-bottom: var(--space-md); }
.alignleft { float: left; margin-right: var(--space-md); }
.alignright { float: right; margin-left: var(--space-md); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--gray-500); margin-top: 8px; text-align: center; }
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
