/* ========================================================================
   STUDIO MÉRIDIEN — Custom Styles
   Premium minimal design system
   ======================================================================== */

:root {
    --canvas: #FAFAFA;
    --ink: #1A1A1A;
    --sand: #C9B79C;
    --line: #E5E5E5;
    --muted: #6B6B6B;
    --ease: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { -webkit-font-smoothing: antialiased; }

html { scroll-behavior: smooth; }

body {
    font-feature-settings: "ss01", "cv11";
    cursor: none;
}

/* Hide custom cursor on touch devices */
@media (hover: none) {
    body { cursor: auto; }
    .cursor-dot, .cursor-ring { display: none; }
}

::selection {
    background: var(--ink);
    color: var(--canvas);
}

/* ============================  CURSOR  ============================ */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    will-change: transform;
}
.cursor-dot {
    width: 6px; height: 6px;
    background: var(--ink);
    border-radius: 50%;
    transition: width .25s var(--ease), height .25s var(--ease), background .25s var(--ease);
}
.cursor-ring {
    width: 36px; height: 36px;
    border: 1px solid var(--ink);
    border-radius: 50%;
    transition: width .35s var(--ease), height .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}
.cursor-ring.is-hover {
    width: 64px; height: 64px;
    background: rgba(26, 26, 26, 0.06);
    border-color: transparent;
}
.cursor-dot.is-hover {
    width: 0; height: 0;
}
.cursor-ring.is-dark { border-color: var(--canvas); }
.cursor-dot.is-dark { background: var(--canvas); }

/* ============================  NAVIGATION  ============================ */
.nav {
    transition: top .4s var(--ease);
}
.nav-inner {
    background: rgba(250, 250, 250, 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(26, 26, 26, 0.06);
    box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 8px 30px rgba(26,26,26,0.04);
    transition: background .4s var(--ease), border-color .4s var(--ease);
}
.nav.is-scrolled .nav-inner {
    background: rgba(250, 250, 250, 0.85);
    border-color: rgba(26, 26, 26, 0.1);
}
.logo-mark {
    display: inline-block;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--ink);
    position: relative;
    overflow: hidden;
}
.logo-mark::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: var(--canvas);
    transition: transform .5s var(--ease);
}
.logo:hover .logo-mark::after { transform: scale(0.5); }

.nav-link {
    position: relative;
    transition: color .3s var(--ease);
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 0; bottom: -4px;
    width: 100%; height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .5s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.cta-pill {
    background: var(--ink);
    color: var(--canvas);
    transition: transform .4s var(--ease), background .4s var(--ease), letter-spacing .4s var(--ease);
}
.cta-pill:hover {
    transform: scale(1.04);
    background: #000;
    letter-spacing: 0.01em;
}

.burger {
    width: 28px; height: 28px;
    display: flex; flex-direction: column;
    justify-content: center; gap: 5px;
}
.burger span {
    display: block; height: 1px; width: 100%;
    background: var(--ink);
}

/* ============================  HERO  ============================ */
.hero { position: relative; }
.hero::before {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 50vw; height: 50vw;
    max-width: 700px; max-height: 700px;
    background: radial-gradient(circle at center, rgba(201, 183, 156, 0.18), transparent 65%);
    pointer-events: none;
    z-index: -1;
}

.hero-eyebrow .dash {
    display: inline-block;
    width: 32px; height: 1px;
    background: var(--muted);
}

h1 .line-wrap {
    display: block;
    overflow: hidden;
    line-height: 0.95;
}
h1 .line {
    display: inline-block;
    transform: translateY(110%);
    will-change: transform;
}

.btn-primary {
    background: var(--ink);
    color: var(--canvas);
    transition: transform .4s var(--ease), background .4s var(--ease);
    position: relative;
    overflow: hidden;
}
.btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--sand);
    transform: translateY(101%);
    transition: transform .5s var(--ease);
    z-index: 0;
}
.btn-primary > * { position: relative; z-index: 1; }
.btn-primary:hover { transform: scale(1.03); color: var(--ink); }
.btn-primary:hover::before { transform: translateY(0); }

