/*
 * djangui_public.css
 * Styles de la face publique (vitrine) — Sprint 4.5A
 * N'affecte PAS les pages app (base.html) — toutes les classes sont préfixées "public-" ou spécifiques
 */

/* ============================================================
   VARIABLES LOCALES (héritent des variables de ParametresSite)
   ============================================================ */
:root {
  --public-navbar-height: 70px;
  --public-section-py:    6rem;
  --public-radius:        1rem;
  --public-radius-lg:     1.5rem;
  --public-shadow:        0 4px 24px rgba(79, 70, 229, 0.08);
  --public-shadow-lg:     0 12px 48px rgba(79, 70, 229, 0.15);

  /* Couleurs soft (fallback si ParametresSite non chargé) */
  --color-primary-soft:   #eef2ff;
  --color-success-soft:   #f0fdf4;
  --color-warning-soft:   #fffbeb;
  --color-info-soft:      #eff6ff;
  --color-purple-soft:    #f5f3ff;
}

/* ============================================================
   RESET BODY PUBLIC
   ============================================================ */
.public-body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #ffffff;
  color: #0f172a;
  line-height: 1.7;
}

/* Compenser la navbar fixed */
.public-main {
  padding-top: var(--public-navbar-height);
}

.py-section {
  padding-top:    var(--public-section-py);
  padding-bottom: var(--public-section-py);
}


/* ============================================================
   NAVBAR PUBLIQUE
   ============================================================ */
.navbar-public {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(79, 70, 229, 0.08);
  height: var(--public-navbar-height);
  transition: all 0.3s ease;
}

.navbar-public.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 20px rgba(79, 70, 229, 0.1);
}

.navbar-public .navbar-brand {
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
}

.navbar-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
}

.navbar-public .nav-link {
  color: #475569;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem !important;
  border-radius: 8px;
  transition: all 0.2s;
}

.navbar-public .nav-link:hover {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

/* Boutons navbar */
.navbar-public .btn-outline-primary {
  border-color: var(--color-primary);
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 500;
}

.navbar-public .btn-outline-primary:hover {
  background: var(--color-primary);
  color: white;
}

.navbar-public .btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
}


/* ============================================================
   SECTION HERO
   ============================================================ */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4c1d95 100%);
  min-height: 100vh;
  overflow: hidden;
  padding-top: var(--public-navbar-height);
}

/* Formes décoratives flottantes */
.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; }

.hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

.hero-shape-1 {
  width: 600px; height: 600px;
  top: -200px; right: -100px;
  animation: float-shape 8s ease-in-out infinite;
}

.hero-shape-2 {
  width: 300px; height: 300px;
  bottom: 100px; left: -50px;
  animation: float-shape 6s ease-in-out infinite reverse;
}

.hero-shape-3 {
  width: 150px; height: 150px;
  top: 40%; left: 30%;
  opacity: 0.08;
  animation: float-shape 10s ease-in-out infinite;
}

@keyframes float-shape {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-30px) rotate(15deg); }
}

/* Badge hero */
.hero-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
}

/* Titre hero */
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.text-gradient {
  background: linear-gradient(135deg, #a78bfa, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 2.5rem;
  max-width: 520px;
}

/* CTA Hero */
.hero-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-hero-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  transition: all 0.3s ease;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.5);
  color: white;
}

.btn-hero-outline {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.875rem 2rem;
  border-radius: 12px;
  font-weight: 500;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.btn-hero-outline:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* Trust badges */
.hero-trust {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

/* Illustration hero */
.hero-illustration {
  position: relative;
  width: 380px;
  height: 420px;
}

.hero-main-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: var(--public-radius-lg);
  padding: 2rem;
  box-shadow: var(--public-shadow-lg);
  width: 260px;
  text-align: center;
}

.hero-main-card-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  margin: 0 auto;
}

