/* ============================================
   Salama Hovasse — Site Vitrine
   Style: Luxe épuré
   Tons: blanc, beige, or
   Typo: Cormorant Garamond + Montserrat
   ============================================ */

:root {
    --white: #ffffff;
    --cream: #FAF8F5;
    --beige: #F0EBE3;
    --beige-dark: #D4C9BC;
    --gold: #B8965A;
    --gold-light: #D4B87C;
    --gold-dark: #96763E;
    --charcoal: #2C2C2C;
    --charcoal-light: #4A4A4A;
    --text: #3A3A3A;
    --text-light: #6E6E6E;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Montserrat', -apple-system, sans-serif;
}

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

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

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
    text-decoration: none;
}

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

/* ---- Navigation ---- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}

.nav-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--white);
    transition: color 0.4s;
}

.nav-scrolled .nav-logo {
    color: var(--charcoal);
}

.nav-logo-dot {
    color: var(--gold);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-scrolled .nav-links a {
    color: var(--text-light);
}

.nav-scrolled .nav-links a:hover {
    color: var(--charcoal);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--white);
    transition: all 0.3s;
}

.nav-scrolled .nav-toggle span {
    background: var(--charcoal);
}

/* ---- Hero ---- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(30, 28, 25, 0.45) 0%,
        rgba(30, 28, 25, 0.35) 50%,
        rgba(30, 28, 25, 0.55) 100%
    );
}

.hero-content {
    position: relative;
    text-align: center;
    color: var(--white);
    padding: 2rem;
    margin-bottom: 14vh;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.15em;
    color: var(--gold-light);
    margin-bottom: 1.25rem;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3.2rem, 7vw, 5.5rem);
    font-weight: 300;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero-separator {
    width: 60px;
    height: 1px;
    background: var(--gold);
    margin: 0 auto 1.5rem;
}

.hero-tagline {
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    max-width: 650px;
    margin: 0 auto;
}

.hero-scroll {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    animation: float 2.5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ---- Sections ---- */
.section {
    padding: 7rem 0;
}

.section-light {
    background: var(--cream);
}

.section-dark {
    background: var(--charcoal);
    color: var(--white);
}

.section-label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}

.section-label-light {
    color: var(--gold-light);
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 300;
    line-height: 1.25;
    color: var(--charcoal);
    margin-bottom: 1.25rem;
}

.section-title-light {
    color: var(--white);
}

.section-separator {
    width: 50px;
    height: 1px;
    background: var(--gold);
    margin-bottom: 2.5rem;
}

.section-separator-center {
    margin-left: auto;
    margin-right: auto;
}

.section-separator-light {
    background: var(--gold-light);
}

/* ---- À propos ---- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 5rem;
    align-items: center;
}

.about-image-frame {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.about-image-frame::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 1px solid var(--gold);
    border-radius: 2px;
    z-index: -1;
}

.about-image-frame img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: center top;
}

.about-description {
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ---- Bouton ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 2rem;
    border: 1px solid var(--gold);
    color: var(--gold-dark);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: all 0.35s;
    margin-top: 1rem;
}

.btn:hover {
    background: var(--gold);
    color: var(--white);
}

.btn-light {
    border-color: var(--gold-light);
    color: var(--gold-light);
}

.btn-light:hover {
    background: var(--gold-light);
    color: var(--charcoal);
}

/* ---- Visual Break ---- */
.visual-break {
    position: relative;
    height: 300px;
    overflow: hidden;
}

@media (min-width: 900px) {
    .visual-break {
        height: 350px;
    }
}

.visual-break img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.visual-break-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 28, 25, 0.5);
}

.visual-break-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.visual-break-content blockquote {
    font-family: var(--font-serif);
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 300;
    font-style: italic;
    color: var(--white);
    text-align: center;
    max-width: 700px;
    line-height: 1.6;
}

/* ---- Timeline / Parcours ---- */
.timeline {
    max-width: 700px;
    margin: 3rem auto 0;
    position: relative;
    padding-left: 2.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--beige-dark);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2.5rem;
    top: 0.35rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--gold);
    transform: translateX(-4px);
}

.timeline-period {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    display: block;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
}

.timeline-text {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* ---- Skills / Expertise ---- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

.skill-card {
    padding: 2.5rem;
    background: var(--white);
    border: 1px solid var(--beige);
    transition: all 0.35s;
}

.skill-card:hover {
    border-color: var(--gold);
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
}

.skill-icon {
    color: var(--gold);
    margin-bottom: 1.25rem;
}

.skill-card h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
}

.skill-card p {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.75;
}

/* ---- Gallery ---- */
.gallery {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
    margin-top: 3rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.gallery-large {
    grid-row: 1 / 3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.5));
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.4s;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Contact ---- */
.section-dark .container {
    text-align: center;
}

.contact-intro {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.85;
    max-width: 500px;
    margin: 0 auto 2.5rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.88rem;
    font-weight: 300;
    transition: color 0.3s;
}

.contact-link:hover {
    color: var(--gold-light);
}

