/* Variables de thème (Mode Sombre / Compact) */
:root {
  --bg-base: #0f1115; /* Noir profond (Onyx) */
  --bg-surface: #1a1d24; /* Gris anthracite pour les cartes */
  --text-main: #f8fafc; /* Blanc cassé lisible */
  --text-muted: #94a3b8; /* Gris pour les textes secondaires */
  --accent: #38bdf8; /* Bleu tech professionnel */
  --radius-lg: 16px; /* Arrondis doux pour les sections */
  --radius-btn: 10px; /* Arrondis précis pour les boutons */
  --border-subtle: 1px solid rgba(255, 255, 255, 0.08);
}

/* Réinitialisation compacte */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.5;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* En-tête */
.navbar {
  background: rgba(15, 17, 21, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.brand-logo {
  color: var(--text-main);
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 1px;
}

.brand-logo span {
  color: var(--accent);
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 20px;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-main);
}

/* Boutons */
.btn-primary,
.btn-secondary,
.btn-whatsapp {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background-color: var(--accent);
  color: #0f1115;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border: var(--border-subtle);
}

.btn-secondary:hover {
  background-color: var(--bg-surface);
}

.btn-whatsapp {
  background-color: #25d366; /* Vert officiel WhatsApp */
  color: #000;
  width: 100%;
}

/* Sections Globales (Compactes) */
section {
  padding: 60px 0;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 30px;
  text-align: center;
}

/* Hero Section */
.hero-content {
  text-align: center;
  max-width: 700px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  line-height: 1.2;
}

.hero p {
  color: var(--text-muted);
  margin-bottom: 25px;
}

.highlight {
  color: var(--accent);
}

.hero-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* Grilles (Services & News) */
.services-grid,
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* Cartes (Le Radius "Apple" / "Stripe") */
.service-card,
.news-card,
.ebook-preview {
  background-color: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 25px;
  transition: transform 0.2s;
}

.service-card:hover,
.news-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
}

.service-card .icon {
  font-size: 2rem;
  margin-bottom: 15px;
}

.service-card h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.service-card p,
.news-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* E-book Section */
.ebook-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.badge {
  background-color: rgba(56, 189, 248, 0.1);
  color: var(--accent);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.ebook-details h2 {
  margin: 15px 0;
  font-size: 2rem;
}

.ebook-features {
  list-style: none;
  margin: 20px 0;
}

.ebook-features li {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.pricing-block {
  background-color: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 25px;
}

.price-info {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

.price {
  font-size: 1.2rem;
  font-weight: bold;
}

.price-info small {
  color: var(--text-muted);
}

/* Footer */
.footer {
  border-top: var(--border-subtle);
  padding: 30px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Responsive pour Mobile */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 15px;
    padding-bottom: 15px;
  }

  .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }

  .nav-links a {
    margin-left: 0;
  }

  .ebook-container {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2rem;
  }
}

/* =========================================
   NOUVEAUX STYLES : ACCORDÉONS SERVICES
   ========================================= */
.accordion-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

details {
  background-color: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-btn);
  padding: 18px 20px;
  transition: all 0.2s ease;
}

details[open] {
  border-color: var(--accent);
  background-color: rgba(26, 29, 36, 0.8);
}

summary {
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-main);
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
}

details[open] summary::after {
  content: "−";
}

details p {
  margin-top: 15px;
  padding-top: 15px;
  border-top: var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* =========================================
   NOUVEAUX STYLES : BOUTON SERVICE DIRECT
   ========================================= */
.btn-service-direct {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 8px 16px;
  border-radius: var(--radius-btn);
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  margin-top: 15px;
  transition: all 0.2s ease;
}

.btn-service-direct:hover {
  background: var(--accent);
  color: #0f1115;
}

/* =========================================
   NOUVEAUX STYLES : FORMULAIRE & RÉASSURANCE
   ========================================= */
.diagnostic-form {
  background-color: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.form-group label {
  font-size: 0.9rem;
  color: var(--text-main);
  font-weight: 600;
}

.form-control {
  background-color: var(--bg-base);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 14px;
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.reassurance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.reassurance-card {
  background: rgba(255, 255, 255, 0.02);
  border: var(--border-subtle);
  border-radius: var(--radius-btn);
  padding: 25px;
  text-align: center;
}

.reassurance-card .icon {
  font-size: 2.2rem;
  margin-bottom: 15px;
}

/* =========================================
   PAGE ACTUALITÉS / RESSOURCES
   ========================================= */
.resource-hero {
  padding-bottom: 20px;
}

/* Barre de filtres */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.filter-btn {
  background-color: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 18px;
  border-radius: 30px; /* Style pilule */
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background-color: rgba(56, 189, 248, 0.1);
  color: var(--text-main);
}

.filter-btn.active {
  background-color: var(--accent);
  color: #0f1115;
  border-color: var(--accent);
}

/* Grille Responsive Exacte (CSS Grid) */
.resources-section {
  padding-top: 20px;
}

.resources-grid {
  display: grid;
  gap: 25px;
  /* 1 Colonne sur Mobile par défaut */
  grid-template-columns: 1fr;
}

/* 2 Colonnes sur Tablette */
@media (min-width: 768px) {
  .resources-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 3 Colonnes sur PC */
@media (min-width: 1024px) {
  .resources-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Design des Cartes Ressources */
.resource-card {
  background-color: var(--bg-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 25px;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  animation: fadeIn 0.4s ease forwards;
}

.resource-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Badges spécifiques par catégorie */
.resource-card .badge {
  align-self: flex-start;
  margin-bottom: 15px;
  margin-left: 0;
}
.badge-alert {
  background-color: rgba(239, 68, 68, 0.1); /* Rouge doux */
  color: #ef4444;
}
.badge-astuce {
  background-color: rgba(56, 189, 248, 0.1); /* Bleu SYLERA */
  color: var(--accent);
}
.badge-cas {
  background-color: rgba(34, 197, 94, 0.1); /* Vert doux */
  color: #22c55e;
}

.resource-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  line-height: 1.4;
  color: var(--text-main);
}

.resource-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1; /* Pousse le Call-to-action vers le bas */
}

.action-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

/* Animation d'apparition lors du filtrage */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   ANIMATIONS AU DÉFILEMENT (Style Premium)
   ========================================= */
.reveal {
  opacity: 0;
  transform: translateY(40px); /* Décalage vers le bas */
  /* Courbe cubic-bezier pour un effet de ralentissement en fin de mouvement (très Apple) */
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Délais pour créer un effet d'apparition en cascade sur les grilles */
.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
