/**
 * Evoque Theme — Main Stylesheet
 * Glassmorphisme · Quiet Luxury · 2026
 * Design: Vianney André
 */

/* ============================================================
   0. CSS Custom Properties
   ============================================================ */

:root {
    --evoque-teal-deep:    #3D5B5E;
    --evoque-teal:         #4D7C7C;
    --evoque-brass:        #B8906A;
    --evoque-sand:         #BBB29D;
    --evoque-off-black:    #3D3C39;
    --evoque-warm-white:   #F8F7F5;

    --glass-bg-light:      rgba(248, 247, 245, 0.06);
    --glass-bg-mid:        rgba(61,  91,  94,  0.08);
    --glass-bg-dark:       rgba(61,  60,  57,  0.72);
    --glass-border-light:  rgba(184, 144, 106, 0.18);
    --glass-border-dark:   rgba(248, 247, 245, 0.08);
    --glass-blur:          blur(18px);
    --glass-blur-heavy:    blur(28px);

    --transition-smooth:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-snappy:   cubic-bezier(0.22, 1, 0.36, 1);

    --header-h:            72px;
    --section-pad-v:       clamp(4rem, 8vw, 7rem);
    --container-max:       1200px;
    --container-pad:       clamp(1.25rem, 4vw, 3rem);
}

/* ============================================================
   1. Base Reset
   ============================================================ */

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

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

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--evoque-warm-white);
    color: var(--evoque-off-black);
    overflow-x: hidden;
}

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

p { margin-top: 0; margin-bottom: 0; }

a { transition: color 0.25s var(--transition-smooth); }

/* ============================================================
   2. Skip Link & Accessibility
   ============================================================ */

.skip-link,
[href="#wp--skip-link--target"] {
    position: absolute;
    top: -999px;
    left: 1rem;
    z-index: 9999;
    padding: 0.75em 1.5em;
    background: var(--evoque-brass);
    color: var(--evoque-warm-white);
    font-family: var(--wp--preset--font-family--dm-sans, sans-serif);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 2px;
    transition: top 0s;
}

.skip-link:focus,
[href="#wp--skip-link--target"]:focus {
    top: 1rem;
}

:focus-visible {
    outline: 2px solid var(--evoque-brass);
    outline-offset: 3px;
    border-radius: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================================
   3. Grain Texture Overlay
   ============================================================ */

.has-grain {
    position: relative;
    isolation: isolate;
}

.has-grain::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23g)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 400px 400px;
}

/* Content must be above grain */
.has-grain > * { position: relative; z-index: 2; }
.has-grain > .wp-block-group { z-index: 2; }

/* ============================================================
   4. Header
   ============================================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    transition:
        background 0.45s var(--transition-smooth),
        backdrop-filter 0.45s var(--transition-smooth),
        border-color 0.45s var(--transition-smooth),
        box-shadow 0.45s var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
    background: rgba(248, 247, 245, 0.88);
    backdrop-filter: var(--glass-blur-heavy);
    -webkit-backdrop-filter: var(--glass-blur-heavy);
    border-bottom-color: rgba(61, 91, 94, 0.10);
    box-shadow: 0 2px 32px rgba(61, 60, 57, 0.06);
}

/* On dark sections, white header */
.site-header.is-on-dark:not(.is-scrolled) {
    background: transparent;
}

.header-inner {
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
    padding-block: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Site logo in header */
.site-header .wp-block-site-logo img {
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    transition: opacity 0.3s;
}

.site-header:not(.is-scrolled) .wp-block-site-logo img {
    filter: brightness(0) invert(1);
}

/* Navigation */
.site-nav .wp-block-navigation__container {
    gap: 2.5rem;
}

.site-nav .wp-block-navigation-item__content {
    font-family: var(--wp--preset--font-family--dm-sans, sans-serif);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--evoque-off-black);
    text-decoration: none;
    position: relative;
    transition: color 0.25s var(--transition-smooth);
}

.site-header:not(.is-scrolled) .site-nav .wp-block-navigation-item__content {
    color: rgba(248, 247, 245, 0.80);
}

.site-nav .wp-block-navigation-item__content::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--evoque-brass);
    transition: width 0.3s var(--transition-snappy);
}

.site-nav .wp-block-navigation-item:hover .wp-block-navigation-item__content::after,
.site-nav .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content::after {
    width: 100%;
}

.site-nav .wp-block-navigation-item:hover .wp-block-navigation-item__content {
    color: var(--evoque-brass);
}