.hero-card-float {
  position: absolute;
  background: white;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: var(--public-shadow);
  z-index: 2;
  min-width: 180px;
  animation: float-card 5s ease-in-out infinite;
}

.hero-card-float-1 {
  top: 10%;
  right: -20px;
  animation-delay: 0s;
}

.hero-card-float-2 {
  bottom: 15%;
  left: -20px;
  animation-delay: -2.5s;
}

@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

.hero-mini-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Vague bas hero */
.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  line-height: 0;
}

.hero-wave svg {
  width: 100%;
  height: 80px;
}


/* ============================================================
   SECTION STATS
   ============================================================ */
.stat-item {
  padding: 1.5rem;
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.1;
}

.stat-label {
  color: #64748b;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}


/* ============================================================
   SECTION HEADERS (réutilisable)
   ============================================================ */
.section-header { max-width: 640px; margin-inline: auto; }

.section-tag {
  display: inline-block;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.section-subtitle {
  color: #64748b;
  font-size: 1.05rem;
}


/* ============================================================
   SECTION AVANTAGES
   ============================================================ */
.avantage-card {
  background: white;
  border: 1px solid #f1f5f9;
  border-radius: var(--public-radius);
  padding: 2rem;
  height: 100%;
  transition: all 0.3s ease;
}

.avantage-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--public-shadow);
  border-color: var(--color-primary-soft);
}

.avantage-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.avantage-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.6rem;
}

.avantage-desc {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0;
}

/* Couleurs soft backgrounds */
.bg-primary-soft { background-color: var(--color-primary-soft) !important; }
.bg-success-soft { background-color: var(--color-success-soft) !important; }
.bg-warning-soft { background-color: var(--color-warning-soft) !important; }
.bg-info-soft    { background-color: var(--color-info-soft)    !important; }
.bg-purple-soft  { background-color: var(--color-purple-soft)  !important; }


/* ============================================================
   SECTION HOW TO (étapes)
   ============================================================ */
.step-card {
  background: white;
  border-radius: var(--public-radius);
  padding: 2rem 1.5rem;
  text-align: center;
  height: 100%;
  position: relative;
  border: 1px solid #f1f5f9;
  transition: all 0.3s ease;
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--public-shadow);
}

.step-number {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.step-icon {
  width: 64px;
  height: 64px;
  background: var(--color-primary-soft);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-primary);
  margin: 0.5rem auto 1.25rem;
}

.step-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.6rem;
}

.step-desc {
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.65;
  margin: 0;
}


/* ============================================================
   SECTION TÉMOIGNAGES
   ============================================================ */
.temoignage-card {
  background: white;
  border-radius: var(--public-radius);
  padding: 2rem;
  border: 1px solid #f1f5f9;
  height: 100%;
  box-shadow: var(--public-shadow);
}

.temoignage-stars {
  color: #f59e0b;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  letter-spacing: 2px;
}

.temoignage-text {
  color: #334155;
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  position: relative;
}

.temoignage-text::before {
  content: '"';
  font-size: 3rem;
  color: var(--color-primary-soft);
  line-height: 0;
  vertical-align: -0.8rem;
  margin-right: 0.2rem;
  font-family: Georgia, serif;
  color: var(--color-primary);
  opacity: 0.3;
}

.temoignage-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.temoignage-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Contrôles carrousel custom */
.carousel-control-icon-custom {
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  box-shadow: var(--public-shadow);
  font-size: 0.875rem;
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  opacity: 1;
}

.carousel-control-prev { left: -60px; }
.carousel-control-next { right: -60px; }

.carousel-indicators-custom {
  bottom: -2.5rem;
}

.carousel-indicators-custom [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-primary);
  opacity: 0.3;
  border: none;
  transition: all 0.3s;
}

.carousel-indicators-custom .active {
  opacity: 1;
  width: 24px;
  border-radius: 4px;
}


/* ============================================================
   SECTION FAQ
   ============================================================ */
