/*
Theme Name: Facturlib
Theme URI: https://facturlib.fr
Author: Elodie Chevriau
Author URI: https://facturlib.fr
Description: Thème sur mesure pour Factur'lib — gestion administrative pour infirmières libérales
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: facturlib
Tags: one-page, health, professional, french
*/

/* ============================================================
   VARIABLES & RESET
   ============================================================ */
:root {
  --mauve:       #8B7BB5;
  --mauve-light: #c5b8e8;
  --mauve-pale:  #f0edf8;
  --rose:        #C97B8A;
  --rose-pale:   #fce8ee;
  --marine:      #1e3a5f;
  --marine-light:#2d5082;
  --fond:        #f7f6f9;
  --blanc:       #ffffff;
  --texte:       #2a2a2a;
  --texte-doux:  #5a5a6a;
  --border:      #e8e4f0;
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   24px;
  --radius-xl:   40px;
  --shadow-soft: 0 4px 24px rgba(139,123,181,0.12);
  --shadow-card: 0 2px 12px rgba(30,58,95,0.08);
  --font-title:  'Playfair Display', Georgia, serif;
  --font-body:   'Inter', system-ui, sans-serif;
  --container:   1100px;
  --gap:         clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); color: var(--texte); background: var(--fond); line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============================================================
   TYPOGRAPHIE
   ============================================================ */
h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.2; color: var(--marine); }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

.subtitle-section {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mauve);
  background: var(--mauve-pale);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(16px, 5vw, 48px); }
section { padding: clamp(56px, 8vw, 100px) 0; }

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  text-decoration: none;
}
.btn-primary { background: var(--rose); color: #fff; box-shadow: 0 4px 16px rgba(201,123,138,0.35); }
.btn-primary:hover { background: #b86877; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,123,138,0.4); }
.btn-secondary { background: transparent; color: var(--marine); border: 2px solid var(--border); }
.btn-secondary:hover { border-color: var(--mauve); color: var(--mauve); transform: translateY(-2px); }
.btn-white { background: #fff; color: var(--marine); font-weight: 700; }
.btn-white:hover { background: var(--mauve-pale); transform: translateY(-2px); }
.btn-outline-white { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.4); }
.btn-outline-white:hover { border-color: #fff; background: rgba(255,255,255,0.1); transform: translateY(-2px); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(247, 246, 249, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: var(--shadow-soft); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.site-logo img { height: 40px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav a { font-size: 0.9rem; font-weight: 500; color: var(--texte-doux); transition: color 0.2s; position: relative; }
.site-nav a::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--mauve); transform: scaleX(0); transition: transform 0.2s; border-radius: 2px; }
.site-nav a:hover { color: var(--marine); }
.site-nav a:hover::after { transform: scaleX(1); }
.nav-cta { margin-left: 8px; }

.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; background: none; border: none; }
.burger span { display: block; width: 24px; height: 2px; background: var(--marine); border-radius: 2px; transition: all 0.3s; }

.mobile-nav {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: var(--blanc);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px 28px;
  flex-direction: column;
  gap: 16px;
  z-index: 99;
  box-shadow: var(--shadow-soft);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { font-size: 1rem; font-weight: 500; color: var(--texte); padding: 8px 0; border-bottom: 1px solid var(--border); }
.mobile-nav a:last-child { border: none; }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  padding-top: calc(68px + clamp(48px, 8vw, 96px));
  padding-bottom: clamp(56px, 8vw, 100px);
  background: var(--fond);
  position: relative;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -180px;
  width: 600px; height: 600px;
  background: radial-gradient(ellipse, rgba(139,123,181,0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--mauve-pale); color: var(--mauve); font-size: 0.82rem; font-weight: 600; padding: 6px 14px; border-radius: 20px; margin-bottom: 20px; }
.hero-badge::before { content: '✦'; font-size: 10px; }
.hero-title { margin-bottom: 8px; color: var(--marine); }
.hero-title .accent { color: var(--rose); font-style: italic; }
.hero-desc { font-size: 1.05rem; color: var(--texte-doux); margin: 20px 0 32px; max-width: 460px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; }
.hero-card { background: var(--blanc); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-card); border: 1px solid var(--border); max-width: 300px; width: 100%; }
.hero-card-icon { width: 48px; height: 48px; background: var(--marine); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; font-size: 22px; }
.hero-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.hero-card p { font-size: 0.9rem; color: var(--texte-doux); }
.badge-float { position: absolute; background: var(--blanc); border: 1px solid var(--border); border-radius: 20px; padding: 8px 14px; font-size: 0.8rem; font-weight: 600; color: var(--marine); box-shadow: var(--shadow-card); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.badge-float .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }

