/* VIAPREVENT — CSS mobile-first (reconstruction 2026-07) */

:root {
    --vert: #1a5f4a;
    --vert-2: #2d8a6e;
    --menthe: #7dd3c0;
    --texte: #333;
    --texte-2: #555;
    --texte-3: #666;
    --fond-alt: #f8f9fa;
    --radius: 10px;
    --ombre: 0 3px 15px rgba(0, 0, 0, 0.08);
    --ombre-2: 0 5px 25px rgba(26, 95, 74, 0.15);
    --degrade: linear-gradient(135deg, #1a5f4a 0%, #2d8a6e 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
    color: var(--texte);
    font-size: 14px;
    background: #edefe9;
}

img { max-width: 100%; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* première section des pages sans bandeau titre : décalée sous le header fixe */
.page-top { padding-top: 64px; }
@media (min-width: 600px) { .page-top { padding-top: 76px; } }
@media (min-width: 900px) { .page-top { padding-top: 80px; } }

a:focus-visible, button:focus-visible, select:focus-visible {
    outline: 2px solid var(--menthe);
    outline-offset: 2px;
}

/* ---------- Header ---------- */
header {
    background: var(--vert);
    color: white;
    padding: 4px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.logo-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

a.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
}

.logo img { height: 22px; }

.logo-text {
    font-size: 0.95rem;
    font-weight: bold;
}

.logo-text span { color: var(--menthe); }

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.82rem;
    padding: 7px 10px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-color 0.3s;
}

nav a:hover, nav a.active {
    color: var(--menthe);
    border-bottom-color: var(--menthe);
}

/* ---------- Panier (bandeau de navigation) ---------- */
.header-tools { display: flex; align-items: center; gap: 8px; }
.nav-cart { white-space: nowrap; }
.cart-count-nav { display: inline-block; background: #7dd3c0; color: #1a5f4a; font-size: 0.62rem; font-weight: bold; min-width: 15px; height: 15px; line-height: 15px; text-align: center; border-radius: 8px; padding: 0 3px; margin-left: 4px; vertical-align: 2px; }
.cart-count-nav:empty { display: none; }

/* ---------- Sélecteur de langue ---------- */
.lang-switcher select {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

.lang-switcher select:hover { background: rgba(255, 255, 255, 0.3); }

.lang-switcher select option {
    background: var(--vert);
    color: white;
}

/* ---------- Hero (accueil) — bandeau compact, sans image de fond ---------- */
.hero {
    background: var(--degrade);
    text-align: center;
    color: white;
    padding: 56px 10px 10px;
}

.hero-content {
    max-width: 720px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 1.2rem;
    margin-bottom: 2px;
    color: white;
}

.hero-content h1 span { color: var(--menthe); }

.hero-p {
    font-size: 0.8rem;
    max-width: 640px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.95);
}

.tagline {
    font-size: 0.82rem;
    margin-bottom: 4px;
    color: var(--menthe);
    font-style: italic;
}

/* ---------- En-tête de page ---------- */
.page-header {
    background: var(--degrade);
    color: white;
    padding: 64px 10px 10px;
    text-align: center;
}

.page-header h1 {
    font-size: 1.2rem;
    margin-bottom: 3px;
}

.page-header p {
    font-size: 0.8rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- Sections ---------- */
section { padding: 12px 10px; }

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 1.05rem;
    color: var(--vert);
    margin-bottom: 10px;
}

.section-title::after {
    content: '';
    display: block;
    width: 44px;
    height: 2px;
    background: var(--menthe);
    margin: 6px auto 0;
}

/* ---------- Cartes d'applications (page démo) ---------- */
.applications { background: var(--fond-alt); }

.app-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.app-card {
    background: white;
    padding: 13px 12px;
    border-radius: var(--radius);
    box-shadow: var(--ombre);
    transition: transform 0.3s, box-shadow 0.3s;
}

.app-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ombre-2);
}

.app-card h3 {
    color: var(--vert);
    font-size: 0.92rem;
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--menthe);
}

.app-card p {
    color: var(--texte-2);
    font-size: 0.78rem;
    line-height: 1.5;
}

/* ---------- Boutons ---------- */
.cta-btn {
    display: inline-block;
    background: var(--vert);
    color: white;
    padding: 10px 24px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    border-radius: 50px;
    transition: all 0.3s;
    margin-top: 15px;
}

.cta-btn:hover {
    background: var(--vert-2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 95, 74, 0.3);
}

/* ---------- Cartes documents (PDF, page tarifs) ---------- */
.doc-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

.doc-card:hover { transform: translateY(-3px); }

.download-btn {
    display: inline-block;
    background: var(--degrade);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 0.85rem;
    transition: all 0.3s;
    width: 100%;
    text-align: center;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 15px rgba(26, 95, 74, 0.4);
}

.download-btn .size {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-left: 8px;
}

/* ---------- Specs (page tarifs) ---------- */
.specs-section { background: var(--fond-alt); }

/* ---------- Contact ---------- */
.contact { background: var(--fond-alt); }

.contact-info {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.1);
}