.faq-item {
  border: 1px solid #f1f5f9 !important;
  border-radius: var(--public-radius) !important;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-button {
  font-weight: 600;
  color: #0f172a;
  background: white;
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  border: none;
  box-shadow: none !important;
}

.faq-button:not(.collapsed) {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

.faq-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%234f46e5'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.faq-body {
  color: #64748b;
  padding: 1.25rem 1.5rem;
  line-height: 1.7;
  font-size: 0.925rem;
}


/* ============================================================
   SECTION CTA FINAL
   ============================================================ */
.cta-block {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  border-radius: 2rem;
  padding: 5rem 2rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-block::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.cta-icon {
  width: 72px;
  height: 72px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fbbf24;
  margin: 0 auto;
  backdrop-filter: blur(8px);
}

.cta-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
}

.cta-subtitle {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}


/* ============================================================
   PAGE HERO MINI (CGU, FAQ, Confidentialité, Contact)
   ============================================================ */
.page-hero-mini {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  padding: 5rem 0 3.5rem;
  margin-top: 0;
}

.page-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: white;
  margin-bottom: 0.75rem;
}

.page-hero-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.breadcrumb-public {
  background: transparent;
  margin: 0;
}

.breadcrumb-public .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
}

.breadcrumb-public .breadcrumb-item a:hover {
  color: white;
}

.breadcrumb-public .breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.9);
}

.breadcrumb-public .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.4);
}


/* ============================================================
   PAGES LÉGALES (CGU, Confidentialité)
   ============================================================ */
.legal-content {
  line-height: 1.8;
  color: #334155;
}

.legal-content h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
}

.legal-content h4:first-of-type {
  margin-top: 0;
  border-top: none;
}

.legal-content ul {
  padding-left: 1.5rem;
}

.legal-content ul li {
  margin-bottom: 0.4rem;
}

.legal-content a {
  color: var(--color-primary);
  text-decoration: underline;
}

.legal-toc {
  background: var(--color-primary-soft);
  border-radius: var(--public-radius);
  padding: 1.5rem;
  border-left: 4px solid var(--color-primary);
}

.legal-toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

.legal-toc li {
  margin-bottom: 0.3rem;
}

.legal-toc a {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.9rem;
}

.legal-toc a:hover {
  text-decoration: underline;
}

.legal-contact {
  background: var(--color-primary-soft);
  border-radius: var(--public-radius);
  padding: 1.25rem 1.5rem;
  color: #334155;
  font-size: 0.9rem;
}

.legal-contact a {
  color: var(--color-primary);
  font-weight: 500;
}


/* ============================================================
   PAGE CONTACT
   ============================================================ */
.contact-card {
  background: white;
  border: 1px solid #f1f5f9;
  border-radius: var(--public-radius-lg);
  padding: 2.5rem;
  box-shadow: var(--public-shadow);
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-info-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}


/* ============================================================
   FOOTER PUBLIC
   ============================================================ */
.footer-public {
  background: linear-gradient(135deg, #0f0e1a 0%, #1e1b4b 100%);
  padding: 4rem 0 2rem;
  margin-top: 0;
}

.footer-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.footer-social-link {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.footer-social-link:hover {
  background: var(--color-primary);
  color: white;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .py-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .hero-section {
    min-height: auto;
    padding-bottom: 6rem;
  }

  .hero-cta-group {
    flex-direction: column;
  }

  .btn-hero-primary,
  .btn-hero-outline {
    width: 100%;
    text-align: center;
  }

  .hero-trust {
    gap: 0.75rem;
  }

  .carousel-control-prev,
  .carousel-control-next {
    display: none;
  }

  .cta-block {
    padding: 3rem 1.5rem;
    border-radius: 1.25rem;
  }

  .contact-card {
    padding: 1.5rem;
  }

  .legal-toc {
    padding: 1.25rem;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2rem;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .step-card {
    padding: 1.75rem 1.25rem;
  }
}
