/*
Theme Name: VETCYT
Theme URI: https://www.vetcyt.com
Author: Seesmile
Author URI: https://seesmile.fr
Description: Thème custom pour VETCYT — site vitrine SEO de formations vétérinaires en cytologie, hématologie et dermatologie. Construit pour la performance, le SEO multilingue (FR/EN) et l'autonomie éditoriale via Gutenberg + Meta Box.
Version: 1.7.6
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: Propriétaire — SARL VETCYT
Text Domain: vetcyt
Tags: custom, healthcare, education, multilingual
*/

/* ============================================
   1. Design tokens (variables CSS)
   ============================================ */

:root {
    /* Couleurs — marque VETCYT */
    --vc-marine: #1a2b4a;
    --vc-marine-deep: #0A1428;
    --vc-marine-dark: #0e1a30;
    --vc-marine-light: #2a4a7f;
    --vc-framboise: #D4537E;
    --vc-framboise-bright: #E91E63;
    --vc-framboise-dark: #993556;
    --vc-framboise-light: #FBEAF0;
    /* Variante boutons : framboise assombri pour passer le contraste AA (>=4.5:1 sur blanc).
       N'affecte que le fond des boutons primary, pas l'identité framboise ailleurs. */
    --vc-framboise-btn: #C13A66;
    --vc-rose-pale: #F4C0D1;
    --vc-rose-cellule: #72243E;
    --vc-violet-cellule: #8B3A8C;

    /* Glow effects (signature design NotebookLM) */
    --vc-glow-framboise: 0 0 30px rgba(212, 83, 126, 0.45);
    --vc-glow-framboise-strong: 0 0 50px rgba(212, 83, 126, 0.7), 0 0 100px rgba(212, 83, 126, 0.3);
    --vc-glow-soft: 0 0 60px rgba(212, 83, 126, 0.25);
    --vc-glow-bulle: 0 0 0 2px var(--vc-framboise), 0 0 25px rgba(212, 83, 126, 0.5), 0 8px 24px rgba(212, 83, 126, 0.2);

    /* Neutres */
    --vc-creme: #FBF6EE;
    --vc-creme-fonce: #F4F1EA;
    --vc-blanc: #ffffff;
    --vc-texte: #1a2b4a;
    --vc-texte-secondaire: #44443f;
    --vc-texte-muet: #5F5E5A;
    --vc-bordure: #E8E5DD;

    /* Sémantique */
    --vc-succes: #3B6D11;
    --vc-erreur: #A32D2D;
    --vc-info: #185FA5;

    /* Typographie */
    --vc-font-serif: "Fraunces", "DM Serif Display", Georgia, serif;
    --vc-font-sans: "Inter", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* Espacements (modulaire base 4px) */
    --vc-space-1: 0.25rem;
    --vc-space-2: 0.5rem;
    --vc-space-3: 0.75rem;
    --vc-space-4: 1rem;
    --vc-space-5: 1.25rem;
    --vc-space-6: 1.5rem;
    --vc-space-8: 2rem;
    --vc-space-10: 2.5rem;
    --vc-space-12: 3rem;
    --vc-space-16: 4rem;
    --vc-space-20: 5rem;
    --vc-space-24: 6rem;

    /* Layout */
    --vc-container-max: 1360px;
    --vc-container-narrow: 880px;

    /* Bordures et rayons */
    --vc-radius-sm: 6px;
    --vc-radius-md: 10px;
    --vc-radius-lg: 16px;
    --vc-radius-pill: 999px;
    --vc-border: 0.5px solid var(--vc-bordure);

    /* Transitions */
    --vc-transition: 200ms ease;

    /* Z-index */
    --vc-z-nav: 100;
    --vc-z-modal: 1000;
}

/* ============================================
   2. Reset & base
   ============================================ */

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

html,
body {
    width: 100%;
}

/* Pas de scroll horizontal indésirable.
   IMPORTANT : `overflow-x: hidden` sur html/body casse `position: sticky` partout.
   On utilise `clip` qui fait pareil SANS établir de contexte de containment.
   Fallback `hidden` pour les très vieux navigateurs (qui n'auront juste pas le sticky). */
body {
    overflow-x: hidden;
    overflow-x: clip;
}

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

