/*
 * Theme Name:  NVI Nettoyage
 * Theme URI:   https://matrix-sn.com
 * Author:      Matrix Digital
 * Author URI:  https://matrix-sn.com
 * Description: Theme WordPress sur mesure pour NVI Nettoyage - prestations de proprete et mise a disposition de personnel a Dakar. Developpe par Matrix Digital.
 * Version:     0.1.0
 * Requires at least: 6.0
 * Tested up to: 6.8
 * Requires PHP: 8.0
 * License:     Proprietary
 * Text Domain: nvi-nettoyage
 */

/* ==========================================================================
   JETONS DE DESIGN — NVI Nettoyage
   Aucune valeur de couleur, d'espacement ou de typographie en dur ailleurs.
   L'accent vert menthe est la couleur que NVI emploie deja pour « Proprete
   & Nettoyage » dans sa propre charte : ce n'est pas un choix esthetique.
   ========================================================================== */

:root {
    /* --- Palette NVI --- */
    --navy:        #1B3A6B;
    --navy-dark:   #122747;
    --blue:        #2176AE;
    --accent:      #00BFA5;
    --accent-dark: #009C86;
    --accent-soft: #E6F8F5;
    /* Variante TEXTE de l'accent. Mesure du 03/11/2026 : --accent donne
       2,33:1 sur blanc et --accent-dark 3,44:1 — les deux echouent au
       contraste AA (4,5:1 exige). Celle-ci donne 5,53:1 sur blanc et
       5,11:1 sur le gris clair. Meme teinte, juste lisible.
       A NE PAS FAIRE : reutiliser --accent pour du texte sur fond clair. */
    --accent-text: #00766A;

    /* --- Neutres --- */
    --white:      #FFFFFF;
    --gray-light: #F4F6FA;
    --gray-line:  #DFE5EE;
    --gray-mid:   #5F6E82;
    --gray-dark:  #2D2D2D;

    /* --- Etats --- */
    --error:      #C62828;
    --error-soft: #FDECEA;

    /* --- Typographies --- */
    --font-body:  'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-title: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;

    /* --- Echelle typographique (fluide, lisible des 360px) --- */
    --fs-h1:    clamp(2rem, 1.35rem + 2.8vw, 3.25rem);
    --fs-h2:    clamp(1.55rem, 1.2rem + 1.5vw, 2.35rem);
    --fs-h3:    clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
    --fs-body:  1.0625rem;
    --fs-small:  0.9375rem;
    --fs-micro:  0.8125rem;
    --lh-body:  1.65;
    --lh-title: 1.12;

    /* --- Rythme --- */
    --space-1:  4px;
    --space-2:  8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --space-9: 88px;

    /* --- Structure --- */
    --container-max: 1200px;
    --gutter:        20px;
    --header-h:      76px;

    /* --- Formes --- */
    --radius-s:  6px;
    --radius-m: 10px;
    --radius-l: 18px;

    /* --- Ombres --- */
    --shadow-s: 0 1px 3px rgba(18, 39, 71, .08);
    --shadow-m: 0 6px 24px rgba(18, 39, 71, .10);
    --shadow-l: 0 18px 48px rgba(18, 39, 71, .14);

    /* --- Mouvement --- */
    --t-fast: 150ms ease;
    --t-base: 250ms ease;

    /* --- Plans --- */
    --z-header:  100;
    --z-overlay: 200;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

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

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

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    color: var(--gray-dark);
    background: var(--white);
    /* « clip » et PAS « hidden » : overflow-x:hidden force overflow-y a
       auto, body devient un conteneur de defilement, et tout
       position:sticky se cale sur lui au lieu de la fenetre. Les
       surfaces empilees de l'accueil ne tiendraient plus.
       Piege paye sur Groupe N2M le 02/09/2026. */
    overflow-x: clip;
}

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

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }

button, input, select, textarea { font: inherit; color: inherit; }

ul, ol { padding-left: var(--space-5); }

/* ==========================================================================
   TYPOGRAPHIE
   ========================================================================== */

h1, h2, h3, h4 {
    font-family: var(--font-title);
    line-height: var(--lh-title);
    color: var(--navy);
    font-weight: 700;
    text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 1.125rem; }

p  { max-width: 68ch; }

.nvin-eyebrow {
    font-family: var(--font-title);
    font-size: var(--fs-small);
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--accent-text);
    display: block;
    margin-bottom: var(--space-3);
}

.nvin-lead { font-size: 1.1875rem; color: var(--gray-mid); }

/* ==========================================================================
   STRUCTURE
   ========================================================================== */

.nvin-container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.nvin-section { padding-block: var(--space-8); }
.nvin-section--tight { padding-block: var(--space-7); }
.nvin-section--soft { background: var(--gray-light); }

@media (min-width: 768px) {
    .nvin-section { padding-block: var(--space-9); }
}

.nvin-grid { display: grid; gap: var(--space-5); }

@media (min-width: 640px) {
    .nvin-grid--2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .nvin-grid--3 { grid-template-columns: repeat(3, 1fr); }
    .nvin-grid--2-wide { grid-template-columns: 1.05fr .95fr; align-items: start; }
}

.nvin-stack > * + * { margin-top: var(--space-4); }

/* ==========================================================================
   BOUTONS
   ========================================================================== */

.nvin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 48px;
    padding: var(--space-3) var(--space-5);
    border: 2px solid transparent;
    border-radius: var(--radius-m);
    font-family: var(--font-title);
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--t-base), color var(--t-base), border-color var(--t-base);
}

.nvin-btn svg { width: 20px; height: 20px; flex: none; }

.nvin-btn--primary { background: var(--accent); color: var(--navy-dark); }
.nvin-btn--primary:hover { background: var(--accent-dark); color: var(--white); }

.nvin-btn--navy { background: var(--navy); color: var(--white); }
.nvin-btn--navy:hover { background: var(--navy-dark); color: var(--white); }

.nvin-btn--ghost { background: transparent; color: var(--navy); border-color: var(--gray-line); }
.nvin-btn--ghost:hover { background: var(--gray-light); border-color: var(--navy); color: var(--navy); }

.nvin-btn--on-navy { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .45); }
.nvin-btn--on-navy:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

.nvin-btn--block { width: 100%; }

/* ==========================================================================
   ACCESSIBILITE
   ========================================================================== */

.nvin-skip {
    position: absolute;
    left: var(--space-4);
    top: -100px;
    z-index: calc(var(--z-overlay) + 10);
    padding: var(--space-3) var(--space-4);
    background: var(--navy);
    color: var(--white);
    border-radius: var(--radius-s);
    text-decoration: none;
    transition: top var(--t-fast);
}
.nvin-skip:focus { top: var(--space-4); color: var(--white); }

:focus-visible {
    outline: 3px solid var(--accent-dark);
    outline-offset: 2px;
    border-radius: var(--radius-s);
}

.nvin-sr {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