/* ============================================================
   STATS BAND
   ============================================================ */
.stats-band { background: var(--marine); padding: 40px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.stat-item { text-align: center; padding: 16px 24px; border-right: 1px solid rgba(255,255,255,0.12); }
.stat-item:last-child { border-right: none; }
.stat-number { font-family: var(--font-title); font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; color: #fff; line-height: 1; margin-bottom: 8px; }
.stat-label { font-size: 0.85rem; color: rgba(255,255,255,0.65); line-height: 1.4; }

/* ============================================================
   POURQUOI
   ============================================================ */
#pourquoi { background: var(--blanc); }
.section-intro { text-align: center; max-width: 600px; margin: 0 auto 56px; }
.section-intro p { margin-top: 16px; color: var(--texte-doux); font-size: 1.05rem; }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--fond); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 32px 28px; transition: transform 0.25s, box-shadow 0.25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.card-icon { width: 52px; height: 52px; border-radius: var(--radius-sm); background: var(--mauve-pale); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; font-size: 24px; }
.card h3 { margin-bottom: 12px; color: var(--marine); }
.card p { font-size: 0.92rem; color: var(--texte-doux); line-height: 1.6; }

/* ============================================================
   SERVICES
   ============================================================ */
#services { background: var(--fond); }
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.service-list { display: flex; flex-direction: column; gap: 4px; }
.service-item { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.service-item:last-child { border-bottom: none; }
.service-item:hover .service-item-title { color: var(--mauve); }
.service-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rose); margin-top: 7px; flex-shrink: 0; }
.service-item-title { font-size: 1rem; font-weight: 600; color: var(--marine); margin-bottom: 4px; transition: color 0.2s; }
.service-item-desc { font-size: 0.88rem; color: var(--texte-doux); }
.tarif-card { background: var(--marine); border-radius: var(--radius-lg); padding: 40px 36px; color: #fff; position: sticky; top: 90px; }
.tarif-price { font-family: var(--font-title); font-size: 4rem; font-weight: 700; color: #fff; line-height: 1; margin: 12px 0 4px; }
.tarif-price sup { font-size: 1.5rem; vertical-align: top; margin-top: 12px; }
.tarif-unit { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-bottom: 8px; }
.tarif-sub { font-size: 0.82rem; color: rgba(255,255,255,0.5); margin-bottom: 28px; }
.tarif-features { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.tarif-feature { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: rgba(255,255,255,0.85); }
.tarif-feature::before { content: '✓'; color: var(--mauve-light); font-weight: 700; font-size: 1rem; }
.tarif-note { font-size: 0.78rem; color: rgba(255,255,255,0.4); text-align: center; margin-top: 16px; font-style: italic; }

/* ============================================================
   TEMOIGNAGES
   ============================================================ */
#temoignages { background: var(--blanc); }
.temoignages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.temoignage-card { background: var(--fond); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 28px; position: relative; }
.quote-mark { font-family: var(--font-title); font-size: 4rem; color: var(--mauve-light); line-height: 0.6; margin-bottom: 16px; display: block; }
.temoignage-text { font-size: 0.92rem; color: var(--texte); line-height: 1.7; font-style: italic; margin-bottom: 20px; }
.temoignage-author { display: flex; align-items: center; gap: 12px; }
.author-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--mauve-pale); display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 600; color: var(--mauve); }
.author-name { font-size: 0.9rem; font-weight: 600; color: var(--marine); }
.author-role { font-size: 0.78rem; color: var(--texte-doux); }

/* ============================================================
   FAQ
   ============================================================ */
#faq { background: var(--fond); }
.faq-list { max-width: 760px; margin: 48px auto 0; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--blanc); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.faq-question { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; cursor: pointer; font-size: 0.98rem; font-weight: 600; color: var(--marine); gap: 16px; transition: background 0.2s; }
.faq-question:hover { background: var(--fond); }
.faq-chevron { width: 24px; height: 24px; border-radius: 50%; background: var(--mauve-pale); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--mauve); flex-shrink: 0; transition: transform 0.3s; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease; font-size: 0.92rem; color: var(--texte-doux); line-height: 1.7; }
.faq-item.open .faq-answer { max-height: 400px; padding: 0 24px 24px; }

