/* ============================================================
   VERIDIAN VAULT — Main CSS
   Design System: The Living Vault / The Editorial Fortress
   ============================================================ */

/* ---- Google Fonts (fallback si CDN WP ne charge pas) ---- */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,200..800;1,6..72,200..800&family=Manrope:wght@200..800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Manrope', sans-serif;
    background-color: #fbfbe2;
    color: #1b1d0e;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* ============================================================
   CSS VARIABLES — Design Tokens
   ============================================================ */
:root {
    /* Primary — Bottle Green */
    --primary:                  #003629;
    --primary-container:        #1b4d3e;
    --primary-fixed:            #baeed9;
    --primary-fixed-dim:        #9ed1bd;
    --on-primary:               #ffffff;
    --on-primary-container:     #8abda9;
    --on-primary-fixed:         #002117;
    --on-primary-fixed-variant: #1d4f40;
    --inverse-primary:          #9ed1bd;

    /* Secondary — Earthy Brown */
    --secondary:                #725a42;
    --secondary-container:      #fedcbe;
    --secondary-fixed:          #fedcbe;
    --secondary-fixed-dim:      #e1c1a4;
    --on-secondary:             #ffffff;
    --on-secondary-container:   #796048;
    --on-secondary-fixed:       #291806;
    --on-secondary-fixed-variant: #59422c;

    /* Tertiary — Dark Brown */
    --tertiary:                 #3d2b13;
    --tertiary-container:       #554127;
    --tertiary-fixed:           #fcdeba;
    --tertiary-fixed-dim:       #dfc29f;
    --on-tertiary:              #ffffff;
    --on-tertiary-container:    #c9ae8c;
    --on-tertiary-fixed:        #281903;
    --on-tertiary-fixed-variant:#574329;

    /* Surface — Cream hierarchy */
    --surface:                  #fbfbe2;
    --surface-dim:              #dbdcc3;
    --surface-bright:           #fbfbe2;
    --surface-container-lowest: #ffffff;
    --surface-container-low:    #f5f5dc;
    --surface-container:        #efefd7;
    --surface-container-high:   #eaead1;
    --surface-container-highest:#e4e4cc;
    --surface-variant:          #e4e4cc;
    --surface-tint:             #376757;
    --inverse-surface:          #303221;
    --inverse-on-surface:       #f2f2d9;
    --on-surface:               #1b1d0e;
    --on-surface-variant:       #404945;
    --on-background:            #1b1d0e;
    --background:               #fbfbe2;

    /* Outline */
    --outline:                  #707974;
    --outline-variant:          #c0c9c3;

    /* Error */
    --error:                    #ba1a1a;
    --error-container:          #ffdad6;
    --on-error:                 #ffffff;
    --on-error-container:       #93000a;

    /* Typography */
    --font-headline: 'Newsreader', serif;
    --font-body:     'Manrope', sans-serif;

    /* Spacing */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  1.5rem;
    --space-lg:  2rem;
    --space-xl:  3rem;
    --space-2xl: 5rem;

    /* Radius */
    --radius-sm:   0.5rem;
    --radius-md:   1rem;
    --radius-lg:   1.5rem;
    --radius-xl:   2rem;
    --radius-2xl:  2.5rem;
    --radius-3xl:  3rem;
    --radius-full: 9999px;

    /* Shadows — warm brown-tinted (never grey) */
    --shadow-sm:  0 4px 12px rgba(75, 54, 33, 0.04);
    --shadow-md:  0 20px 40px rgba(75, 54, 33, 0.06);
    --shadow-lg:  0 40px 80px rgba(75, 54, 33, 0.08);
    --shadow-xl:  0 40px 100px rgba(0, 54, 41, 0.15);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.font-headline  { font-family: var(--font-headline); }
.font-body      { font-family: var(--font-body); }
.serif-italic   { font-family: var(--font-headline); font-style: italic; }

h1, h2, h3, h4 { font-family: var(--font-headline); color: var(--primary); letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 700; line-height: 1.1; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem);   font-weight: 700; line-height: 1.2; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }
p  { color: var(--secondary); line-height: 1.7; letter-spacing: 0.01em; }

/* ============================================================
   ORGANIC BLOB SHAPES
   ============================================================ */
.organic-blob-1 { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
.organic-blob-2 { border-radius: 30% 70% 70% 30% / 50% 60% 40% 50%; }
.organic-blob-3 { border-radius: 50% 50% 20% 80% / 25% 80% 20% 75%; }
.organic-blob   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }

/* ============================================================
   ASYMMETRIC CARDS — The No-Line Rule
   ============================================================ */
.asymmetric-card-1 { border-radius: 3rem 1rem 3rem 3rem; }
.asymmetric-card-2 { border-radius: 1rem 3rem 1rem 3rem; }
.asymmetric-card-3 { border-radius: 3rem 3rem 1rem 3rem; }
.asymmetric-card   { border-radius: 2.5rem 1rem 2.5rem 2.5rem; }
.asymmetric-pill   { border-radius: 1.5rem 0.5rem 1.5rem 1.5rem; }