/* ---- Footer ---- */
.footer {
    padding: 2rem 0;
    background: #1E1E1E;
    text-align: center;
}

.footer p {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.08em;
}

/* ---- Livre d'or (Book 3D) ---- */
.book-intro {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.book-scene {
    perspective: 1800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem;
}

.book {
    position: relative;
    width: 680px;
    height: 480px;
    transform-style: preserve-3d;
}

.page {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1.000);
    z-index: 1;
    cursor: pointer;
}

.page.flipped {
    transform: rotateY(-180deg);
    z-index: 10;
}

.page-front,
.page-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    overflow: hidden;
    border-radius: 2px;
    background: #FDFBF7;
    box-shadow: 2px 2px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

.page-back {
    transform: rotateY(180deg);
}

.page-front img,
.page-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex: 1;
}

.page-caption {
    padding: 0.6rem 1rem;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--text-light);
    text-align: center;
    background: #FDFBF7;
    border-top: 1px solid var(--beige);
}

.page-flag {
    font-size: 0.85rem;
}

/* Couverture */
.page-cover-front,
.page-cover-back {
    background: linear-gradient(135deg, #8B6F47 0%, #6B5232 50%, #8B6F47 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-content {
    text-align: center;
    color: var(--white);
    padding: 2rem;
}

.cover-content h3 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: #F5E6C8;
}

.cover-content p {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-style: italic;
    color: rgba(245, 230, 200, 0.7);
}

.cover-thanks {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-style: italic;
    color: #F5E6C8;
    margin-bottom: 1rem;
}

.cover-ornament {
    width: 50px;
    height: 1px;
    background: rgba(245, 230, 200, 0.4);
    margin: 1rem auto;
}

/* Centre du livre (reliure) */
.book::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 100%;
    background: linear-gradient(to right,
        rgba(0,0,0,0.15),
        rgba(0,0,0,0.05) 30%,
        rgba(0,0,0,0) 50%,
        rgba(0,0,0,0.05) 70%,
        rgba(0,0,0,0.15));
    z-index: 100;
    pointer-events: none;
}

/* Page gauche (statique) - reflet de la page retournée */
.book::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: #FDFBF7;
    border-radius: 2px;
    box-shadow: -2px 2px 12px rgba(0,0,0,0.08);
    z-index: 0;
}

/* Ombre portée du livre */
.book-scene::after {
    content: '';
    width: 680px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.15) 0%, transparent 70%);
    margin-top: 8px;
}

/* Navigation */
.book-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    z-index: 10;
}

.book-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--beige-dark);
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text);
}

.book-btn:hover:not(:disabled) {
    border-color: var(--gold);
    color: var(--gold);
}

.book-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.book-pages {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--text-light);
    min-width: 80px;
    text-align: center;
}

/* Z-index pour l'empilement des pages */
.page[data-page="0"] { z-index: 4; }
.page[data-page="1"] { z-index: 3; }
.page[data-page="2"] { z-index: 2; }
.page[data-page="3"] { z-index: 1; }
.page.flipped[data-page="0"] { z-index: 1; }
.page.flipped[data-page="1"] { z-index: 2; }
.page.flipped[data-page="2"] { z-index: 3; }
.page.flipped[data-page="3"] { z-index: 4; }

/* ---- Reveal Animations ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item.reveal { transition-delay: 0.1s; }
.timeline-item.reveal:nth-child(2) { transition-delay: 0.25s; }
.timeline-item.reveal:nth-child(3) { transition-delay: 0.4s; }

.skill-card.reveal:nth-child(1) { transition-delay: 0.05s; }
.skill-card.reveal:nth-child(2) { transition-delay: 0.15s; }
.skill-card.reveal:nth-child(3) { transition-delay: 0.25s; }
.skill-card.reveal:nth-child(4) { transition-delay: 0.35s; }

.gallery-item.reveal:nth-child(1) { transition-delay: 0.05s; }
.gallery-item.reveal:nth-child(2) { transition-delay: 0.2s; }
.gallery-item.reveal:nth-child(3) { transition-delay: 0.35s; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image-frame {
        max-width: 400px;
        margin: 0 auto;
    }

    .about-text {
        text-align: center;
    }

    .about-text .section-separator {
        margin-left: auto;
        margin-right: auto;
    }

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

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

    .gallery-large {
        grid-row: auto;
    }
}

@media (max-width: 900px) {
    .book {
        width: 500px;
        height: 360px;
    }
    .book-scene::after {
        width: 500px;
    }
}

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

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(16px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        color: var(--charcoal) !important;
        font-size: 0.9rem;
    }

    .section {
        padding: 5rem 0;
    }

    .hero-tagline {
        font-size: 0.72rem;
        letter-spacing: 0.1em;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .visual-break {
        height: 300px;
    }

    .skill-card {
        padding: 2rem;
    }

    .book {
        width: 340px;
        height: 260px;
    }
    .book-scene::after {
        width: 340px;
    }
    .cover-content h3 {
        font-size: 1.3rem;
    }
    .page-caption {
        font-size: 0.6rem;
        padding: 0.4rem 0.5rem;
    }
}
