/* ═══════════════════════════════════════════════════════
   COLLÈGE LE CACTUS DE BONON — Pack "WOW" v3
   Simulateur frais · Widget WhatsApp+FAQ · Compteur urgence
   Vidéo hero · Carte Maps réelle · Micro-interactions
═══════════════════════════════════════════════════════ */

/* ── MICRO-INTERACTIONS GLOBALES ── */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,.35) 0%, transparent 70%);
  opacity: 0; transform: scale(0);
  transition: opacity .4s, transform .4s;
}
.btn:active::after { opacity: 1; transform: scale(2); transition: 0s; }

.card, .svc-card, .all-card, .doc-card, .tem, .infra-card, .actu-card, .eq-card, .qui-card, .palm-card, .dist-card {
  will-change: transform;
}

/* ── DARK MODE TOGGLE ── */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--gris-pale); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 17px; margin-left: 8px;
  transition: background .2s, border-color .2s, transform .2s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--g3); transform: rotate(15deg); }

html.dark { color-scheme: dark; }
html.dark body { background: #0B1410; color: #E8F0EA; }
html.dark nav { background: rgba(11,20,16,.97); border-bottom-color: rgba(255,255,255,.08); }
html.dark .logo-text .school-label,
html.dark .logo-text .school-name { color: var(--g3); }
html.dark .logo-text .school-sub { color: rgba(255,255,255,.5); }
html.dark .nav-links a { color: rgba(255,255,255,.7); }
html.dark .nav-links a:hover { background: rgba(255,255,255,.06); color: var(--g3); }
html.dark .theme-toggle { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
html.dark .section[style*="--cream"],
html.dark section { background: #0B1410 !important; }
html.dark #hero, html.dark .hero-left { background: #0B1410 !important; }
html.dark .card, html.dark .svc-card, html.dark .all-card, html.dark .doc-card,
html.dark .infra-card, html.dark .actu-card, html.dark .eq-card, html.dark .qui-card,
html.dark .cc, html.dark .faq-item, html.dark .form-card, html.dark .cf-card,
html.dark .fsb, html.dark .sidebar-box, html.dark .cal-aside, html.dark .data-table,
html.dark .all-card, html.dark .palm-card, html.dark .dist-card, html.dark .doc-card {
  background: #122019 !important; border-color: rgba(255,255,255,.08) !important;
}
html.dark .section-title, html.dark h1, html.dark h2, html.dark h3, html.dark .noir { color: #E8F0EA !important; }
html.dark .section-sub, html.dark p, html.dark .gris { color: rgba(232,240,234,.6) !important; }
html.dark .gris-pale, html.dark [style*="gris-pale"] { background: #16241c !important; }
html.dark footer { background: #07120c; }
html.dark .faq-question:hover { background: rgba(255,255,255,.04); }
html.dark .field input, html.dark .field select, html.dark .field textarea { background: #16241c; border-color: rgba(255,255,255,.12); color: #E8F0EA; }

/* ── COMPTEUR D'URGENCE (places restantes) ── */
.urgency-widget {
  background: linear-gradient(135deg, #fff8e8, #fef0d0);
  border: 2px solid var(--gold);
  border-radius: var(--r-lg);
  padding: 22px 26px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  box-shadow: 0 8px 30px rgba(242,194,62,.25);
  position: relative; overflow: hidden;
}
.urgency-widget::before {
  content: '⏳'; position: absolute; right: -10px; top: -10px;
  font-size: 90px; opacity: .08; transform: rotate(-15deg);
}
.urgency-pulse {
  width: 12px; height: 12px; border-radius: 50%; background: #e8650a;
  position: relative; flex-shrink: 0;
}
.urgency-pulse::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid #e8650a; animation: pulse-ring 1.6s ease-out infinite;
}
@keyframes pulse-ring { 0% { transform: scale(.8); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }
.urgency-text { flex: 1; min-width: 200px; }
.urgency-text strong { display: block; font-size: 1rem; font-weight: 800; color: #a85a00; margin-bottom: 2px; }
.urgency-text span { font-size: .82rem; color: var(--gris); }
.urgency-bars { display: flex; gap: 14px; flex-wrap: wrap; }
.urgency-level { text-align: center; min-width: 90px; }
.urgency-level .lvl-name { font-size: 11px; font-weight: 700; color: var(--gris); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.urgency-bar-track { width: 90px; height: 7px; border-radius: 4px; background: rgba(0,0,0,.08); overflow: hidden; margin-bottom: 5px; }
.urgency-bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--g3), var(--gold)); transition: width 1.2s ease; }
.urgency-bar-fill.hot { background: linear-gradient(90deg, #e8650a, #ff8a3d); }
.urgency-level .lvl-val { font-size: 11px; font-weight: 700; color: var(--noir); }

/* ── SIMULATEUR DE FRAIS ── */
.simu-wrap {
  background: var(--blanc); border: 2px solid var(--border);
  border-radius: var(--r-xl); padding: 36px;
  box-shadow: var(--shadow-lg);
}
.simu-header { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.simu-header .si { width: 52px; height: 52px; border-radius: 14px; background: var(--g1); display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.simu-header h3 { font-size: 1.15rem; font-weight: 800; color: var(--g1); margin-bottom: 3px; }
.simu-header p { font-size: .82rem; color: var(--gris); }
.simu-grid { display: grid; grid-template-columns: 1fr 320px; gap: 36px; align-items: start; }
.simu-field { margin-bottom: 22px; }
.simu-field label { display: block; font-size: 13.5px; font-weight: 700; color: var(--noir); margin-bottom: 10px; }
.simu-field select {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--border);
  border-radius: 10px; font-size: 14px; font-family: 'Inter', sans-serif;
  background: var(--blanc); color: var(--noir); cursor: pointer;
}
.simu-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.simu-opt {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--border); border-radius: 10px; padding: 14px 16px;
  cursor: pointer; transition: border-color .2s, background .2s;
  user-select: none;
}
.simu-opt:hover { border-color: var(--g3); background: var(--gris-pale); }
.simu-opt.checked { border-color: var(--g2); background: rgba(67,160,71,.06); }
.simu-opt input { width: 18px; height: 18px; accent-color: var(--g2); cursor: pointer; flex-shrink: 0; }
.simu-opt-info { flex: 1; }
.simu-opt-info strong { display: block; font-size: 13px; font-weight: 700; color: var(--noir); }
.simu-opt-info span { font-size: 11.5px; color: var(--gris-mid); }
.simu-opt-price { font-size: 12.5px; font-weight: 700; color: var(--g2); white-space: nowrap; }

.simu-result {
  background: linear-gradient(135deg, var(--g1), var(--g2));
  border-radius: var(--r-lg); padding: 28px;
  position: sticky; top: 100px;
}
.simu-result .sr-label { font-size: 11px; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-bottom: 6px; }
.simu-result .sr-total {
  font-family: 'Sora', sans-serif; font-size: 2.5rem; font-weight: 900; color: var(--blanc);
  line-height: 1; margin-bottom: 4px; transition: all .3s;
}
.simu-result .sr-sub { font-size: 12px; color: rgba(255,255,255,.6); margin-bottom: 20px; }
.simu-breakdown { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.15); }
.sb-row { display: flex; justify-content: space-between; font-size: 12.5px; color: rgba(255,255,255,.8); }
.sb-row strong { color: var(--blanc); font-weight: 700; }
.simu-tranches { background: rgba(255,255,255,.1); border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; }
.simu-tranches .tt-label { font-size: 11px; color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.simu-tranches .tt-row { display: flex; justify-content: space-between; font-size: 12.5px; color: rgba(255,255,255,.85); padding: 3px 0; }
.simu-cta { width: 100%; }

/* ── WHATSAPP WIDGET AVEC FAQ RAPIDE ── */
.wa-widget-container { position: fixed; bottom: 28px; right: 28px; z-index: 950; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.wa-chat-panel {
  display: none; width: 320px; max-width: 88vw;
  background: var(--blanc); border-radius: 18px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  border: 1px solid var(--border);
  animation: wa-pop .25s ease;
}
.wa-chat-panel.open { display: block; }
@keyframes wa-pop { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
.wa-chat-header {
  background: linear-gradient(135deg, #25D366, #1ea952);
  padding: 18px 20px; display: flex; align-items: center; gap: 12px; color: var(--blanc);
}
.wa-chat-header .wa-av { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.wa-chat-header strong { display: block; font-size: 14px; }
.wa-chat-header small { font-size: 11.5px; opacity: .85; display: flex; align-items: center; gap: 5px; }
.wa-chat-header small::before { content: ''; width: 7px; height: 7px; background: #baf7ce; border-radius: 50%; display: inline-block; }
.wa-chat-close { margin-left: auto; cursor: pointer; font-size: 18px; opacity: .85; background: none; border: none; color: var(--blanc); padding: 4px; }
.wa-chat-body { padding: 18px 16px; background: #ECE5DD; max-height: 360px; overflow-y: auto; }
.wa-bubble {
  background: var(--blanc); border-radius: 12px; padding: 11px 14px;
  font-size: 13px; color: var(--noir); line-height: 1.55; margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); max-width: 92%;
}
.wa-quick-replies { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.wa-quick-btn {
  background: var(--blanc); border: 1.5px solid #cfe8d8; color: var(--g1);
  font-size: 12.5px; font-weight: 600; padding: 10px 14px; border-radius: 20px;
  cursor: pointer; text-align: left; transition: background .2s, border-color .2s;
}
.wa-quick-btn:hover { background: rgba(37,211,102,.08); border-color: #25D366; }
.wa-chat-footer { padding: 14px 16px; background: var(--blanc); border-top: 1px solid var(--border); }
.wa-cta-final {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #25D366; color: var(--blanc); padding: 12px; border-radius: 10px;
  font-size: 13.5px; font-weight: 700; transition: background .2s;
}
.wa-cta-final:hover { background: #1ea952; }
.wa-fab {
  width: 60px; height: 60px; border-radius: 50%;
  background: #25D366; color: var(--blanc);
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  box-shadow: 0 6px 28px rgba(37,211,102,.5); cursor: pointer; border: none;
  transition: transform .2s; position: relative;
}
.wa-fab:hover { transform: scale(1.08); }
.wa-fab .wa-badge {
  position: absolute; top: -2px; right: -2px;
  width: 20px; height: 20px; border-radius: 50%; background: #e8650a;
  color: var(--blanc); font-size: 10.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--blanc);
}

/* ── HERO VIDEO ── */
.hero-video-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-video-wrap { position: relative; overflow: hidden; }
.hero-video-controls {
  position: absolute; bottom: 16px; right: 16px; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,.4); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  color: var(--blanc); cursor: pointer; font-size: 15px; border: 1.5px solid rgba(255,255,255,.3);
  transition: background .2s;
}
.hero-video-controls:hover { background: rgba(0,0,0,.6); }

/* ── GOOGLE MAPS EMBED ── */
.gmap-embed { width: 100%; height: 100%; border: 0; border-radius: var(--r-xl); }
.gmap-frame-wrap { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); height: 380px; position: relative; }

/* ── GOOGLE REVIEWS BADGE ── */
.greviews-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--blanc); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 12px 20px;
  box-shadow: var(--shadow);
}
.greviews-stars { color: #FBBC05; font-size: 16px; letter-spacing: 1px; }
.greviews-badge .gnum { font-family: 'Sora', sans-serif; font-weight: 900; font-size: 1.3rem; color: var(--noir); }
.greviews-badge .gsub { font-size: 11px; color: var(--gris-mid); }
.greviews-g { width: 28px; height: 28px; flex-shrink: 0; }

/* ── LIVE VISITOR BADGE ── */
.live-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(67,160,71,.08); border: 1px solid rgba(67,160,71,.25);
  border-radius: 50px; padding: 7px 14px; font-size: 12px; font-weight: 600; color: var(--g2);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; position: relative; }
.live-dot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 1.5px solid #2ecc71; animation: pulse-ring 1.8s ease-out infinite; }

/* ── LAZY LOAD FADE ── */
img[loading="lazy"] { background: var(--gris-pale); }
.img-skeleton { position: relative; overflow: hidden; background: var(--gris-pale); }
.img-skeleton::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .simu-grid { grid-template-columns: 1fr; }
  .simu-result { position: static; }
  .urgency-bars { width: 100%; justify-content: space-between; }
}
@media (max-width: 640px) {
  .simu-options { grid-template-columns: 1fr; }
  .wa-chat-panel { width: 92vw; }
  .urgency-widget { padding: 18px; }
  .urgency-bars { gap: 10px; }
  .urgency-level { min-width: 70px; }
  .urgency-bar-track { width: 70px; }
}
