/* ============================================
   DR. CORNELIA STANCIU — STYLES GLOBAUX
   Design moderne & chaleureux
   ============================================ */


/* ---- Palette & Variables ---- */
:root {
    --creme: #FCE4CC;
    --creme-profond: #fde6b2;
    --sable: #eacfb4;
    --terre: #c4a088;
    --bois: #a08068;
    --bois-fonce: #6B4F42;
    --encre: #1E1412;
    --encre-douce: #352822;

    --sauge: #9E4E50; /* foncé pour contraste AA (4.7:1 sur crème) */
    --sauge-clair: #f0aeaf;
    --sauge-profond: #8E3E40;
    --sauge-nuit: #1E1412;

    --terracotta: #C06050;
    --terracotta-doux: #fce4cc;

    --blanc: #FFFDF8;
    --ombre-douce: rgba(42, 30, 32, 0.06);
    --ombre-moyenne: rgba(42, 30, 32, 0.12);

    --font-display: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Inter', 'Helvetica Neue', sans-serif;

    --section-y: clamp(5rem, 10vw, 9rem);
    --content-max: 1140px;
    --gutter: clamp(1.5rem, 4vw, 3rem);

    --radius: 16px;
    --radius-sm: 10px;
    --radius-pill: 50px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --transition: 0.45s var(--ease-out);
    --transition-slow: 0.8s var(--ease-out);
}

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

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

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--encre-douce);
    background:
        radial-gradient(ellipse at 80% 5%, rgba(240, 174, 175, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse at 15% 85%, rgba(253, 230, 178, 0.09) 0%, transparent 50%),
        var(--creme);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    animation: pageEnter 0.6s var(--ease-out) both;
}

@keyframes pageEnter {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--creme); }
::-webkit-scrollbar-thumb { background: var(--sable); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--terre); }

/* ---- Typographie ---- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--encre);
    line-height: 1.12;
    font-weight: 400;
}

h1 {
    font-size: clamp(2.6rem, 6vw, 4.2rem);
    font-weight: 300;
    letter-spacing: -0.01em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
}

h3 {
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    font-weight: 400;
}

p {
    margin-bottom: 1.3rem;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    line-height: 1.85;
    text-align: left;
}

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

a:hover { color: var(--terracotta); }

:focus-visible {
    outline: 2px solid var(--sauge);
    outline-offset: 3px;
}

::selection {
    background-color: var(--sauge-clair);
    color: var(--encre);
}

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

/* ---- Conteneur ---- */
.wrap {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---- Surtitre ---- */
.kicker {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sauge);
    margin-bottom: 1rem;
    display: block;
}

/* ---- Trait décoratif ---- */
.flourish {
    display: block;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--sauge-clair), var(--terracotta-doux));
    border: none;
    margin: 1.5rem 0 2rem;
    border-radius: 2px;
}

.flourish--center {
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1.2rem 0;
    transition: all var(--transition);
}

.nav.scrolled {
    background-color: rgba(255, 250, 243, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 0.7rem 0;
    box-shadow: 0 1px 30px rgba(42, 30, 32, 0.05);
    border-bottom: 1px solid rgba(234, 207, 180, 0.4);
}

.nav-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 400;
    font-style: italic;
    color: var(--encre);
    text-decoration: none;
    transition: color var(--transition);
}
.nav-logo:hover { color: var(--sauge); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--encre-douce);
    text-decoration: none;
    padding: 0.45rem 0.7rem;
    border-radius: var(--radius-pill);
    transition: color var(--transition), background var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--sauge-profond);
    background: rgba(240, 174, 175, 0.12);
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    position: relative;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--encre);
    position: absolute;
    left: 5px;
    transition: all var(--transition);
}

.hamburger span:nth-child(1) { top: 9px; }
.hamburger span:nth-child(2) { top: 15px; width: 16px; }
.hamburger span:nth-child(3) { top: 21px; }

.hamburger.open span:nth-child(1) { top: 15px; transform: rotate(45deg); width: 22px; }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { top: 15px; transform: rotate(-45deg); }

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(42, 30, 32, 0.25);
    backdrop-filter: blur(4px);
    z-index: 998;
}
.nav-overlay.visible { display: block; }

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: var(--section-y) 0;
    position: relative;
}

.section--warm {
    background-color: var(--creme-profond);
}

.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, var(--sable) 50%, transparent 95%);
}