/* ============================================================
   GLASS HEADER
   ============================================================ */
.glass-header {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: rgba(251, 251, 226, 0.80);
}

/* ============================================================
   SIGNATURE GRADIENT
   ============================================================ */
.signature-gradient {
    background: linear-gradient(135deg, #003629 0%, #1b4d3e 100%);
}

/* ============================================================
   EDITORIAL SHADOW
   ============================================================ */
.editorial-shadow { box-shadow: var(--shadow-md); }

/* ============================================================
   MATERIAL SYMBOLS
   ============================================================ */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    line-height: 1;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-container);
    color: var(--on-primary);
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1.0625rem;
    box-shadow: var(--shadow-lg);
    transition: background 0.3s, transform 0.2s;
}
.btn-primary:hover { background: var(--primary); transform: translateY(-1px); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid var(--outline-variant);
    color: var(--secondary);
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1.0625rem;
    transition: background 0.3s;
}
.btn-secondary:hover { background: var(--surface-container); }

.btn-gradient {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #003629 0%, #1b4d3e 100%);
    color: #ffffff;
    padding: 1.25rem 2.5rem;
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-size: 1.125rem;
    box-shadow: 0 20px 40px rgba(0, 54, 41, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
}
.btn-gradient:hover { transform: scale(1.02); box-shadow: 0 30px 60px rgba(0, 54, 41, 0.25); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--surface-container-lowest);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s;
}
.card:hover { box-shadow: var(--shadow-lg); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(251, 251, 226, 0.80);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(75, 54, 33, 0.06);
}
.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 88rem;
    margin: 0 auto;
}
.site-logo {
    font-family: var(--font-headline);
    font-size: 1.5rem;
    font-weight: 700;
    font-style: italic;
    color: var(--primary);
    display: flex;
    align-items: center;
}
.site-logo img,
.site-logo .custom-logo {
    height: 48px;
    width: auto;
    max-width: 180px;
    display: block;
    object-fit: contain;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-family: var(--font-headline);
    font-size: 1.125rem;
}
.nav-links a { color: var(--secondary); transition: color 0.3s; }
.nav-links a:hover,
.nav-links a.active { color: var(--primary-container); }
.nav-links a.active { font-weight: 600; border-bottom: 2px solid var(--primary-container); }
.nav-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--surface-container);
    border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
    margin-top: 5rem;
}
.footer-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 4rem 3rem;
    max-width: 88rem;
    margin: 0 auto;
    gap: 2rem;
}
@media (min-width: 768px) {
    .footer-inner { flex-direction: row; }
}
.footer-brand-name {
    font-family: var(--font-headline);
    font-style: italic;
    color: var(--primary-container);
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}
.footer-copy { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--secondary); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; }
.footer-links a {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary);
    opacity: 0.8;
    transition: opacity 0.2s, text-decoration-color 0.2s;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 4px;
}
.footer-links a:hover { opacity: 1; text-decoration-color: var(--primary-container); }

/* ============================================================
   SECTIONS
   ============================================================ */
.section-container {
    max-width: 88rem;
    margin: 0 auto;
    padding: 0 2rem;
}
.section-tag {
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: var(--radius-full);
    background: var(--primary-fixed);
    color: var(--on-primary-fixed-variant);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

/* ============================================================
   TOGGLE (checkbox switch)
   ============================================================ */
.toggle {
    position: relative;
    width: 2.5rem;
    height: 1.25rem;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--surface-variant);
    border-radius: var(--radius-full);
    transition: background 0.3s;
    cursor: pointer;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    background: white;
    border-radius: 50%;
    top: 0.125rem;
    left: 0.125rem;
    transition: transform 0.3s;
}
.toggle input:checked + .toggle-slider { background: var(--primary-container); }
.toggle input:checked + .toggle-slider::before { transform: translateX(1.25rem); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes pulse-slow {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}
.animate-pulse { animation: pulse-slow 2s ease-in-out infinite; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}
.animate-float { animation: float 4s ease-in-out infinite; }

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-mobile-btn { display: block; }
    .section-container { padding: 0 1rem; }
}

/* ============================================================
   ACCESSIBILITE — Skip to content
   ============================================================ */
.skip-to-content {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 9999;
}
.skip-to-content:focus {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    padding: 0.75rem 2rem;
    background: var(--primary);
    color: var(--on-primary);
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: var(--radius-xl);
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    outline: 3px solid var(--primary-fixed);
    outline-offset: 2px;
}

/* ============================================================
   MOBILE MENU — Transitions d'animation
   ============================================================ */
#mobile-menu {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease;
}
#mobile-menu.is-open {
    max-height: 320px;
    opacity: 1;
}

/* ============================================================
   WORDPRESS CORE OVERRIDES
   ============================================================ */
.wp-block-image img { border-radius: var(--radius-md); }
.aligncenter { display: block; margin: 0 auto; }