/* ============================================================
   CONTACT
   ============================================================ */
#contact {
  background: linear-gradient(135deg, var(--marine) 0%, var(--marine-light) 100%);
  position: relative;
  overflow: hidden;
}
#contact::before { content: ''; position: absolute; top: -100px; left: -100px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(139,123,181,0.3) 0%, transparent 70%); pointer-events: none; }
#contact h2 { color: #fff; margin-bottom: 16px; }
#contact p { color: rgba(255,255,255,0.7); font-size: 1.05rem; margin: 0 0 36px; }
.contact-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.contact-infos { display: flex; gap: 32px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.contact-info-item { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.75); font-size: 0.9rem; }
.contact-info-item strong { color: #fff; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: #0f1f35; color: rgba(255,255,255,0.5); padding: 28px 0; text-align: center; font-size: 0.82rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,0.45); transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-social { display: flex; gap: 12px; align-items: center; }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); transition: background 0.2s, color 0.2s; }
.footer-social a:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* ============================================================
   POPUP FORMULAIRE
   ============================================================ */
.popup-overlay { display: none; position: fixed; inset: 0; background: rgba(30,58,95,0.6); backdrop-filter: blur(4px); z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
.popup-overlay.open { display: flex; }
.popup-box { background: var(--blanc); border-radius: var(--radius-lg); padding: 36px 32px; max-width: 580px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 24px 60px rgba(30,58,95,0.25); animation: popupIn 0.3s ease; }
@keyframes popupIn { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.popup-close { position: absolute; top: 16px; right: 20px; background: none; border: none; font-size: 1.8rem; color: var(--texte-doux); cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: var(--radius-sm); transition: background 0.2s; }
.popup-close:hover { background: var(--fond); }
.popup-header { margin-bottom: 24px; }
.popup-header h3 { margin: 8px 0 6px; font-size: 1.4rem; }
.popup-header p { font-size: 0.9rem; color: var(--texte-doux); }
.popup-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--marine); }
.form-group input, .form-group select, .form-group textarea { padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 0.92rem; color: var(--texte); background: var(--fond); transition: border-color 0.2s; outline: none; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--mauve); background: var(--blanc); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-feedback { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 500; }
.form-feedback.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a8d8b0; }
.form-feedback.error { background: var(--rose-pale); color: #8B2252; border: 1px solid #e8b8c8; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.animate-up { opacity: 0; animation: fadeUp 0.6s ease forwards; }
.animate-up:nth-child(2) { animation-delay: 0.1s; }
.animate-up:nth-child(3) { animation-delay: 0.2s; }
.visible { opacity: 1; animation: fadeUp 0.6s ease forwards; }

/* ============================================================
   RESPONSIVE — UN SEUL BLOC UNIFIÉ
   ============================================================ */
@media (max-width: 768px) {
  /* Nav */
  .site-nav { display: none; }
  .burger { display: flex; }

  /* Hero */
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.12); }
  .stat-item:last-child { border-bottom: none; }

  /* Cards */
  .cards-grid { grid-template-columns: 1fr; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; }
  .tarif-card { position: static; }

  /* Témoignages */
  .temoignages-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
  .footer-links { justify-content: center; }

  /* Popup */
  .form-row { grid-template-columns: 1fr; }
  .popup-box { padding: 24px 20px; }

  /* Contact mobile */
  #contact .container > div[style*="grid"] {
    display: flex !important;
    flex-direction: column !important;
    text-align: center;
  }
  #contact .contact-actions {
    justify-content: center !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
  }
  #contact .contact-actions .btn {
    width: 210px !important;
    font-size: 0.85rem !important;
    padding: 10px 16px !important;
    justify-content: center !important;
  }
  #contact img {
    width: 110px !important;
    height: 110px !important;
    margin: 8px auto 0 !important;
    display: block !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .temoignages-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Honeypot anti-spam */
.cmplz-hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
}