.contact-info p {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.contact-info a {
    color: var(--vert);
    font-weight: bold;
    text-decoration: none;
}

.contact-info a:hover { text-decoration: underline; }

.email-links {
    margin: 20px 0;
    padding: 20px;
    background: var(--fond-alt);
    border-radius: 8px;
}

.email-links p {
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.email-links p:last-child { margin-bottom: 0; }

.company-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.company-details h3, .company-details h4 {
    color: var(--vert);
    margin-bottom: 10px;
    font-size: 1rem;
}

.company-details p {
    font-size: 0.85rem;
    margin-bottom: 5px;
}

/* ---------- Bandeau CTA ---------- */
.cta-section {
    background: var(--degrade);
    color: white;
    text-align: center;
    padding: 22px 12px;
}

.cta-section h2 {
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.cta-section p {
    margin-bottom: 20px;
    opacity: 0.9;
    font-size: 0.9rem;
}

.cta-section .cta-btn {
    background: white;
    color: var(--vert);
}

.cta-section .cta-btn:hover { background: var(--menthe); }

/* ---------- Footer ---------- */
footer {
    background: #1a1a1a;
    color: white;
    padding: 8px 10px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo { margin-bottom: 3px; }

.footer-logo img { height: 20px; }

.footer-info {
    opacity: 0.7;
    font-size: 0.75rem;
    line-height: 1.6;
}

.footer-info a { color: var(--menthe); }

/* ---------- Popup de succès (contact) ---------- */
.popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.popup-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: popupIn 0.3s ease;
}

@keyframes popupIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.popup-content h3 {
    color: var(--vert);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.popup-content p {
    color: var(--texte-2);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.popup-content .hours {
    background: #f0f9f6;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid var(--vert);
}

.popup-content .hours strong { color: var(--vert); }

.popup-close {
    background: var(--degrade);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    font-size: 0.95rem;
}

.popup-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 95, 74, 0.3);
}

/* ---------- Case consentement RGPD ---------- */
.form-checkbox { margin-bottom: 15px; }

.form-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
    flex-shrink: 0;
}

.form-checkbox span {
    font-size: 0.8rem;
    color: var(--texte-2);
    line-height: 1.4;
}

/* ==================== */
/* TABLETTE (min 600px) */
/* ==================== */
@media (min-width: 600px) {
    body { font-size: 15px; }

    .header-container {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 15px;
        gap: 8px;
    }

    .logo-group { width: auto; flex-shrink: 0; }   /* la nav (11 liens) ne doit pas écraser le logo sous la combo langue */

    .logo img { height: 34px; }
    .logo-text { font-size: 1.1rem; }

    nav a {
        font-size: 0.85rem;
        padding: 5px 12px;
    }

    .hero { padding: 66px 20px 14px; }
    .hero-content h1 { font-size: 1.6rem; }
    .hero-p { font-size: 0.9rem; }

    .page-header { padding: 74px 20px 14px; }
    .page-header h1 { font-size: 1.5rem; }

    section { padding: 20px 20px; }

    .section-title {
        font-size: 1.25rem;
        margin-bottom: 18px;
    }

    .app-grid {
        gap: 14px;
    }
}

/* ==================== */
/* BUREAU (min 900px) */
/* ==================== */
@media (min-width: 900px) {
    body { font-size: 15px; }

    header { padding: 10px 0; }
    .header-container { padding: 0 20px; }
    .logo img { height: 38px; }
    .logo-text { font-size: 1.25rem; }

    nav a {
        font-size: 0.9rem;
        margin-left: 22px;
        padding: 2px 0;
    }

    .hero { padding: 70px 20px 14px; }
    .hero-content h1 { font-size: 1.8rem; }
    .hero-p { font-size: 0.92rem; }
    .tagline { font-size: 0.95rem; }

    .page-header { padding: 78px 20px 16px; }
    .page-header h1 { font-size: 1.6rem; }
    .page-header p { font-size: 0.9rem; }

    section { padding: 26px 20px; }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .app-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }

    .app-card { padding: 16px 14px; }
    .app-card h3 { font-size: 0.95rem; }
    .app-card p { font-size: 0.8rem; }

    .contact-info { padding: 40px 35px; }

    footer { padding: 10px 20px; }
    .footer-logo img { height: 24px; }
    .footer-info { font-size: 0.85rem; }
}

/* ==================== */
/* GRAND ÉCRAN (min 1200px) */
/* ==================== */
@media (min-width: 1200px) {
    .hero-content h1 { font-size: 1.9rem; }
    .section-title { font-size: 1.5rem; }
}

/* ==================== */
/* Bandeau RGPD (haut des pages à animation) */
/* ==================== */
.rgpd-top { text-align: center; margin: 0 0 16px; }
.rgpd-banner { display: inline-flex; align-items: center; gap: 7px; background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #1a5f4a; border: 1px solid #7dd3c0; border-radius: 50px; padding: 8px 18px;
    font-size: 0.82rem; font-weight: 700; text-decoration: none; box-shadow: 0 2px 8px rgba(26,95,74,.10); }
.rgpd-banner:hover { background: #c8e6c9; }

/* ==================== */
/* Animations : clic pour ouvrir en plein écran (popup), clic pour fermer */
/* ==================== */
.anim-scroll { cursor: zoom-in; }
iframe.vp-anim { pointer-events: none; }
.anim-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999;
    background: rgba(10,20,16,.92); display: flex; align-items: flex-start; justify-content: center;
    overflow: auto; padding: 3vh 2vw; cursor: zoom-out; }
.anim-modal-frame { width: 96vw; max-width: 1300px; height: 70vh; border: 0; border-radius: 10px;
    background: #edefe9; box-shadow: 0 12px 50px rgba(0,0,0,.55); pointer-events: none; }
.anim-modal-close { position: fixed; top: 10px; right: 20px; color: #fff; font-size: 28px; font-weight: bold; pointer-events: none; opacity: .85; }