/* Contact CTA in nav */
.site-nav .nav-cta .wp-block-navigation-item__content {
    color: var(--evoque-brass);
}

/* Hamburger — hidden on desktop */
.hamburger-wrap {
    display: none;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.hamburger .bar {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--evoque-warm-white);
    transition: all 0.35s var(--transition-snappy);
    transform-origin: center;
}

.site-header.is-scrolled .hamburger .bar {
    background: var(--evoque-off-black);
}

.hamburger[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.hamburger[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile menu drawer */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--glass-bg-dark);
    backdrop-filter: var(--glass-blur-heavy);
    -webkit-backdrop-filter: var(--glass-blur-heavy);
    z-index: 99;
    padding-top: calc(var(--header-h) + 2rem);
    transform: translateX(100%);
    transition: transform 0.45s var(--transition-snappy);
}

.mobile-menu.is-open {
    transform: translateX(0);
}

.mobile-menu .mobile-nav .wp-block-navigation-item__content {
    font-family: var(--wp--preset--font-family--cormorant, serif);
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 400;
    color: var(--evoque-warm-white);
    letter-spacing: -0.01em;
    line-height: 1.1;
    text-decoration: none;
    display: block;
    transition: color 0.2s;
}

.mobile-menu .mobile-nav .wp-block-navigation-item:hover .wp-block-navigation-item__content {
    color: var(--evoque-brass);
}

/* ============================================================
   5. Hero Section
   ============================================================ */

.evoque-hero {
    min-height: 100svh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Gradient de fond animé */
.hero-bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        #2A2927 0%,
        #3D3C39 40%,
        #3D5B5E 80%,
        #2a3f42 100%
    );
    background-size: 200% 200%;
    animation: gradientShift 12s ease infinite alternate;
    z-index: 0;
}

@keyframes gradientShift {
    0%   { background-position: 0% 0%;   }
    50%  { background-position: 60% 40%; }
    100% { background-position: 100% 100%; }
}

/* Accents géométriques en verre */
.hero-glass-accent {
    position: absolute;
    width: clamp(300px, 40vw, 600px);
    height: clamp(300px, 40vw, 600px);
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(77, 124, 124, 0.15) 0%, transparent 70%);
    top: -10%;
    right: -5%;
    filter: blur(60px);
    z-index: 1;
    pointer-events: none;
}

.hero-glass-accent--2 {
    width: clamp(200px, 30vw, 450px);
    height: clamp(200px, 30vw, 450px);
    background: radial-gradient(ellipse at center, rgba(184, 144, 106, 0.10) 0%, transparent 70%);
    top: auto;
    right: auto;
    bottom: 5%;
    left: 10%;
    filter: blur(80px);
}

.hero-inner {
    width: 100%;
    position: relative;
    z-index: 3;
}

.hero-content {
    max-width: min(900px, 90vw);
}

.hero-title {
    margin: 0;
}

.hero-title em {
    font-style: italic;
    display: inline-block;
    position: relative;
}

/* Ligne décorative sous le titre */
.hero-divider {
    width: clamp(40px, 8vw, 80px);
    height: 1px;
    background: linear-gradient(90deg, var(--evoque-brass), transparent);
    margin-top: 2rem;
}

/* Stats */
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(248, 247, 245, 0.06);
}

.stat-item { flex-shrink: 0; }

.stat-divider {
    width: 1px;
    height: 2.5rem;
    background: rgba(184, 144, 106, 0.20);
    align-self: center;
}

.hero-scroll-hint {
    margin: 0;
    animation: floatUpDown 2.5s ease-in-out infinite;
}

@keyframes floatUpDown {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(4px); }
}

/* ============================================================
   6. Glass Service Cards
   ============================================================ */

.evoque-services {
    background: var(--evoque-warm-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    background: var(--evoque-warm-white);
    border: 1px solid rgba(61, 91, 94, 0.10);
    border-radius: 2px;
    padding: clamp(2rem, 4vw, 3rem);
    position: relative;
    overflow: hidden;
    transition:
        transform 0.4s var(--transition-snappy),
        box-shadow 0.4s var(--transition-snappy),
        border-color 0.4s var(--transition-snappy),
        background 0.4s var(--transition-smooth);
    cursor: default;
}

/* Glass effect on hover */
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(61, 91, 94, 0.04) 0%,
        rgba(77, 124, 124, 0.02) 50%,
        rgba(184, 144, 106, 0.03) 100%
    );
    opacity: 0;
    transition: opacity 0.4s var(--transition-smooth);
    z-index: 0;
}

