/*
Theme Name: NEOVENTIS
Description: Theme classique portage fidele de neoventis.fr - Tailwind CDN, univers Ing/Chantier. Refonte claire conforme charte graphique.
Author: NEOVENTIS
Version: 3.3.0
Text Domain: neoventis
*/

/* Défilement doux (comme la prod : html class="scroll-smooth") */
html { scroll-behavior: smooth; }

/* Rich-text styling for the WordPress editor inside Service pages. */
.service-content .wp-block-heading,
.service-content h2,
.service-content h3,
.service-content h4 {
    color: #1a1a1a;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-weight: 700;
    line-height: 1.25;
    margin: 2rem 0 .75rem;
}
.service-content h2 { font-size: 1.5rem; }
.service-content h3 { font-size: 1.2rem; }
.service-content h4 { font-size: 1rem; }
.service-content p { margin: 0 0 1rem; }
.service-content ul,
.service-content ol { margin: 0 0 1.25rem 1.25rem; }
.service-content ul { list-style: disc; }
.service-content ol { list-style: decimal; }
.service-content li { margin: .35rem 0; padding-left: .25rem; }
.service-content a { color: #108294; text-decoration: underline; text-underline-offset: 2px; }
.service-content a:hover { color: #0a6574; }
.service-content strong { color: #0a0a0a; font-weight: 700; }
.service-content blockquote {
    border-left: 3px solid #108294;
    color: #444;
    font-style: italic;
    margin: 1.5rem 0;
    padding-left: 1rem;
}
.service-content figure { margin: 1.5rem 0; }
.service-content img { border-radius: .25rem; height: auto; max-width: 100%; }
.service-content table { border-collapse: collapse; margin: 1.5rem 0; width: 100%; }
.service-content th,
.service-content td { border: 1px solid #e8e8e8; padding: .75rem; text-align: left; }
.service-content th { background: #f5f5f5; color: #0a0a0a; }

:root {
            --accent: #108294;
            --accent-hover: #0d6d7d;
            --accent-ring: rgba(16,130,148,0.3);
            --accent-bg: rgba(16,130,148,0.1);
            --btn-bg: #108294;
            --btn-hover: #0d6d7d;
            --menu-active: #108294;
        }
        .universe-chantier {
            --accent: #FA6B0C;
            --accent-hover: #e05c00;
            --accent-ring: rgba(250,107,12,0.3);
            --accent-bg: rgba(250,107,12,0.1);
            --btn-bg: #FA6B0C;
            --btn-hover: #e05c00;
            --menu-active: #FA6B0C;
        }
        .universe-transition { transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
        .shutter-overlay {
            position: fixed; top: 0; left: -100%; width: 100%; height: 100%;
            background: #108294; z-index: 9999; transform: skewX(-5deg);
            transition: left 0.5s cubic-bezier(0.76, 0, 0.24, 1);
        }
        .shutter-overlay.active-orange { background: #FA6B0C; }
        .shutter-overlay.run { left: 100%; }
        @media (max-width: 1023px) { .shutter-overlay { display: none; } }
        .nav-link { position: relative; }
        .nav-link::after {
            content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
            height: 1px; background: currentColor;
            transform: scaleX(0); transition: transform 0.2s;
        }
        .nav-link:hover::after,
        .nav-link.active::after { transform: scaleX(1); }

        .drawer-overlay {
            position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 45;
            opacity: 0; pointer-events: none; transition: opacity 0.3s;
        }
        .drawer-overlay.open { opacity: 1; pointer-events: auto; }
        .drawer {
            position: fixed; top: 0; right: -320px; width: 320px; height: 100vh;
            background: #0a0a0a; z-index: 50; transition: right 0.3s cubic-bezier(0.16,1,0.3,1);
            padding: 1.5rem; overflow-y: auto;
        }
        .drawer.open { right: 0; }
        .drawer-close {
            position: absolute; top: 1rem; right: 1rem;
            width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center;
            border-radius: 9999px; cursor: pointer; transition: background 0.2s;
            background: rgba(255,255,255,0.1); font-size: 1.25rem; color: #fff;
        }
        .drawer-close:hover { background: rgba(255,255,255,0.15); }
        .drawer-nav a {
            display: block; padding: 0.75rem 1rem; border-radius: 0.5rem;
            font-size: 0.9375rem; font-weight: 500; color: rgba(255,255,255,0.6);
            transition: background 0.2s, color 0.2s; text-decoration: none;
        }
        .drawer-nav a:hover { background: rgba(255,255,255,0.05); color: #fff; }
        .animate-fade-in { animation: fadeIn 0.6s ease-out both; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

        /* ------------------------------------------------------------------
         * Refonte claire (v3) - utilitaires accent pilotes par var(--accent)
         * ---------------------------------------------------------------- */
        .btn-accent {
            display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
            padding: 0.875rem 2rem;
            background: var(--btn-bg, #108294);
            color: #fff !important;
            font-weight: 600; font-size: 0.9375rem; letter-spacing: 0.02em;
            border-radius: 0.5rem; border: none; cursor: pointer;
            text-decoration: none;
            transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
            box-shadow: 0 1px 2px rgba(0,0,0,0.08);
        }
        .btn-accent:hover {
            background: var(--btn-hover, #0d6d7d);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.12);
            color: #fff;
        }
        .btn-accent-outline {
            display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
            padding: 0.875rem 2rem;
            background: transparent;
            color: #1a1a1a !important;
            font-weight: 600; font-size: 0.9375rem; letter-spacing: 0.02em;
            border-radius: 0.5rem; border: 1px solid rgba(26,26,26,0.25); cursor: pointer;
            text-decoration: none;
            transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
        }
        .btn-accent-outline:hover {
            border-color: var(--accent, #108294);
            color: var(--accent, #108294) !important;
            background: var(--accent-bg, rgba(16,130,148,0.06));
        }
        .input-accent:focus,
        textarea.input-accent:focus {
            outline: none;
            border-color: var(--accent, #108294);
            box-shadow: 0 0 0 3px var(--accent-ring, rgba(16,130,148,0.3));
        }
        /* Nav claire : gris neutre au repos, accent univers au survol */
        .site-nav .nav-link { color: rgba(51,51,51,0.72); text-decoration: none; }
        .site-nav .nav-link:hover,
        .site-nav .nav-link.active { color: var(--menu-active, #108294); }
        /* Eyebrow editorial : filet accent + mono uppercase */
        .nv-eyebrow {
            display: inline-flex; align-items: center; gap: 0.75rem;
            font-family: 'JetBrains Mono', ui-monospace, monospace;
            font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase;
            color: var(--accent, #108294);
        }
        .nv-eyebrow::before { content: ''; width: 2rem; height: 1px; background: currentColor; flex-shrink: 0; }
        /* Selection & focus accessibles */
        ::selection { background: var(--accent, #108294); color: #fff; }
        :focus-visible { outline: 2px solid var(--accent, #108294); outline-offset: 2px; }
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
        }
        /* Logos et icones en blocs image natifs (header/footer) */
        .nv-header-logo-ing, .nv-header-logo-chantier,
        .nv-footer-logo-ing, .nv-footer-logo-chantier,
        .nv-icon { margin: 0; }
        .nv-header-logo-ing img, .nv-header-logo-chantier img {
            height: 2rem; width: auto; max-width: none; object-fit: contain;
            filter: brightness(0) invert(1);
        }
        .nv-footer-logo-ing img, .nv-footer-logo-chantier img {
            height: 1.75rem; width: auto; max-width: none; object-fit: contain;
        }
        .nv-icon img { height: 1.25rem; width: auto; max-width: none; }
        .nv-icon { opacity: 0.6; }
        .nv-header-logo-chantier, .nv-footer-logo-chantier { display: none; }
        body.universe-chantier :is(.nv-header-logo-ing, .nv-footer-logo-ing) { display: none; }
        body.universe-chantier :is(.nv-header-logo-chantier, .nv-footer-logo-chantier) { display: block; }

        /* Front page native : grille projets (Query Loop) */
        .nv-projets-list.wp-block-post-template {
            display: grid;
            grid-template-columns: 1fr;
            gap: 1px;
            background: rgba(255,255,255,.05);
            list-style: none;
            margin: 0;
            padding: 0;
        }
        @media (min-width: 768px) {
            .nv-projets-list.wp-block-post-template { grid-template-columns: repeat(2, 1fr); }
        }
        .nv-projet-img { position: absolute; inset: 0; margin: 0; }
        .nv-projet-img img { width: 100%; height: 100%; object-fit: cover; opacity: .6; transition: opacity .5s, transform .5s; }
        .group:hover .nv-projet-img img { opacity: .8; transform: scale(1.05); }
        /* Lien etire : tout le titre cliquable couvre la carte */
        h3.nv-projet-titre a { color: #fff; text-decoration: none; }
        h3.nv-projet-titre a::after { content: ''; position: absolute; inset: 0; z-index: 20; }
        .nv-projet-excerpt {
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
            overflow: hidden; margin: 0;
        }
        /* Badges alternes : impair = INGENIERIE (petrole), pair = CHANTIER (orange) */
        .nv-badge-ing, .nv-badge-ch { margin-bottom: .75rem; }
        .nv-badge-ch { display: none; }
        li:nth-child(even) .nv-badge-ing { display: none; }
        li:nth-child(even) .nv-badge-ch { display: block; }
        .nv-projets-list > li:nth-child(odd) .nv-badge-ing { color: #108294; }
        .nv-projets-list > li:nth-child(even) .nv-badge-ch { color: #FA6B0C; }
