/*
 Theme Name:   PAVIOR Starter Child
 Template:     pavior-starter
 Author:       PAVIOR SA
 Version:      4.0.0
 Description:  PAVIOR SA — Agence digitale, La Chaux-de-Fonds
*/

/* ==========================================================================
   PAVIOR SA — CSS v4.0.0
   Style Apple-like : epure, sections plein ecran, titres massifs
   Palette : blanc / gris / bleu profond / bleu vif
   Typo : Space Grotesk (titres) + system-ui (corps)
   ========================================================================== */

/* --- VARIABLES --- */
:root {
    --p-white: #FFFFFF;
    --p-gray-bg: #F5F5F7;
    --p-blue-deep: #0A1A4A;
    --p-blue-accent: #2563EB;
    --p-blue-hover: #1D4ED8;
    --p-black: #1D1D1F;
    --p-gray: #6E6E73;
    --p-gray-light: #86868B;
    --p-border: #D2D2D7;
    --p-radius: 12px;
    --p-radius-sm: 8px;
    --p-radius-full: 980px;
    --p-shadow: 0 2px 12px rgba(0,0,0,.06);
    --p-shadow-lg: 0 12px 40px rgba(0,0,0,.1);
    --p-font: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    --p-font-body: system-ui, -apple-system, 'Segoe UI', sans-serif;
    --p-max-width: 1120px;
    --p-section-pad: clamp(60px, 8vw, 120px);
    --p-transition: .3s cubic-bezier(.4,0,.2,1);
}

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

body {
    margin: 0;
    background: var(--p-white);
    color: var(--p-black);
    font-family: var(--p-font-body);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--p-font);
    font-weight: 700;
    color: var(--p-black);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 .5em;
}

h1 { font-size: clamp(40px, 5vw, 72px); }
h2 { font-size: clamp(32px, 4vw, 56px); }
h3 { font-size: clamp(24px, 3vw, 36px); }

p { margin: 0 0 1em; }

a {
    color: var(--p-blue-accent);
    text-decoration: none;
    transition: color var(--p-transition);
}
a:hover { color: var(--p-blue-hover); }

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

.container {
    max-width: var(--p-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- SECTIONS --- */
.section {
    padding: var(--p-section-pad) 0;
}

.section--gray { background: var(--p-gray-bg); }
.section--dark { background: var(--p-blue-deep); color: var(--p-white); }
.section--dark h2,
.section--dark h3 { color: var(--p-white); }
.section--dark p { color: rgba(255,255,255,.8); }

.section-eyebrow {
    font-family: var(--p-font);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--p-blue-accent);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: clamp(18px, 2vw, 24px);
    color: var(--p-gray);
    max-width: 640px;
    line-height: 1.5;
}

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--p-font);
    font-size: 17px;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: var(--p-radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--p-transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--p-blue-accent);
    color: var(--p-white);
}
.btn-primary:hover {
    background: var(--p-blue-hover);
    color: var(--p-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37,99,235,.3);
}

.btn-outline {
    background: transparent;
    color: var(--p-blue-accent);
    border: 2px solid var(--p-blue-accent);
}
.btn-outline:hover {
    background: var(--p-blue-accent);
    color: var(--p-white);
}

.btn-white {
    background: var(--p-white);
    color: var(--p-blue-deep);
}
.btn-white:hover {
    background: var(--p-gray-bg);
    color: var(--p-blue-deep);
    transform: translateY(-1px);
}

.btn-link {
    background: none;
    padding: 0;
    color: var(--p-blue-accent);
    font-weight: 600;
    border: none;
}
.btn-link:hover { color: var(--p-blue-hover); }
.btn-link::after {
    content: '\2192';
    transition: transform var(--p-transition);
}
.btn-link:hover::after { transform: translateX(4px); }

/* --- HEADER --- */
.pavior-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10,26,74,.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.pavior-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--p-white);
    font-family: var(--p-font);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: .02em;
    text-decoration: none;
}

.header-logo:hover { color: var(--p-white); }

.header-logo img {
    height: 36px;
    width: auto;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header-nav a {
    color: rgba(255,255,255,.85);
    font-family: var(--p-font);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .01em;
    transition: color var(--p-transition);
    text-decoration: none;
}
.header-nav a:hover { color: var(--p-white); }

.header-cta .btn {
    font-size: 14px;
    padding: 10px 24px;
}

.header-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.header-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--p-white);
    border-radius: 2px;
    transition: all var(--p-transition);
}