body {
    margin: 0;
    font-family: var(--vc-font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--vc-texte);
    background: var(--vc-blanc);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--vc-transition);
}

button {
    font: inherit;
    cursor: pointer;
}

/* ============================================
   3. Typographie
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--vc-font-serif);
    font-weight: 500;
    line-height: 1.15;
    color: var(--vc-texte);
    margin: 0 0 var(--vc-space-4);
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
    margin: 0 0 var(--vc-space-4);
    line-height: 1.65;
}

.vc-eyebrow {
    display: inline-block;
    font-family: var(--vc-font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--vc-framboise-dark);
    margin-bottom: var(--vc-space-4);
}

/* ============================================
   4. Layout utilities
   ============================================ */

.vc-container {
    width: 100%;
    max-width: var(--vc-container-max);
    margin: 0 auto;
    padding: 0 var(--vc-space-6);
}

.vc-container-narrow {
    max-width: var(--vc-container-narrow);
}

.vc-section {
    padding: var(--vc-space-20) 0;
}

.vc-grid-2,
.vc-grid-3,
.vc-grid-4 {
    display: grid;
    gap: var(--vc-space-6);
}

.vc-grid-2 { grid-template-columns: repeat(2, 1fr); }
.vc-grid-3 { grid-template-columns: repeat(3, 1fr); }
.vc-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================
   5. Composants — boutons
   ============================================ */

.vc-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--vc-space-2);
    padding: 12px 22px;
    border-radius: var(--vc-radius-pill);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--vc-transition);
    border: none;
}

.vc-btn-primary {
    background: var(--vc-framboise-btn);
    color: var(--vc-blanc);
}

.vc-btn-primary:hover {
    background: var(--vc-framboise-dark);
    transform: translateY(-1px);
}

.vc-btn-secondary {
    background: transparent;
    color: var(--vc-marine);
    border: 0.5px solid var(--vc-marine);
}

.vc-btn-secondary:hover {
    background: var(--vc-marine);
    color: var(--vc-blanc);
}

/* ============================================
   6. Composants — cartes
   ============================================ */

.vc-card {
    background: var(--vc-blanc);
    border: var(--vc-border);
    border-radius: var(--vc-radius-lg);
    padding: var(--vc-space-5);
    transition: box-shadow var(--vc-transition), transform var(--vc-transition);
}

.vc-card:hover {
    box-shadow: 0 4px 24px rgba(26, 43, 74, 0.06);
    transform: translateY(-2px);
}

.vc-pill {
    display: inline-block;
    padding: 4px 12px;
    background: var(--vc-framboise-light);
    color: var(--vc-rose-cellule);
    font-size: 0.75rem;
    border-radius: var(--vc-radius-pill);
    font-weight: 500;
}

/* ============================================
   7. Animations scroll reveal
   ============================================ */

.vc-reveal,
.vc-reveal-left,
.vc-reveal-right {
    opacity: 0;
    transition: opacity 600ms ease, transform 600ms ease;
}

.vc-reveal { transform: translateY(20px); }
.vc-reveal-left { transform: translateX(-20px); }
.vc-reveal-right { transform: translateX(20px); }

.vc-reveal.is-visible,
.vc-reveal-left.is-visible,
.vc-reveal-right.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

.vc-delay-1 { transition-delay: 100ms; }
.vc-delay-2 { transition-delay: 200ms; }
.vc-delay-3 { transition-delay: 300ms; }
.vc-delay-4 { transition-delay: 400ms; }

/* ============================================
   8. Accessibilité & motion
   ============================================ */

.vc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--vc-framboise);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .vc-reveal,
    .vc-reveal-left,
    .vc-reveal-right {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   9. Responsive — breakpoints
   ============================================ */

@media (max-width: 1024px) {
    .vc-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .vc-section { padding: var(--vc-space-16) 0; }
}

@media (max-width: 768px) {
    .vc-grid-2,
    .vc-grid-3,
    .vc-grid-4 {
        grid-template-columns: 1fr;
    }

    .vc-container {
        padding: 0 var(--vc-space-4);
    }

    .vc-section {
        padding: var(--vc-space-12) 0;
    }

    .vc-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 380px) {
    body { font-size: 15px; }
}