.service-card:hover::before { opacity: 1; }

.service-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 8px 32px rgba(61, 91, 94, 0.10),
        0 2px 8px rgba(61, 60, 57, 0.04);
    border-color: rgba(184, 144, 106, 0.25);
}

/* Brass accent line at top */
.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--evoque-brass), transparent);
    transition: width 0.5s var(--transition-snappy);
}

.service-card:hover::after {
    width: 100%;
}

.service-card > * { position: relative; z-index: 1; }

/* ============================================================
   7. Section Header (shared)
   ============================================================ */

.section-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 3.5rem;
}

.section-eyebrow {
    margin: 0 0 0.75rem !important;
}

/* ============================================================
   8. About Strip
   ============================================================ */

.evoque-about {
    position: relative;
    overflow: hidden;
}

/* Glassmorphisme sur la colonne droite */
.about-col-right {
    position: relative;
}

.about-accent-line {
    width: 2px;
    height: clamp(40px, 6vw, 80px);
    background: linear-gradient(180deg, var(--evoque-brass), transparent);
    margin-bottom: 2rem;
}

.about-statement {
    position: relative;
}

.about-statement::before {
    content: '\201C';
    position: absolute;
    left: -0.3em;
    top: -0.2em;
    font-size: 4em;
    line-height: 1;
    color: rgba(184, 144, 106, 0.15);
    font-family: var(--wp--preset--font-family--cormorant, serif);
    pointer-events: none;
}

/* Signature avatar */
.signature-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--evoque-teal-deep), var(--evoque-teal));
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.signature-avatar::after {
    content: 'VA';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--wp--preset--font-family--cormorant, serif);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--evoque-warm-white);
    letter-spacing: 0.05em;
    display: grid;
    place-items: center;
}

.about-value-item {
    display: flex;
    align-items: baseline;
    gap: 0;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(248, 247, 245, 0.06);
}

/* ============================================================
   9. References Section
   ============================================================ */

.evoque-references {
    position: relative;
}

.references-top-line {
    position: absolute;
    top: 0;
    left: var(--container-pad);
    right: var(--container-pad);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(61, 91, 94, 0.15), transparent);
}

.references-left {
    flex: 1;
    min-width: min(280px, 100%);
    max-width: 460px;
}