/* --- HERO --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--p-blue-deep);
    color: var(--p-white);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .2;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 24px;
}

.hero h1 {
    color: var(--p-white);
    margin-bottom: 24px;
}

.hero .section-subtitle {
    color: rgba(255,255,255,.7);
    margin-bottom: 40px;
}

.hero .btn-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- SERVICES GRID --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.service-card {
    background: var(--p-white);
    border-radius: var(--p-radius);
    overflow: hidden;
    transition: transform var(--p-transition), box-shadow var(--p-transition);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--p-shadow);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--p-shadow-lg);
    color: inherit;
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-card-body {
    padding: 28px;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 8px;
}

.service-card p {
    color: var(--p-gray);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* --- STATS --- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 48px;
}

.stat-item { text-align: center; }

.stat-number {
    font-family: var(--p-font);
    font-size: clamp(36px, 4vw, 56px);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.section--dark .stat-number { color: var(--p-white); }
.stat-label { font-size: 15px; color: var(--p-gray); }
.section--dark .stat-label { color: rgba(255,255,255,.65); }

/* --- CTA BAND --- */
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: 16px; }
.cta-band .section-subtitle { margin-bottom: 32px; }

/* --- FAQ --- */
.faq-list {
    max-width: 720px;
    margin: 48px auto 0;
}

.faq-item {
    border-bottom: 1px solid var(--p-border);
    padding: 20px 0;
}

.faq-item summary {
    font-family: var(--p-font);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    font-size: 24px;
    color: var(--p-gray);
    transition: transform var(--p-transition);
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-answer {
    padding-top: 12px;
    color: var(--p-gray);
    line-height: 1.7;
}

/* --- FOOTER --- */
.pavior-footer {
    background: var(--p-blue-deep);
    color: rgba(255,255,255,.8);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255,255,255,.6);
}

.footer-col h4 {
    font-family: var(--p-font);
    font-size: 14px;
    font-weight: 600;
    color: var(--p-white);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 20px;
}

.footer-col a {
    display: block;
    color: rgba(255,255,255,.6);
    font-size: 14px;
    padding: 4px 0;
    transition: color var(--p-transition);
    text-decoration: none;
}
.footer-col a:hover { color: var(--p-white); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255,255,255,.45);
}

.footer-bottom a { color: rgba(255,255,255,.45); text-decoration: none; }
.footer-bottom a:hover { color: var(--p-white); }

.footer-legal {
    display: flex;
    gap: 24px;
}

/* --- SCROLL ANIMATIONS --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}

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

/* --- MOBILE MENU --- */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--p-blue-deep);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--p-transition);
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu a {
    color: var(--p-white);
    font-family: var(--p-font);
    font-size: 28px;
    font-weight: 600;
    text-decoration: none;
}

.mobile-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: var(--p-white);
    font-size: 32px;
    cursor: pointer;
}

/* --- SCROLL TO TOP (branding.php) --- */
#pavior-scroll-top {
    position: fixed;
    bottom: 120px;
    right: 20px;
    width: 50px;
    height: 50px;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 9999;
    transition: all .3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

#pavior-scroll-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

/* --- WP OVERRIDES --- */
.wp-admin-bar-edit .pavior-header { top: 32px; }
body.admin-bar .mobile-menu { top: 32px; }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-row { grid-template-columns: repeat(2, 1fr); gap: 32px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 768px) {
    .header-nav { display: none; }
    .header-cta { display: none; }
    .header-burger { display: flex; }

    .hero { min-height: 85vh; }

    .services-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .footer-legal { flex-wrap: wrap; justify-content: center; }

    .btn { font-size: 15px; padding: 12px 24px; }
}

@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr; }
    .hero .btn-group { flex-direction: column; align-items: center; }
}

/* --- SERVICE DETAIL (page services) --- */
.service-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.service-detail--reverse .service-detail-img { order: 2; }
.service-detail--reverse .service-detail-text { order: 1; }

.service-detail-img img {
    width: 100%;
    border-radius: var(--p-radius);
    object-fit: cover;
    aspect-ratio: 4/3;
}

.service-detail-text h2 {
    margin-bottom: 16px;
}

.service-detail-text p {
    color: var(--p-gray);
    font-size: 17px;
    line-height: 1.7;
}

/* --- TEAM GRID (page a propos) --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.team-card { text-align: center; }

.team-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
}

.team-card h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.team-card p {
    font-size: 14px;
    color: var(--p-gray);
    margin: 0;
}

/* --- CONTACT GRID --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--p-border);
    border-radius: var(--p-radius-sm);
    font-family: var(--p-font-body);
    font-size: 16px;
    margin-bottom: 16px;
    transition: border-color var(--p-transition);
    background: var(--p-white);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--p-blue-accent);
}

.contact-form label {
    display: block;
    font-family: var(--p-font);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--p-black);
}

/* --- PAGE CONTENT (legales, generique) --- */
.page-content {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--p-section-pad) 24px;
}

