/* ============================================================
   Alex INFO — visual-enhancements.css
   Améliorations visuelles : hover premium, shine, carte sombre,
   curseur typing.
   Chargé après les autres CSS pour pouvoir surcharger.
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   0. TYPOGRAPHIE — Space Grotesk pour les titres
   Inter reste la police du corps de texte.
   JetBrains Mono reste pour les éléments code / étiquettes.
   ───────────────────────────────────────────────────────────── */
.hero h1,
.section-title,
.pricing-title,
.qcalc-question,
.qcalc-section-title,
.qcalc-option-name,
.guarantee-card h4,
.process-step h3,
.teleassist-card h3,
.faq-question,
.footer-logo,
.engagement-content h2,
.engagement-content .pillar-label,
.service-card h3 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    letter-spacing: -0.015em;
}

/* Léger ajustement de taille car Space Grotesk a un œil plus grand qu'Inter */
.hero h1 {
    letter-spacing: -0.02em;
}

.section-title {
    letter-spacing: -0.02em;
    font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────
   1. CURSEUR TYPING (h1 du hero)
   ───────────────────────────────────────────────────────────── */
.typing-cursor {
    display: inline-block;
    color: var(--accent, #4da8ff);
    font-weight: 400;
    margin-left: 2px;
    animation: typing-blink 1.05s steps(2, end) infinite;
}

@keyframes typing-blink {
    0%, 49%   { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .typing-cursor { animation: none; opacity: 1; }
}

/* ─────────────────────────────────────────────────────────────
   2. CARTES SERVICES — hover premium (lift + glow)
   ───────────────────────────────────────────────────────────── */
.service-card {
    transition:
        transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.4s ease,
        border-color 0.4s ease;
    will-change: transform;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(77, 168, 255, 0.45);
    box-shadow:
        0 20px 40px -10px rgba(0, 117, 215, 0.35),
        0 0 30px rgba(77, 168, 255, 0.18);
}

body.light-mode .service-card:hover {
    border-color: rgba(0, 117, 215, 0.45);
    box-shadow:
        0 20px 40px -10px rgba(0, 117, 215, 0.25),
        0 0 30px rgba(77, 168, 255, 0.12);
}

/* L'icône SVG du service "lifte" avec un léger délai pour effet 3D */
.service-card .service-icon {
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.service-card:hover .service-icon {
    transform: translateY(-4px) scale(1.08);
}

/* Cartes pricing aussi */
.pricing-card {
    transition:
        transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.4s ease,
        border-color 0.4s ease;
}
.pricing-card:hover {
    transform: translateY(-6px);
    border-color: rgba(77, 168, 255, 0.45);
    box-shadow:
        0 18px 38px -8px rgba(0, 117, 215, 0.32),
        0 0 26px rgba(77, 168, 255, 0.16);
}

/* Reduced motion : on garde un léger feedback mais sans animation longue */
@media (prefers-reduced-motion: reduce) {
    .service-card,
    .pricing-card,
    .service-card .service-icon {
        transition: none !important;
    }
    .service-card:hover,
    .pricing-card:hover {
        transform: none !important;
    }
    .service-card:hover .service-icon {
        transform: none !important;
    }
}

/* ─────────────────────────────────────────────────────────────
   3. EFFET "SHINE" SUR LES BOUTONS CTA
   Bande lumineuse qui traverse de gauche à droite au survol.
   ───────────────────────────────────────────────────────────── */
.cta-primary,
.cta-secondary,
.pricing-cta,
.qcalc-cta,
.submit-btn,
.calc-result-cta,
.teleassist-download {
    position: relative;
    overflow: hidden;
    isolation: isolate; /* assure l'empilement correct du ::before */
}

.cta-primary::before,
.cta-secondary::before,
.pricing-cta::before,
.qcalc-cta::before,
.submit-btn::before,
.calc-result-cta::before,
.teleassist-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        100deg,
        transparent 30%,
        rgba(255, 255, 255, 0.28) 50%,
        transparent 70%
    );
    transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1;
}

.cta-primary:hover::before,
.cta-secondary:hover::before,
.pricing-cta:hover::before,
.qcalc-cta:hover::before,
.submit-btn:hover::before,
.calc-result-cta:hover::before,
.teleassist-download:hover::before,
.cta-primary:focus-visible::before,
.cta-secondary:focus-visible::before,
.pricing-cta:focus-visible::before,
.qcalc-cta:focus-visible::before,
.submit-btn:focus-visible::before,
.calc-result-cta:focus-visible::before,
.teleassist-download:focus-visible::before {
    left: 120%;
}

/* Le contenu des boutons doit rester au-dessus du shine */
.cta-primary > *,
.cta-secondary > *,
.pricing-cta > *,
.qcalc-cta > *,
.submit-btn > *,
.calc-result-cta > *,
.teleassist-download > * {
    position: relative;
    z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
    .cta-primary::before,
    .cta-secondary::before,
    .pricing-cta::before,
    .qcalc-cta::before,
    .submit-btn::before,
    .calc-result-cta::before,
    .teleassist-download::before {
        display: none !important;
    }
}

/* ─────────────────────────────────────────────────────────────
   4. CARTE LEAFLET — attribution lisible quel que soit le thème
   Les tuiles CartoDB sont gérées dans script.js (Dark Matter / Positron).
   ───────────────────────────────────────────────────────────── */
.leaflet-control-attribution {
    background: rgba(0, 0, 0, 0.55) !important;
    color: rgba(255, 255, 255, 0.85) !important;
}
.leaflet-control-attribution a {
    color: rgba(173, 216, 255, 0.95) !important;
}

body.light-mode .leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.85) !important;
    color: rgba(0, 0, 0, 0.7) !important;
}
body.light-mode .leaflet-control-attribution a {
    color: var(--secondary, #005faf) !important;
}

/* ─────────────────────────────────────────────────────────────
   5. MOCKUP ÉCRAN — section Téléassistance
   Illustration animée d'une connexion sécurisée.
   ───────────────────────────────────────────────────────────── */
.ta-mockup {
    max-width: 620px;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
}

.ta-screen {
    border-radius: 12px;
    overflow: hidden;
    background: #0d0f14;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 30px 60px -20px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(77, 168, 255, 0.06);
    font-family: 'JetBrains Mono', 'Consolas', monospace;
}

/* ── Version mode clair : "écran lumineux" plutôt que terminal sombre ── */
body.light-mode .ta-screen {
    background: #f8fafc;
    border-color: rgba(0, 117, 215, 0.18);
    box-shadow:
        0 20px 40px -15px rgba(0, 117, 215, 0.18),
        0 0 0 1px rgba(0, 117, 215, 0.08);
}

/* Barre de titre style macOS */
.ta-screen-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 0.95rem;
    background: linear-gradient(180deg, #1c1f27 0%, #14171d 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.light-mode .ta-screen-bar {
    background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.ta-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ta-dot-red    { background: #ff5f57; }
.ta-dot-yellow { background: #febc2e; }
.ta-dot-green  { background: #28c840; }

.ta-screen-title {
    margin-left: auto;
    margin-right: auto;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    /* Compense le décalage des dots pour rester centré visuellement */
    padding-right: 60px;
}

body.light-mode .ta-screen-title {
    color: rgba(26, 32, 44, 0.5);
}

/* Corps de l'écran */
.ta-screen-body {
    padding: 1.4rem 1.5rem 1.6rem;
    color: #d1d5db;
}

body.light-mode .ta-screen-body {
    color: #475569;
}

.ta-screen-status {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.95rem;
    color: #4da8ff;
    font-size: 0.95rem;
    font-weight: 600;
}

body.light-mode .ta-screen-status,
body.light-mode .ta-screen-text {
    color: var(--secondary, #005faf);
}

.ta-screen-lock {
    color: #4da8ff;
    /* Petite pulsation en harmonie avec le statut "en cours" */
    animation: ta-lock-pulse 2.2s ease-in-out infinite;
}

body.light-mode .ta-screen-lock {
    color: var(--secondary, #005faf);
}

@keyframes ta-lock-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.6; }
}

.ta-screen-text {
    color: #4da8ff;
}

/* Barre de progression */
.ta-screen-progress {
    height: 4px;
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 1.2rem;
}

body.light-mode .ta-screen-progress {
    background: rgba(0, 117, 215, 0.10);
}

.ta-screen-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0075d7, #4da8ff, #22c55e);
    background-size: 200% 100%;
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(77, 168, 255, 0.5);
    animation:
        ta-progress 4.5s ease-in-out infinite,
        ta-shimmer  2s   linear      infinite;
}

@keyframes ta-progress {
    0%   { width:   0%; }
    20%  { width:  35%; }
    50%  { width:  68%; }
    85%  { width:  95%; }
    100% { width: 100%; }
}

@keyframes ta-shimmer {
    0%   { background-position:  200% 0; }
    100% { background-position: -200% 0; }
}

/* Logs apparaissant les uns après les autres */
.ta-screen-log {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.72);
}

body.light-mode .ta-screen-log {
    color: rgba(26, 32, 44, 0.72);
}

.ta-screen-log li {
    opacity: 0;
    transform: translateY(4px);
    animation: ta-log-in 0.5s ease-out forwards;
}

.ta-log-1 { animation-delay: 0.4s; }
.ta-log-2 { animation-delay: 1.2s; }
.ta-log-3 { animation-delay: 2.0s; }
.ta-log-4 { animation-delay: 2.8s; color: #22c55e; font-weight: 600; }

body.light-mode .ta-log-4 { color: #15803d; }

@keyframes ta-log-in {
    to { opacity: 1; transform: translateY(0); }
}

/* Reduced motion : animations coupées, contenu visible immédiatement */
@media (prefers-reduced-motion: reduce) {
    .ta-screen-lock,
    .ta-screen-progress-bar {
        animation: none !important;
    }
    .ta-screen-progress-bar {
        width: 100% !important;
    }
    .ta-screen-log li {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

@media (max-width: 600px) {
    .ta-screen-title { padding-right: 0; font-size: 0.65rem; }
    .ta-screen-body { padding: 1.1rem 1.1rem 1.3rem; }
    .ta-screen-log { font-size: 0.78rem; }
}

/* ─────────────────────────────────────────────────────────────
   6. MODE CLAIR — Visibilité des champs formulaire & options
   Les bordures par défaut sont trop pâles sur fond bleuté clair.
   ───────────────────────────────────────────────────────────── */

/* ── Champs du formulaire de contact ── */
body.light-mode .form-group input,
body.light-mode .form-group textarea {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1.5px solid rgba(0, 117, 215, 0.22) !important;
    color: #1a202c !important;
}

body.light-mode .form-group input:hover:not(:focus),
body.light-mode .form-group textarea:hover:not(:focus) {
    border-color: rgba(0, 117, 215, 0.42) !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

body.light-mode .form-group input:focus,
body.light-mode .form-group textarea:focus {
    background: #ffffff !important;
    border-color: var(--secondary, #005faf) !important;
}

/* Le placeholder doit aussi être visible (sans concurrencer le label) */
body.light-mode .form-group input::placeholder,
body.light-mode .form-group textarea::placeholder {
    color: rgba(26, 32, 44, 0.35);
}

/* Checkbox RGPD plus contrastée en mode clair */
body.light-mode #rgpdConsent,
body.light-mode .consent-label input[type="checkbox"] {
    accent-color: var(--secondary, #005faf);
    width: 18px;
    height: 18px;
}

/* ── Options du calculateur (non sélectionnées) ── */
body.light-mode .qcalc-option:not(.is-selected) {
    background: rgba(255, 255, 255, 0.75) !important;
    border-color: rgba(0, 117, 215, 0.20) !important;
}

body.light-mode .qcalc-option:not(.is-selected):hover {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 117, 215, 0.45) !important;
}

/* Récap + sections du calculateur */
body.light-mode .qcalc-recap {
    background: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(0, 117, 215, 0.18) !important;
}

body.light-mode .qcalc-recap-list li {
    border-bottom-color: rgba(0, 117, 215, 0.10) !important;
}

/* ── Nav links et menu mobile ── */
body.light-mode .nav-links a {
    color: #1a202c;
}
body.light-mode .nav-links a:hover {
    color: var(--secondary, #005faf);
}

body.light-mode .mobile-link {
    color: #1a202c;
}
body.light-mode .mobile-link:hover,
body.light-mode .mobile-link:focus-visible {
    background: rgba(0, 117, 215, 0.08);
    color: var(--secondary, #005faf);
}

/* ── Cards glass en mode clair : bordure légèrement plus marquée ── */
body.light-mode .glass {
    border: 1px solid rgba(0, 117, 215, 0.18);
}

/* ─────────────────────────────────────────────────────────────
   ⚙️ ENGRENAGE — fix du clignotement
   Le filter:drop-shadow() au repos se recompose à chaque frame
   à cause des orbes flottantes qui passent derrière → flicker.
   On le retire au repos, on le garde au hover.
   ───────────────────────────────────────────────────────────── */
.settings-toggle {
    filter: none !important;
    will-change: transform;
}

.settings-toggle:hover,
.settings-toggle:focus-visible {
    filter: drop-shadow(0 0 12px rgba(77, 168, 255, 0.5)) !important;
}

/* ─────────────────────────────────────────────────────────────
   🌗 ÉLÉMENTS DE FOND — affichage exclusif selon le thème
   Empêche le cumul particules (sombre) + code rain (clair) au
   switch entre les modes.
   ───────────────────────────────────────────────────────────── */
body.light-mode .particles-container,
body.light-mode .bg-orb,
body.light-mode .bg-orb-1,
body.light-mode .bg-orb-2 {
    display: none !important;
}

body.dark-mode #code-rain-canvas {
    display: none !important;
}

/* ─────────────────────────────────────────────────────────────
   🩺 GRILLE DES SYMPTÔMES — page service (depannage.php, etc.)
   Boutons-cards avec icône + texte, lisibles dans les deux modes.
   ───────────────────────────────────────────────────────────── */
.symptom-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.7rem;
}

.symptom-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 1.1rem;
    background: rgba(77, 168, 255, 0.06);
    border: 1.5px solid rgba(77, 168, 255, 0.25);
    border-radius: 12px;
    font-size: 0.92rem;
    line-height: 1.4;
    color: var(--text-color);
    transition:
        transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.symptom-item:hover {
    transform: translateY(-2px);
    background: rgba(77, 168, 255, 0.12);
    border-color: rgba(77, 168, 255, 0.55);
    box-shadow: 0 6px 16px -4px rgba(0, 117, 215, 0.3);
}

.symptom-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
}

/* Mode clair : bordures et fond plus marqués pour rester lisible */
body.light-mode .symptom-item {
    background: #ffffff;
    border-color: rgba(0, 117, 215, 0.3);
    box-shadow: 0 2px 8px rgba(0, 117, 215, 0.08);
}

body.light-mode .symptom-item:hover {
    background: rgba(0, 117, 215, 0.05);
    border-color: rgba(0, 117, 215, 0.55);
    box-shadow: 0 8px 20px -6px rgba(0, 117, 215, 0.25);
}

body.light-mode .symptom-icon {
    background: rgba(0, 117, 215, 0.08);
}

@media (prefers-reduced-motion: reduce) {
    .symptom-item { transition: none !important; }
    .symptom-item:hover { transform: none !important; }
}

/* ─────────────────────────────────────────────────────────────
   📄 BREADCRUMB — fil d'Ariane des pages dédiées (depannage, etc.)
   ───────────────────────────────────────────────────────────── */
.breadcrumb {
    display: block;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    opacity: 0.7;
}

.breadcrumb a {
    color: var(--accent, #4da8ff);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
    color: var(--text-color, #fff);
    text-decoration: underline;
    text-underline-offset: 3px;
}

body.light-mode .breadcrumb a {
    color: var(--secondary, #005faf);
}

/* ─────────────────────────────────────────────────────────────
   🔗 LIEN "En savoir plus" sur les cartes services
   Renvoie vers la page dédiée du service.
   ───────────────────────────────────────────────────────────── */

/* Le ::before des service-cards couvre toute la carte avec position absolute,
   ce qui intercepte les clics. On le rend inerte pour laisser passer les events. */
.service-card::before {
    pointer-events: none !important;
}

.service-link {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    /* margin-top:auto pousse le bouton en bas de la carte (grille en
       align-items:stretch par défaut → toutes les cartes d'une même
       rangée ont la même hauteur, donc les boutons s'alignent). */
    margin-top: auto;
    padding: 0.7rem 1rem;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent, #4da8ff);
    text-decoration: none;
    background: transparent;
    border: 1.5px solid rgba(77, 168, 255, 0.3);
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.service-link:hover,
.service-link:focus-visible {
    background: rgba(77, 168, 255, 0.12);
    border-color: var(--accent, #4da8ff);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -4px rgba(0, 117, 215, 0.3);
}

/* Sur la carte "service phare" qui a un .service-card-body wrapper :
   le lien doit prendre toute la largeur du body, pas juste le texte.
   On force le body en flex-column hauteur 100% pour que le margin-top:auto
   du .service-link colle aussi le bouton en bas de cette carte-là. */
.service-card.service-featured .service-card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.service-card.service-featured .service-link {
    margin-top: auto;
}

/* ────────────────────────────────────────────────────────────
   Cluster d'actions en bas d'une carte service
   Utilisé sur la carte Cybersécurité pour grouper :
     - le mini-CTA "Audit gratuit" (lead magnet, en vedette)
     - le bouton "En savoir plus →" (lien classique vers la page)
   Le wrapper prend margin-top:auto pour rester collé en bas
   (le margin-top:auto du .service-link à l'intérieur devient
   un no-op puisque le contexte flex n'a plus d'espace libre).
   ──────────────────────────────────────────────────────────── */
.service-card-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Mini-CTA audit cybersécurité — encart discret en bas de la carte.
   Volontairement sobre pour ne pas concurrencer le titre "Cybersécurité"
   ni le bouton principal "En savoir plus" — c'est une option visible,
   pas un appel à l'action criard. */
.audit-mini-cta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
    padding: 0.6rem 0.85rem;
    background: rgba(77, 168, 255, 0.05);
    border: 1px solid rgba(77, 168, 255, 0.16);
    border-radius: 10px;
    position: relative;
    z-index: 2;
    transition:
        background 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
        border-color 0.2s,
        transform 0.2s;
}
.audit-mini-cta:hover,
.audit-mini-cta:focus-visible {
    background: rgba(77, 168, 255, 0.1);
    border-color: rgba(77, 168, 255, 0.38);
    transform: translateX(2px);
}
.audit-mini-cta-icon {
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.75;
}
.audit-mini-cta-content {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}
.audit-mini-cta-title {
    font-weight: 500;
    font-size: 0.85rem;
    color: #4da8ff;
}
.audit-mini-cta-sub {
    font-size: 0.72rem;
    opacity: 0.55;
}
.audit-mini-cta-arrow {
    font-size: 1rem;
    color: #4da8ff;
    opacity: 0.7;
    flex-shrink: 0;
    transition: transform 0.2s, opacity 0.2s;
}
.audit-mini-cta:hover .audit-mini-cta-arrow {
    transform: translateX(3px);
    opacity: 1;
}

/* Light mode : ajustements de contraste */
body.light-mode .audit-mini-cta {
    background: rgba(0, 117, 215, 0.04);
    border-color: rgba(0, 117, 215, 0.16);
}
body.light-mode .audit-mini-cta:hover,
body.light-mode .audit-mini-cta:focus-visible {
    background: rgba(0, 117, 215, 0.09);
    border-color: rgba(0, 117, 215, 0.35);
}
body.light-mode .audit-mini-cta-title,
body.light-mode .audit-mini-cta-arrow {
    color: #0075d7;
}

body.light-mode .service-link {
    color: var(--secondary, #005faf);
    border-color: rgba(0, 95, 175, 0.3);
}
body.light-mode .service-link:hover,
body.light-mode .service-link:focus-visible {
    background: rgba(0, 95, 175, 0.08);
    border-color: var(--secondary, #005faf);
    box-shadow: 0 6px 16px -4px rgba(0, 95, 175, 0.25);
}

/* ─────────────────────────────────────────────────────────────
   📱 LIEN "En savoir plus" dans la liste mobile services
   Visible uniquement quand l'accordéon est ouvert (svc-row-desc).
   ───────────────────────────────────────────────────────────── */
.svc-row-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.8rem;
    padding: 0.65rem 1rem;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent, #4da8ff);
    text-decoration: none;
    background: rgba(77, 168, 255, 0.08);
    border: 1.5px solid rgba(77, 168, 255, 0.35);
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.svc-row-link:hover,
.svc-row-link:focus-visible {
    background: rgba(77, 168, 255, 0.18);
    border-color: var(--accent, #4da8ff);
    transform: translateY(-1px);
}
body.light-mode .svc-row-link {
    color: var(--secondary, #005faf);
    background: rgba(0, 95, 175, 0.06);
    border-color: rgba(0, 95, 175, 0.3);
}
body.light-mode .svc-row-link:hover,
body.light-mode .svc-row-link:focus-visible {
    background: rgba(0, 95, 175, 0.12);
    border-color: var(--secondary, #005faf);
}

/* ─────────────────────────────────────────────────────────────
   📊 SECTION AVANT / APRÈS — comparatif visuel des résultats
   Cartes côte à côte (rouge / vert), flèche au milieu en desktop.
   ───────────────────────────────────────────────────────────── */
.before-after {
    padding: 5rem 0;
    position: relative;
}

.before-after .section-sub {
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 1rem;
    max-width: 50ch;
    margin: 0.6rem auto 2.5rem;
    line-height: 1.6;
}

.ba-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: center;
    max-width: 980px;
    margin: 0 auto;
}

.ba-card {
    padding: 2rem 1.8rem;
    border-radius: 18px;
    transition:
        transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.4s ease;
}

.ba-card:hover {
    transform: translateY(-4px);
}

.ba-before {
    border-color: rgba(239, 68, 68, 0.3) !important;
    background:
        linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(220, 38, 38, 0.03)),
        rgba(255, 255, 255, 0.04) !important;
    box-shadow: 0 12px 30px -12px rgba(239, 68, 68, 0.25);
}

.ba-after {
    border-color: rgba(34, 197, 94, 0.35) !important;
    background:
        linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(22, 163, 74, 0.03)),
        rgba(255, 255, 255, 0.04) !important;
    box-shadow: 0 12px 30px -12px rgba(34, 197, 94, 0.25);
}

/* Mode clair : fond blanc plus opaque + bordures plus contrastées
   pour rester parfaitement lisible sur fond bleuté clair. */
body.light-mode .ba-before {
    background: #ffffff !important;
    border: 1.5px solid rgba(220, 38, 38, 0.45) !important;
    box-shadow: 0 8px 24px -8px rgba(220, 38, 38, 0.25);
}

body.light-mode .ba-after {
    background: #ffffff !important;
    border: 1.5px solid rgba(22, 163, 74, 0.45) !important;
    box-shadow: 0 8px 24px -8px rgba(22, 163, 74, 0.25);
}

/* Léger fond teinté en haut de la carte pour différencier visuellement */
body.light-mode .ba-before .ba-card-head {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.08), transparent);
    margin: -2rem -1.8rem 1.5rem;
    padding: 1.5rem 1.8rem 1rem;
    border-radius: 18px 18px 0 0;
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

body.light-mode .ba-after .ba-card-head {
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.08), transparent);
    margin: -2rem -1.8rem 1.5rem;
    padding: 1.5rem 1.8rem 1rem;
    border-radius: 18px 18px 0 0;
    border-bottom: 1px solid rgba(22, 163, 74, 0.2);
}

body.light-mode .ba-list li {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.ba-card-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-mode .ba-card-head {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.ba-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex-shrink: 0;
}

.ba-icon-bad {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.ba-icon-good {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.ba-card h3 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-color);
}

.ba-before h3 { color: #ef4444; }
.ba-after  h3 { color: #22c55e; }

body.light-mode .ba-before h3 { color: #b91c1c; }
body.light-mode .ba-after  h3 { color: #15803d; }

.ba-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ba-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
    font-size: 0.95rem;
}

body.light-mode .ba-list li {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.ba-list li:last-child {
    border-bottom: none;
}

.ba-stat {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    flex-shrink: 0;
    min-width: 90px;
}

.ba-before .ba-stat { color: #ef4444; }
.ba-after  .ba-stat { color: #22c55e; }

body.light-mode .ba-before .ba-stat { color: #b91c1c; }
body.light-mode .ba-after  .ba-stat { color: #15803d; }

.ba-label {
    color: var(--text-color);
    opacity: 0.75;
    text-align: right;
    font-size: 0.92rem;
}

/* Flèche entre les 2 cartes (desktop uniquement) */
.ba-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent, #4da8ff);
    animation: ba-arrow-bounce 2.5s ease-in-out infinite;
}

@keyframes ba-arrow-bounce {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(8px); }
}

@media (prefers-reduced-motion: reduce) {
    .ba-arrow { animation: none !important; }
}

.ba-note {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.6;
    font-style: italic;
}

/* Responsive : section masquée en mobile (peu lisible empilée) */
@media (max-width: 768px) {
    .before-after {
        display: none !important;
    }
}

/* ─────────────────────────────────────────────────────────────
   X. SCROLL REVEAL — fade-in + slide-up à l'entrée du viewport
   Géré par scroll-reveal.js qui ajoute la classe .is-revealed.
   ───────────────────────────────────────────────────────────── */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ─────────────────────────────────────────────────────────────
   X+1. INDICATEUR DE SAISIE — bordures vertes sur champs valides
   Pseudo-classe :valid + :not(:placeholder-shown) : le champ est
   à la fois rempli ET au bon format (email, téléphone, etc.).
   ───────────────────────────────────────────────────────────── */
.form-group input:valid:not(:placeholder-shown):not(:focus),
.form-group textarea:valid:not(:placeholder-shown):not(:focus) {
    border-color: rgba(34, 197, 94, 0.55) !important;
    background: rgba(34, 197, 94, 0.04) !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.06);
}

/* Label flottant en vert quand le champ est valide */
.form-group input:valid:not(:placeholder-shown) ~ label,
.form-group textarea:valid:not(:placeholder-shown) ~ label {
    color: #22c55e !important;
}

body.light-mode .form-group input:valid:not(:placeholder-shown) ~ label,
body.light-mode .form-group textarea:valid:not(:placeholder-shown) ~ label {
    color: #15803d !important;
}

/* Petit ✓ vert qui apparaît à droite du champ valide
   (pseudo-element sur le label, qui est positionné absolument) */
.form-group {
    position: relative;
}

.form-group input:valid:not(:placeholder-shown) ~ label::after,
.form-group textarea:valid:not(:placeholder-shown) ~ label::after {
    content: ' ✓';
    color: #22c55e;
    margin-left: 0.3rem;
    font-weight: 700;
}

/* On NE déclenche pas le vert sur le champ téléphone (facultatif).
   Le sélecteur :required permet de cibler uniquement les requis. */
.form-group input:not(:required):valid:not(:placeholder-shown) {
    border-color: var(--glass-border) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    box-shadow: none !important;
}
.form-group input:not(:required):valid:not(:placeholder-shown) ~ label {
    color: var(--text-color) !important;
    opacity: 0.5;
}
.form-group input:not(:required):valid:not(:placeholder-shown) ~ label::after {
    content: '' !important;
}

/* ─────────────────────────────────────────────────────────────
   8. PRICING — Pastille "Économisez X €" sur la carte featured
   Petit badge jaune doré au-dessus du titre, avec animation discrète.
   ───────────────────────────────────────────────────────────── */
.pricing-card.featured {
    position: relative;
}

.pricing-savings {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.5rem 0 0.85rem;
    padding: 0.32rem 0.85rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
    border: 1px solid rgba(245, 158, 11, 0.5);
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow:
        0 4px 12px rgba(245, 158, 11, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset;
    /* Petite pulsation pour attirer l'œil sans être agressif */
    animation: pricing-savings-pulse 3s ease-in-out infinite;
}

.pricing-savings svg {
    color: #78350f;
    flex-shrink: 0;
}

@keyframes pricing-savings-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 4px 12px rgba(245, 158, 11, 0.35),
            0 0 0 1px rgba(255, 255, 255, 0.3) inset;
    }
    50% {
        transform: scale(1.04);
        box-shadow:
            0 6px 16px rgba(245, 158, 11, 0.5),
            0 0 0 1px rgba(255, 255, 255, 0.4) inset,
            0 0 24px rgba(251, 191, 36, 0.4);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pricing-savings {
        animation: none !important;
    }
}

/* ─────────────────────────────────────────────────────────────
   9. SVC-ROW MOBILE — design "pricing card" avec icône colorée
   et dégradé subtil. Animation d'expansion plus fluide pour la
   description.
   ───────────────────────────────────────────────────────────── */
.svc-row {
    background: linear-gradient(
        135deg,
        rgba(77, 168, 255, 0.05) 0%,
        rgba(0, 117, 215, 0.02) 100%
    );
    transition:
        transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

body.light-mode .svc-row {
    background: linear-gradient(
        135deg,
        rgba(0, 117, 215, 0.06) 0%,
        rgba(77, 168, 255, 0.02) 100%
    );
}

.svc-row:hover,
.svc-row:focus-within {
    transform: translateX(4px);
    border-color: rgba(77, 168, 255, 0.45);
    background: linear-gradient(
        135deg,
        rgba(77, 168, 255, 0.10) 0%,
        rgba(0, 117, 215, 0.05) 100%
    );
    box-shadow: 0 6px 18px -6px rgba(0, 117, 215, 0.3);
}

.svc-row.open {
    background: linear-gradient(
        135deg,
        rgba(77, 168, 255, 0.14) 0%,
        rgba(0, 117, 215, 0.06) 100%
    );
    border-color: rgba(77, 168, 255, 0.45);
    box-shadow: 0 8px 24px -8px rgba(0, 117, 215, 0.35);
}

body.light-mode .svc-row.open {
    background: linear-gradient(
        135deg,
        rgba(0, 117, 215, 0.12) 0%,
        rgba(77, 168, 255, 0.05) 100%
    );
    border-color: rgba(0, 117, 215, 0.4);
}

/* Icône : cercle gradient bleu primary→accent avec ombre */
.svc-row-emoji {
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, var(--primary, #0075d7), var(--accent, #4da8ff)) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    color: #ffffff !important;
    box-shadow:
        0 4px 12px rgba(0, 117, 215, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.svc-row-emoji svg {
    width: 18px !important;
    height: 18px !important;
    color: #ffffff !important;
    stroke: #ffffff !important;
}

.svc-row.open .svc-row-emoji,
.svc-row:hover .svc-row-emoji {
    transform: scale(1.08) rotate(-3deg);
}

/* Flèche : couleur accent + animation plus douce */
.svc-row-arrow {
    color: var(--accent, #4da8ff);
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    font-size: 1.4rem;
    font-weight: 300;
}

body.light-mode .svc-row-arrow {
    color: var(--secondary, #005faf);
}

/* Description : animation max-height plus fluide */
.svc-row-desc {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    transition:
        max-height 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 0.35s ease,
        padding 0.35s ease,
        margin 0.35s ease;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.svc-row.open + .svc-row-desc {
    max-height: 250px;
    opacity: 1;
    padding-top: 0.7rem !important;
    padding-bottom: 0.9rem !important;
    margin-bottom: 0.6rem !important;
}

@media (prefers-reduced-motion: reduce) {
    .svc-row,
    .svc-row-emoji,
    .svc-row-arrow,
    .svc-row-desc {
        transition: none !important;
    }
    .svc-row:hover,
    .svc-row.open .svc-row-emoji,
    .svc-row:hover .svc-row-emoji {
        transform: none !important;
    }
}