.arrow-circle {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--canvas);
    color: var(--ink);
    transition: transform .4s var(--ease);
}
.btn-primary:hover .arrow-circle { transform: rotate(45deg); }
.arrow-circle.light { background: var(--canvas); color: var(--ink); }

.btn-ghost {
    color: var(--ink);
    border: 1px solid rgba(26, 26, 26, 0.15);
    transition: border-color .4s var(--ease), background .4s var(--ease), transform .4s var(--ease);
}
.btn-ghost:hover {
    border-color: var(--ink);
    background: rgba(26, 26, 26, 0.04);
    transform: scale(1.03);
}

/* Hero visual */
.hero-visual figure { position: relative; }
.hero-visual figure::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(26,26,26,0.05));
    pointer-events: none;
}
.hero-visual img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
}
.hero-visual figure:hover img { transform: scale(1.04); }

.kpi {
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(255,255,255,0.5);
    transition: border-color .4s var(--ease), transform .4s var(--ease);
}
.kpi:hover {
    border-color: var(--ink);
    transform: translateY(-4px);
}
.kpi-num {
    display: block;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
}
.kpi-num sub {
    font-size: 0.5em;
    font-weight: 400;
    color: var(--muted);
    bottom: 0.4em;
}
.kpi-label {
    display: block;
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.4;
}

.scroll-indicator .scroll-line {
    display: inline-block;
    width: 60px; height: 1px;
    background: var(--ink);
    position: relative;
    overflow: hidden;
}
.scroll-indicator .scroll-line::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--canvas);
    animation: scrollLine 2.4s var(--ease) infinite;
}
@keyframes scrollLine {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

/* ============================  MARQUEE  ============================ */
.marquee { overflow: hidden; }
.marquee-track {
    font-family: 'Syne', sans-serif;
    font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    letter-spacing: -0.01em;
    animation: marquee 30s linear infinite;
}
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ============================  SECTIONS  ============================ */
.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
}
.section-tag.light { color: rgba(250, 250, 250, 0.5); }

/* Scroll-reveal generic */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================  CARDS  ============================ */
.card {
    position: relative;
    background: var(--canvas);
    padding: 3rem 2.5rem;
    transition: background .5s var(--ease), transform .5s var(--ease), box-shadow .5s var(--ease);
    overflow: hidden;
    isolation: isolate;
}
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--canvas), #F2EEE8);
    opacity: 0;
    transition: opacity .6s var(--ease);
    z-index: -1;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px -20px rgba(26, 26, 26, 0.15);
}
.card:hover::before { opacity: 1; }