.section--dark {
    background-color: var(--sauge-nuit);
    color: var(--sable);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
    color: var(--blanc);
}

.section--dark p {
    color: var(--sable);
}

.section--dark .kicker {
    color: var(--sauge-clair);
}

.section--dark .flourish {
    background: linear-gradient(90deg, var(--sauge-clair), var(--terracotta-doux));
}

.section--dark .btn {
    border-color: rgba(255, 253, 246, 0.3);
    color: var(--blanc);
}

.section--dark .btn::before {
    background: var(--blanc);
}

.section--dark .btn:hover {
    color: var(--sauge-nuit);
    border-color: var(--blanc);
}

/* ============================================
   BOUTONS
   ============================================ */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 1rem 2.4rem;
    border: 1.5px solid var(--sauge);
    border-radius: var(--radius-pill);
    color: var(--sauge-profond);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; right: 100%; bottom: 0;
    background: var(--sauge);
    border-radius: var(--radius-pill);
    transition: all 0.5s var(--ease-out);
    z-index: -1;
}

.btn:hover {
    color: var(--blanc);
    border-color: var(--sauge);
}

.btn:hover::before {
    left: 0; right: 0;
}

.btn--warm {
    border-color: var(--terracotta);
    color: var(--terracotta);
}

.btn--warm::before { background: var(--terracotta); }
.btn--warm:hover { border-color: var(--terracotta); }

/* ============================================
   CARTES RÉUTILISABLES
   ============================================ */
.card {
    background: var(--blanc);
    border: 1px solid rgba(234, 207, 180, 0.5);
    padding: 2.2rem;
    border-radius: var(--radius);
    transition: all var(--transition);
    position: relative;
}

.card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 2rem; right: 2rem;
    height: 2px;
    background: linear-gradient(90deg, var(--sauge-clair), var(--terracotta-doux));
    opacity: 0;
    transition: opacity var(--transition);
}

.card:hover {
    box-shadow: 0 8px 40px var(--ombre-douce);
    transform: translateY(-3px);
}

.card:hover::after { opacity: 1; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background-color: var(--encre);
    color: var(--sable);
    padding: 4.5rem 0 2.5rem;
    position: relative;
    overflow: hidden;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer h4 {
    color: var(--creme);
    font-size: 1.15rem;
    font-style: italic;
    margin-bottom: 1rem;
}

.footer p, .footer a {
    font-size: 0.92rem;
    color: var(--terre);
    line-height: 1.8;
}

.footer a:hover { color: var(--creme); }

.footer-bottom {
    border-top: 1px solid rgba(107, 79, 66, 0.15);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--bois);
}

/* ============================================
   BOUTON RETOUR EN HAUT
   ============================================ */
.to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 42px;
    height: 42px;
    background: var(--blanc);
    border: 1px solid var(--sable);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 900;
    border-radius: 50%;
}

.to-top.visible { opacity: 1; visibility: visible; }

.to-top:hover {
    border-color: var(--sauge);
    box-shadow: 0 4px 20px var(--ombre-douce);
    transform: translateY(-2px);
}

.to-top svg {
    width: 16px; height: 16px;
    stroke: var(--bois);
    fill: none;
    stroke-width: 2;
}

.to-top:hover svg { stroke: var(--sauge); }

/* ============================================
   ANIMATIONS
   ============================================ */
.js .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

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

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }
.reveal-delay-4 { transition-delay: 0.48s; }

.js .reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.js .reveal-left.visible { opacity: 1; transform: translateX(0); }

.js .stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.js .stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

.stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.12s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.19s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.26s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.33s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.40s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: 75%;
        max-width: 340px;
        height: 100dvh;
        background: var(--creme);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 2rem 2.5rem;
        gap: 0.5rem;
        visibility: hidden;
        transition: right var(--transition), visibility 0s linear 0.45s;
        box-shadow: -10px 0 40px rgba(42, 30, 32, 0.1);
        z-index: 999;
    }

    .nav-links.open {
        right: 0;
        visibility: visible;
        transition: right var(--transition), visibility 0s;
    }

    .nav-links a {
        font-size: 1.05rem;
        padding: 0.6rem 0;
        border-radius: 0;
    }

    .hamburger { display: block; }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

}

/* ============================================
   ACCESSIBILITÉ — mouvement réduit
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    body { animation: none; }

    .js .reveal,
    .js .reveal-left,
    .js .stagger > * {
        opacity: 1;
        transform: none;
        transition: none;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
