/* Variables Mode Sombre Uniquement */
:root {
    --bg-color: #0b0f19;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #0ea5e9;
    --primary-glow: rgba(14, 165, 233, 0.4);
    --secondary: #8b5cf6;
    --surface: rgba(
        30,
        41,
        59,
        0.85
    ); /* Légèrement transparent pour voir le fond */
    --surface-hover: rgba(51, 65, 85, 0.9);
    --glass-bg: rgba(11, 15, 25, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(15, 23, 42, 0.9);

    /* Variable pour l'image de fond aléatoire */
    --bg-image: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Space Grotesk", sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    /* Image de fond avec overlay sombre */
    background-image:
        linear-gradient(var(--bg-color) 0%, rgba(11, 15, 25, 0.85) 100%),
        var(--bg-image);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Typography */
h1,
h2,
h3 {
    line-height: 1.2;
}
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease;
}
nav.scrolled {
    padding: 1rem 5%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}
.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}
.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}
.nav-links a:hover {
    color: var(--primary);
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    background: var(--primary);
    color: #fff !important;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}
.btn:hover {
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--text-color) !important;
}
.btn-outline:hover {
    background: var(--primary);
    color: #fff !important;
}

.burger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Sections */
section {
    padding: 8rem 5% 4rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Hero */
#hero {
    text-align: center;
    position: relative;
}
#hero::before {
    content: "";
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: var(--primary);
    filter: blur(150px);
    opacity: 0.2;
    z-index: -1;
}
#hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}
#hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    color: var(--text-muted);
}
.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Grid Services */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--surface);
    backdrop-filter: blur(5px);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}
.card p {
    color: var(--text-muted);
}

/* --- Grille des Tarifs --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

.pricing-card {
    background: var(--surface);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: all 0.35s ease;
}

.pricing-card:hover {
    transform: translateY(-7px);
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.15);
}

/* Carte mise en avant (Maintenance) */
.pricing-card.featured {
    border-color: rgba(14, 165, 233, 0.5);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.pricing-card.featured:hover {
    box-shadow: 0 18px 40px rgba(14, 165, 233, 0.25);
}

/* En-tête des cartes */
.pricing-header {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.8rem;
    margin-bottom: 1.8rem;
}

.pricing-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.pricing-badge.popular {
    background: rgba(14, 165, 233, 0.15);
    color: var(--primary);
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.pricing-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* Boîte de prix */
.price-box {
    margin-top: 0.5rem;
}

.price-from {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.price-amount {
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
}

.price-period {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-muted);
}

/* Liste de fonctionnalités */
.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    flex-grow: 1;
}

.pricing-features li {
    font-size: 0.95rem;
    color: var(--text-muted);
    padding-left: 1.6rem;
    position: relative;
    line-height: 1.5;
}

.pricing-features li strong {
    color: var(--text-color);
}

.pricing-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1rem;
}

/* Boutons d'action */
.pricing-btn {
    text-align: center;
    width: 100%;
    margin-top: auto;
}

/* Contact */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    justify-content: space-between;
}
.contact-info {
    flex: 1;
    min-width: 300px;
    padding: 2rem;
    background: var(--surface);
    backdrop-filter: blur(5px);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}
.contact-info p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}
.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}
.social-links a {
    color: var(--text-color);
    transition: color 0.3s;
}
.social-links a:hover {
    color: var(--primary);
}

form {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    background: var(--surface);
    backdrop-filter: blur(5px);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}
input,
textarea,
select {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s;
}
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
}
textarea {
    resize: vertical;
    min-height: 150px;
}

#form-message {
    display: none;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid #10b981;
    text-align: center;
}

/* AI Notice */
.ai-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: -0.2rem;
}
.ai-notice svg {
    color: var(--primary);
    flex-shrink: 0;
}