.card-num {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.08em;
}
.card-icon {
    margin-top: 3.5rem;
    color: var(--ink);
    transition: transform .6s var(--ease), color .4s var(--ease);
}
.card:hover .card-icon {
    transform: rotate(-12deg) scale(1.1);
    color: var(--sand);
}
.card-title {
    margin-top: 2rem;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.card-text {
    margin-top: 1rem;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.95rem;
}
.card-list {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.card-list li {
    font-size: 0.875rem;
    color: var(--ink);
    padding-left: 1.25rem;
    position: relative;
}
.card-list li::before {
    content: "";
    position: absolute;
    left: 0; top: 0.65em;
    width: 8px; height: 1px;
    background: var(--sand);
}
.card-arrow {
    position: absolute;
    top: 2.5rem; right: 2.5rem;
    width: 36px; height: 36px;
    display: flex;
    align-items: center; justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    opacity: 0;
    transform: translate(-8px, 8px) rotate(-45deg);
    transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .4s var(--ease);
}
.card:hover .card-arrow {
    opacity: 1;
    transform: translate(0,0) rotate(0deg);
    border-color: var(--ink);
}

/* ============================  APPROCHE  ============================ */
.approche-title .word {
    display: inline-block;
    margin-right: 0.25em;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.approche-title.is-visible .word {
    opacity: 1;
    transform: translateY(0);
}
.approche-title.is-visible .word:nth-child(1) { transition-delay: .05s; }
.approche-title.is-visible .word:nth-child(2) { transition-delay: .10s; }
.approche-title.is-visible .word:nth-child(3) { transition-delay: .15s; }
.approche-title.is-visible .word:nth-child(4) { transition-delay: .20s; }
.approche-title.is-visible .word:nth-child(5) { transition-delay: .25s; }
.approche-title.is-visible .word:nth-child(6) { transition-delay: .30s; }
.approche-title.is-visible .word:nth-child(7) { transition-delay: .35s; }
.approche-title.is-visible .word:nth-child(8) { transition-delay: .40s; }
.approche-title.is-visible .word:nth-child(9) { transition-delay: .45s; }
.approche-title.is-visible .word:nth-child(10) { transition-delay: .50s; }
.approche-title.is-visible .word:nth-child(11) { transition-delay: .55s; }

.approche-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
}
.approche-img:hover img { transform: scale(1.03); }

.approche-steps {
    list-style: none;
    padding: 0; margin: 0;
}
.approche-steps li {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1.5rem;
    padding: 2rem 0;
    border-top: 1px solid var(--line);
    transition: padding .4s var(--ease);
}
.approche-steps li:last-child { border-bottom: 1px solid var(--line); }
.approche-steps li:hover { padding-left: 1rem; }
.step-num {
    font-family: 'Syne', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--muted);
    letter-spacing: 0.05em;
    padding-top: 0.25rem;
}
.approche-steps h4 {
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}
.approche-steps p {
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ============================  CONTACT / FOOTER  ============================ */
.contact-section {
    border-radius: 24px 24px 0 0;
}
.contact-section::before {
    content: "";
    position: absolute;
    top: -1px; right: 10%;
    width: 200px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--sand), transparent);
}

.email-display {
    position: relative;
    display: inline-block;
}
.email-display::after {
    content: "";
    position: absolute;
    left: 0; bottom: -8px;
    width: 100%; height: 1px;
    background: rgba(250, 250, 250, 0.2);
    transform-origin: right;
    transform: scaleX(1);
    transition: transform .8s var(--ease);
}
.email-display:hover::after {
    transform-origin: left;
    transform: scaleX(1);
    background: var(--sand);
}

.dot-live {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
    70% { box-shadow: 0 0 0 12px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* Form */
.contact-form .form-row {
    position: relative;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(250, 250, 250, 0.18);
    padding-bottom: 0.75rem;
    transition: border-color .4s var(--ease);
}
.contact-form .form-row:focus-within {
    border-color: var(--sand);
}
.contact-form label {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(250, 250, 250, 0.5);
    margin-bottom: 0.5rem;
}
.contact-form input,
.contact-form textarea {
    background: transparent;
    border: none;
    color: var(--canvas);
    font-family: inherit;
    font-size: 1rem;
    padding: 0.25rem 0;
    outline: none;
    resize: vertical;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(250, 250, 250, 0.3);
}

.form-submit {
    background: transparent;
    color: var(--canvas);
    border: 1px solid rgba(250, 250, 250, 0.25);
    padding: 1rem 1.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease), color .4s var(--ease);
}
.form-submit:hover {
    background: var(--canvas);
    color: var(--ink);
    border-color: var(--canvas);
    transform: scale(1.03);
}
.form-submit:hover .arrow-circle { transform: rotate(45deg); background: var(--ink); color: var(--canvas); }

.form-feedback {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--sand);
    min-height: 1.25rem;
}

/* ============================  RESPONSIVE  ============================ */
@media (max-width: 768px) {
    .card { padding: 2rem 1.75rem; }
    .card-arrow { top: 1.75rem; right: 1.75rem; }
    .nav-inner { padding: 0.625rem 1rem; }
    .approche-steps li { grid-template-columns: 40px 1fr; gap: 1rem; padding: 1.5rem 0; }
}

/* ============================  REDUCED MOTION  ============================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    h1 .line { transform: none; }
    .reveal { opacity: 1; transform: none; }
}
