/* ============================================
   CLÉS DE LA RÉUSSITE — Styles globaux
   Variables, reset, typo, header, footer, WhatsApp
   ============================================ */

/* --- Variables CSS --- */
:root {
  --primary: #1B365D;
  --primary-light: #2A5298;
  --accent: #C8A961;
  --accent-light: #E8D5A3;
  --warm: #F5F0E8;
  --warm-light: #FAF8F4;
  --bg-page: #FAF7F2; /* Beige clair pour tous les fonds — harmonie avec bleu */
  --white: #FFFFFF; /* Texte sur fonds colorés (boutons, footer) */
  --text-dark: #1A1A2E;
  --text-body: #4A4A5A;
  --text-light: #7A7A8A;
  --success: #2D8A4E;
  --border: #E2DDD5;
  --shadow: rgba(27, 54, 93, 0.08);
  --whatsapp: #25D366;
  --paypal: #0070BA;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-body);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary);
}

/* --- Typographie --- */
h1, h2, h3, h4 {
  font-family: "Playfair Display", serif;
  color: var(--text-dark);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

/* Soulignement doré pour les titres */
h2.accent-underline {
  position: relative;
  display: inline-block;
}

h2.accent-underline::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* --- Layout principal --- */
main {
  min-height: 60vh;
}

/* --- Header / Navigation --- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}

.header.scrolled {
  box-shadow: 0 2px 20px var(--shadow);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo (footer uniquement) */
.logo,
.footer-logo {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
}

.footer-logo {
  color: var(--white);
  font-size: 1.25rem;
}

.footer-logo .logo-accent {
  color: var(--accent-light);
}

.footer-logo .logo-key {
  color: var(--accent-light);
}

.footer-logo:hover {
  color: var(--accent-light);
}

.footer-logo:hover .logo-key {
  color: var(--accent);
}

.logo-accent {
  color: var(--accent);
  font-weight: 700;
}

/* Icône clé dorée après le logo */
.logo-key {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35em;
  color: var(--accent);
}

.logo-key svg {
  width: 1.1em;
  height: 1.1em;
  vertical-align: middle;
}

/* Header — lien Accueil */
.header-home {
  display: inline-flex;
  align-items: center;
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
}

.header-home:hover {
  color: var(--primary-light);
}

.header-home:hover .logo-key {
  color: var(--accent-light);
}

/* Navigation desktop */
.nav-desktop {
  display: none;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }

  .nav-desktop ul {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
  }

  .nav-desktop a {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
  }

  .nav-desktop a:hover {
    color: var(--accent);
  }

  .nav-desktop a.current {
    color: var(--accent);
    font-weight: 600;
  }

  .nav-desktop .nav-cta.current {
    box-shadow: 0 0 0 2px var(--accent);
  }
}

/* Bouton CTA dans la nav */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: var(--white) !important;
  border-radius: 8px;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.nav-cta:hover {
  transform: translateY(-2px);
  background: var(--primary-light);
  box-shadow: 0 4px 12px rgba(27, 54, 93, 0.35);
}

/* Menu hamburger mobile */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
  aria-label: "Ouvrir le menu";
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Menu mobile slide-in */
.nav-mobile {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg-page);
  box-shadow: -4px 0 20px var(--shadow);
  padding: 5rem 2rem 2rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 999;
  overflow-y: auto;
}

.nav-mobile.open {
  transform: translateX(0);
}

.nav-mobile ul {
  list-style: none;
}

.nav-mobile li {
  margin-bottom: 1rem;
}

.nav-mobile a {
  display: block;
  padding: 0.5rem 0;
  font-size: 1.1rem;
  color: var(--text-dark);
  font-weight: 500;
}

.nav-mobile a.current {
  color: var(--accent);
  font-weight: 600;
  position: relative;
  padding-left: 0.75rem;
}

.nav-mobile a.current::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 1.2em;
  background: var(--accent);
  border-radius: 2px;
}

.nav-mobile .nav-cta.current {
  color: var(--white);
  background: var(--primary);
}

.nav-mobile .nav-cta.current::before {
  display: none;
}

.nav-mobile .nav-cta {
  margin-top: 1rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  gap: 0.75rem;
  display: inline-flex;
  justify-content: flex-start;
}

/* Overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 998;
}

.nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* --- Footer --- */
.footer {
  background: var(--primary);
  color: var(--white);
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  text-align: left;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1.2fr 1fr 1fr 0.8fr;
    gap: 3rem;
    text-align: left;
    align-items: start;
  }
}

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

.footer-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-tagline {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.footer h4 {
  font-family: "DM Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--accent-light);
}

.footer ul {
  list-style: none;
}

.footer li {
  margin-bottom: 0.5rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.footer a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: var(--primary);
  color: var(--white) !important;
  border-radius: 8px;
  font-weight: 600;
  transition: transform 0.3s ease, background 0.3s ease;
}

.footer-whatsapp:hover {
  transform: translateY(-2px);
  background: var(--primary-light);
}

/* Footer — Réseaux sociaux */
.footer-social {
  margin-top: 1rem;
}

.footer-social-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.7);
  display: block;
  margin-bottom: 0.6rem;
}

.footer-social-links {
  display: flex;
  gap: 0.75rem;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-light);
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.footer-social-link:hover {
  transform: translateY(-3px) scale(1.08);
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.footer-social-link svg {
  flex-shrink: 0;
}

/* --- Bouton WhatsApp flottant --- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: var(--whatsapp);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
  z-index: 9999;
  transition: transform 0.3s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.05);
  color: var(--white);
}

.whatsapp-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: whatsapp-pulse 2s infinite;
}

@keyframes whatsapp-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  position: relative;
  z-index: 1;
}

.whatsapp-float[title] {
  cursor: pointer;
}

/* --- Boutons CTA récurrents --- */
.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

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

.btn-whatsapp {
  background: var(--primary);
  color: var(--white);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.btn-whatsapp:hover {
  background: var(--primary-light);
  box-shadow: 0 4px 16px rgba(27, 54, 93, 0.35);
}

.btn-paypal {
  background: var(--paypal);
  color: var(--white);
}

.btn-paypal:hover {
  box-shadow: 0 4px 16px rgba(0, 112, 186, 0.4);
}

.btn-revolut {
  background: #0075EB;
  color: var(--white);
}

.btn-revolut:hover {
  background: #0066cc;
  box-shadow: 0 4px 16px rgba(0, 117, 235, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

/* --- Utilitaires --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Le header conserve son padding malgré .container */
.header-inner.container {
  padding: 1rem 1.5rem;
}

.section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }
}

/* Animation fade-in au scroll */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Visually hidden pour accessibilité */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