.page-content h1 { margin-bottom: 32px; }

.page-content h2 {
    font-size: clamp(22px, 2.5vw, 28px);
    margin-top: 48px;
}

.page-content p,
.page-content li {
    color: var(--p-gray);
    line-height: 1.8;
}

.page-content a { text-decoration: underline; }

/* --- BLOG (home.php) --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.blog-card {
    background: var(--p-white);
    border-radius: var(--p-radius);
    overflow: hidden;
    box-shadow: var(--p-shadow);
    transition: transform var(--p-transition), box-shadow var(--p-transition);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--p-shadow-lg);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-body {
    padding: 24px;
}

.blog-card-body h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.blog-card-body h3 a {
    color: var(--p-black);
    text-decoration: none;
}
.blog-card-body h3 a:hover { color: var(--p-blue-accent); }

.blog-card-date {
    font-size: 13px;
    color: var(--p-gray-light);
    margin-bottom: 8px;
}

.blog-card-body p {
    color: var(--p-gray);
    font-size: 15px;
    line-height: 1.6;
}

/* --- VALUES GRID --- */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.value-card {
    text-align: center;
    padding: 32px 24px;
}

.value-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.value-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.value-card p {
    color: var(--p-gray);
    font-size: 15px;
}

/* --- RESPONSIVE ADDITIONS --- */
@media (max-width: 1024px) {
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .values-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .service-detail { grid-template-columns: 1fr; gap: 32px; }
    .service-detail--reverse .service-detail-img { order: 0; }
    .service-detail--reverse .service-detail-text { order: 0; }
    .contact-grid { grid-template-columns: 1fr; gap: 32px; }
    .blog-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .values-grid { grid-template-columns: 1fr; }
}

/* --- FIX button submit dans formulaire --- */
.contact-form button.btn {
    -webkit-appearance: none;
    appearance: none;
    background: var(--p-blue-accent);
    color: var(--p-white);
    border: none;
    font-family: var(--p-font);
}
.contact-form button.btn:hover {
    background: var(--p-blue-hover);
    color: var(--p-white);
}

/* --- FIX eyebrow dans hero (bleu sur bleu invisible) --- */
.hero .section-eyebrow {
    color: rgba(255,255,255,.6);
}
.section--dark .section-eyebrow {
    color: rgba(255,255,255,.5);
}

/* --- FIX banniere cookies : lien politique en blanc --- */
.pavior-cookie-banner a,
.pavior-cookie-banner a:visited {
    color: rgba(255,255,255,.6) !important;
    text-decoration: underline;
}
.pavior-cookie-banner a:hover {
    color: #fff !important;
}

/* --- FIX footer : liens email/tel en gris clair, pas rouge --- */
.footer-brand a,
.footer-brand a:visited {
    color: rgba(255,255,255,.6);
}
.footer-brand a:hover {
    color: #fff;
}

/* --- FIX cookie banner lien vert → gris/blanc (override inline #id) --- */
#pavior-cc-banner a,
#pavior-cc-banner .pavior-cc-privacy a {
    color: rgba(255,255,255,.6) !important;
}
#pavior-cc-banner a:hover,
#pavior-cc-banner .pavior-cc-privacy a:hover {
    color: #fff !important;
}

/* ==========================================================================
   OPUS CHECK-UP — Corrections Phase 3 (29.03.2026)
   ========================================================================== */

/* --- FOCUS VISIBLE (A11y WCAG AA) --- */
:focus-visible {
    outline: 2px solid var(--p-blue-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

.pavior-header :focus-visible,
.mobile-menu :focus-visible,
.section--dark :focus-visible,
.pavior-footer :focus-visible,
.hero :focus-visible {
    outline-color: #fff;
}

.btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(37,99,235,.4);
}

/* --- FOOTER CONTRAST AA FIX (.45 → .6) --- */
.footer-bottom {
    color: rgba(255,255,255,.6);
}
.footer-bottom a {
    color: rgba(255,255,255,.6);
}

/* --- TOUCH TARGETS MOBILE (min 44px) --- */
@media (max-width: 768px) {
    .footer-col a {
        padding: 10px 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    .footer-legal a {
        padding: 10px 4px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    .header-burger {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* --- COOKIES BUTTON IN FOOTER (not <a>) --- */
.footer-legal button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: rgba(255,255,255,.6);
    cursor: pointer;
    transition: color var(--p-transition);
}
.footer-legal button:hover {
    color: var(--p-white);
}
@media (max-width: 768px) {
    .footer-legal button {
        padding: 10px 4px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* --- NAV LIST RESET --- */
.header-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 32px;
}
.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}