.references-right {
    flex: 1;
    min-width: min(280px, 100%);
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Secteur tags */
.sectors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sector-tag {
    padding: 0.45em 1em;
    background: rgba(61, 91, 94, 0.07);
    border: 1px solid rgba(61, 91, 94, 0.12);
    border-radius: 1px;
    transition: all 0.25s var(--transition-smooth);
}

.sector-tag:hover {
    background: rgba(61, 91, 94, 0.12);
    border-color: rgba(184, 144, 106, 0.25);
}

.sector-tag p {
    white-space: nowrap;
}

/* Témoignage */
.reference-testimonial {
    padding: clamp(1.5rem, 3vw, 2rem);
    background: rgba(61, 91, 94, 0.05);
    border: 1px solid rgba(61, 91, 94, 0.10);
    border-left: 2px solid rgba(184, 144, 106, 0.35);
    border-radius: 0 2px 2px 0;
    position: relative;
}

/* ============================================================
   10. Contact CTA
   ============================================================ */

.evoque-contact {
    position: relative;
    overflow: hidden;
}

.contact-bg-accent {
    position: absolute;
    top: -200px;
    right: -100px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(77, 124, 124, 0.08) 0%, transparent 65%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
}

.contact-inner { position: relative; z-index: 2; }

.contact-headline {
    max-width: 18ch;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2.5rem;
}

.contact-divider-vert {
    width: 1px;
    height: 3rem;
    background: rgba(184, 144, 106, 0.20);
}

/* Email link */
.contact-email a {
    transition: opacity 0.25s;
}
.contact-email a:hover {
    opacity: 0.75;
}

/* ============================================================
   11. Footer
   ============================================================ */

.site-footer {
    position: relative;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3.5rem;
}

.footer-left {
    flex: 1;
    min-width: min(220px, 100%);
}

.footer-right {
    display: flex;
    flex-wrap: wrap;
    gap: 3.5rem;
    justify-content: flex-end;
}

.footer-logo img {
    height: 36px;
    width: auto;
    opacity: 0.85;
    filter: brightness(0) invert(1);
}

.site-footer .footer-nav .wp-block-navigation-item__content {
    color: var(--evoque-sand);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer .footer-nav .wp-block-navigation-item__content:hover {
    color: var(--evoque-brass);
}

.site-footer .footer-nav--legal .wp-block-navigation-item__content {
    font-size: 0.75rem;
    color: rgba(187, 178, 157, 0.55);
}

/* ============================================================
   12. Buttons (global)
   ============================================================ */

.wp-block-button__link.wp-element-button,
.wp-element-button {
    transition:
        background 0.3s var(--transition-smooth),
        color 0.3s var(--transition-smooth),
        transform 0.2s var(--transition-snappy),
        box-shadow 0.3s var(--transition-smooth);
    text-decoration: none !important;
    border-radius: 2px;
}

.wp-block-button__link.wp-element-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(184, 144, 106, 0.25);
}

/* Ghost button */
.btn-hero-ghost .wp-block-button__link,
.is-style-outline .wp-block-button__link {
    background: transparent !important;
}

/* ============================================================
   13. Page content typography
   ============================================================ */

.article-body,
.page-content .wp-block-post-content {
    --flow-space: 1.5em;
}

.article-body h2,
.article-body h3,
.article-body h4 {
    margin-top: 2.5em;
    margin-bottom: 0.75em;
}

.article-body p {
    max-width: 68ch;
    margin-bottom: 1.25em;
    line-height: 1.8;
}

/* ============================================================
   14. Fade-in Animations (IntersectionObserver)
   ============================================================ */

.fade-in,
.fade-in-up {
    opacity: 0;
    transition:
        opacity 0.75s var(--transition-smooth),
        transform 0.75s var(--transition-smooth);
}

.fade-in-up {
    transform: translateY(28px);
}

.fade-in.is-visible,
.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.services-grid .service-card:nth-child(1) { transition-delay: 0.05s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.15s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.25s; }

.hero-stats .stat-item:nth-child(odd)  { transition-delay: 0.1s; }
.hero-stats .stat-item:nth-child(even) { transition-delay: 0.2s; }

/* ============================================================
   15. Archive & Blog
   ============================================================ */

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.archive-card {
    border-bottom: 1px solid rgba(61, 91, 94, 0.10);
    padding-bottom: 2rem;
    transition: border-color 0.3s;
}

.archive-card:hover {
    border-bottom-color: rgba(184, 144, 106, 0.3);
}

.archive-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(61, 91, 94, 0.15);
    border-radius: 2px;
    font-size: 0.8rem;
    font-family: var(--wp--preset--font-family--dm-sans, sans-serif);
    color: var(--evoque-off-black);
    text-decoration: none;
    transition: all 0.25s;
}

.archive-pagination .page-numbers:hover,
.archive-pagination .page-numbers.current {
    background: var(--evoque-teal-deep);
    border-color: var(--evoque-teal-deep);
    color: var(--evoque-warm-white);
}

/* ============================================================
   16. Responsive
   ============================================================ */

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-columns .wp-block-column {
        flex-basis: 100% !important;
    }

    .references-inner {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    /* Header */
    .site-nav { display: none; }
    .hamburger-wrap { display: flex; }
    .mobile-menu { display: block; }

    /* Hero */
    .hero-stats { gap: 1.5rem; }
    .stat-divider { display: none; }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* About */
    .about-columns {
        flex-direction: column !important;
    }

    /* Contact */
    .contact-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    .contact-divider-vert { display: none; }

    /* Footer */
    .footer-right { justify-content: flex-start; }

    /* Section header */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-desc { max-width: 100% !important; }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2.8rem, 12vw, 4rem) !important;
    }

    .hero-stats { display: none; }
}

/* ============================================================
   17. Block Editor Overrides
   ============================================================ */

.wp-site-blocks {
    padding-top: var(--header-h);
}

/* Ensure full-width sections break out of content constraints */
.evoque-hero,
.evoque-contact {
    max-width: 100% !important;
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
}

/* Separator style */
.wp-block-separator.is-style-wide {
    border-color: rgba(61, 91, 94, 0.12);
}

/* ============================================================
   18. Utility
   ============================================================ */

.visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--evoque-warm-white); }
::-webkit-scrollbar-thumb {
    background: rgba(61, 91, 94, 0.25);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(61, 91, 94, 0.45);
}

/* Selection */
::selection {
    background: rgba(184, 144, 106, 0.25);
    color: var(--evoque-off-black);
}