/* Footer avec copyright centré */
footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 2rem 5%;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    color: var(--text-muted);
    background: var(--bg-color);
    font-size: 0.9rem;
}
.footer-link {
    justify-self: start;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-link:hover {
    color: var(--primary);
}
footer p {
    grid-column: 2;
    text-align: center;
    white-space: nowrap;
}

/* Adaptation mobile */
@media (max-width: 768px) {
    footer {
        display: flex;
        flex-direction: column-reverse;
        gap: 0.75rem;
        text-align: center;
    }
    .footer-link {
        justify-self: center;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        right: -100%;
        background: var(--surface);
        width: 100%;
        flex-direction: column;
        padding: 2rem 0;
        border-bottom: 1px solid var(--border-color);
        transition: right 0.3s ease;
    }
    .nav-links.active {
        right: 0;
    }
    .burger {
        display: block;
    }
    section {
        padding-top: 6rem;
        min-height: auto;
    }
    .hero-btns {
        flex-direction: column;
    }
    .contact-wrapper {
        flex-direction: column;
    }
}

/* Animation de défilement des titres */
.title-anim {
    display: inline-block;
    transition:
        opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        filter 0.5s ease;
    will-change: opacity, transform, filter;
    min-height: 2.4em; /* Réserve l'espace vertical pour éviter les sauts de page */
}
.title-hidden {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
    filter: blur(5px);
}

/* ==========================================================================
   LECTEUR AUDIO FLOTTANT
   ========================================================================== */
.audio-player {
  position: fixed;
  bottom: 30px;
  right: 30px;
  left: auto;  /* Sécurité pour annuler l'ancien positionnement */
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 18px 8px 8px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.audio-player:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 12px 35px rgba(14, 165, 233, 0.25);
}

/* Bouton Play/Pause avec dégradé T-Labs */
.audio-toggle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary); /* Cyan uni #0ea5e9 */
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.audio-toggle-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 20px var(--primary-glow);
}

/* Halo lumineux quand la musique joue */
.audio-player.playing .audio-toggle-btn {
  box-shadow: 0 0 0 4px var(--primary-glow), 0 0 20px var(--primary-glow);
}

.audio-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.audio-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-color);
  line-height: 1;
}

/* Égaliseur audio dynamique */
.audio-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
}

.audio-bars span {
  width: 3px;
  background-color: var(--text-muted);
  border-radius: 2px;
  height: 3px;
  transition: all 0.3s ease;
}

/* Animation néon cyan active */
.audio-bars.active span {
  background-color: var(--primary);
  box-shadow: 0 0 6px var(--primary-glow);
  animation: equalize 1s infinite alternate ease-in-out;
}

.audio-bars.active span:nth-child(1) { animation-delay: 0.1s; }
.audio-bars.active span:nth-child(2) { animation-delay: 0.3s; animation-duration: 0.8s; }
.audio-bars.active span:nth-child(3) { animation-delay: 0.5s; animation-duration: 1.2s; }
.audio-bars.active span:nth-child(4) { animation-delay: 0.2s; animation-duration: 0.9s; }
.audio-bars.active span:nth-child(5) { animation-delay: 0.4s; animation-duration: 1.1s; }

@keyframes equalize {
  0% { height: 3px; }
  50% { height: 13px; }
  100% { height: 6px; }
}

/* Adaptation mobile */
@media (max-width: 768px) {
  .audio-player {
    bottom: 20px;
    right: 20px; /* <--- Anciennement left: 20px */
    left: auto;
    padding: 6px 14px 6px 6px;
  }

  .audio-toggle-btn {
    width: 36px;
    height: 36px;
  }
}

/* ==========================================================================
   PAGE MENTIONS LÉGALES (FOND SOMBRE PUR & CARTES AJUSTÉES)
   ========================================================================== */

/* 1. Suppression stricte de l'image de fond sur cette page */
body.page-legal {
  background-color: #0b0f19 !important;
  background-image: none !important;
}

/* 2. Barre de navigation allégée */
.nav-legal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.25rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
}

.back-btn {
  color: #f8fafc;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.25s ease;
}

.back-btn:hover {
  color: #0ea5e9;
}

/* 3. Conteneur principal bien proportionné */
.legal-container {
  max-width: 900px;
  margin: 7rem auto 4rem;
  padding: 0 5%;
}

/* 4. Titre centré sur 2 lignes */
.legal-title {
  text-align: center;
  font-size: clamp(2.2rem, 3.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 3.5rem;
  color: #f8fafc;
}

/* 5. Cartes opaques avec bordure et padding confortable */
.legal-card {
  min-height: auto !important;
  display: block !important;
  background: var(--surface, rgba(30, 41, 59, 0.85));
  backdrop-filter: blur(5px);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  padding: 2rem !important;
  margin-bottom: 2rem;
}

.legal-card h2 {
  font-size: 1.3rem;
  color: var(--primary, #0ea5e9);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-card p,
.legal-card ul {
  color: var(--text-muted, #94a3b8);
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}

.legal-card ul {
  list-style: none;
  padding-left: 0;
}

.legal-card ul li {
  margin-bottom: 0.5rem;
  padding-left: 1.2rem;
  position: relative;
}

.legal-card ul li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--primary, #0ea5e9);
}