* { box-sizing: border-box; }
body { margin: 0; font-family: "Public Sans", system-ui, -apple-system, sans-serif; background: #FAF7F2; color: #1A1A1A; }
h1, h2, h3 { font-family: "Archivo", system-ui, sans-serif; margin: 0; letter-spacing: -0.01em; }
a { color: #C1502E; text-decoration: none; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px; border-radius: 6px; font-weight: 700; font-size: 15px; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: #C1502E; color: #FFF; }
.btn-ghost { background: transparent; color: #1F3A5F; border-color: #1F3A5F; }
.btn-invert { background: #FFF; color: #C1502E; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.card { background: #FFFFFF; border-radius: 10px; border: 1px solid #EBE6DE; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #C1502E; }
.section { padding: 76px 100px; }
.acc-item { border: 1px solid #EBE6DE; border-radius: 10px; background: #FFFFFF; overflow: hidden; margin-bottom: 14px; }
.acc-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; cursor: pointer; }
.acc-head:hover { background: #FAF7F2; }
.acc-chevron { transition: transform .18s ease; flex-shrink: 0; }
.acc-item.open .acc-chevron { transform: rotate(180deg); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .22s ease; }
.acc-item.open .acc-body { max-height: 220px; }
.acc-body-inner { padding: 0 24px 22px 24px; display: flex; align-items: flex-start; gap: 24px; }
.city-card { cursor: pointer; transition: box-shadow .15s ease, border-color .15s ease, transform .1s ease; }
.city-card:hover { transform: translateY(-2px); }
.city-card.active { border-color: #C1502E; box-shadow: 0 8px 20px rgba(193,80,46,0.14); background: #FBEFE9; }
.filter-btn { padding: 9px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 700; cursor: pointer; border: 1.5px solid #EBE6DE; color: #6B6459; background: #FFF; }
.filter-btn.active { background: #16283F; border-color: #16283F; color: #FFF; }
.project-card { display: none; }
.project-card.visible { display: block; }
.toggle-wrap { display: flex; border-radius: 999px; background: #EFE8DC; padding: 3px; width: fit-content; }
.toggle-opt { padding: 5px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; cursor: pointer; color: #6B6459; }
.toggle-opt.active { background: #16283F; color: #FFF; }
.photo-before, .photo-after { display: none; }
.photo-before.shown, .photo-after.shown { display: flex; }
.detail-toggle { font-size: 12.5px; font-weight: 700; color: #C1502E; cursor: pointer; margin-top: 2px; width: fit-content; }
.detail-toggle:hover { text-decoration: underline; }
.detail-panel { max-height: 0; overflow: hidden; transition: max-height .22s ease; border-top: 1px solid #EBE6DE; }
.project-card.detail-open .detail-panel { max-height: 400px; }
.detail-panel-inner { padding: 14px 18px; font-size: 13px; line-height: 1.55; color: #4A4A4A; }
.detail-panel-inner p:first-child { margin-top: 0; }
.detail-panel-inner p:last-child { margin-bottom: 0; }
.detail-panel-label { font-size: 11px; font-weight: 700; color: #16283F; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
label { font-size: 13px; font-weight: 700; color: #16283F; margin-bottom: 6px; display: block; }
input[type=text], input[type=email], input[type=tel], select, textarea {
width: 100%; padding: 12px 14px; border-radius: 7px; border: 1.5px solid #EBE6DE; font-size: 14.5px; font-family: inherit; color: #1A1A1A; background: #FFF;
}
textarea { resize: vertical; min-height: 90px; }
.field { margin-bottom: 18px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.upload-zone { border: 2px dashed #EBE6DE; border-radius: 10px; padding: 22px; text-align: center; cursor: pointer; transition: border-color .15s ease; }
.upload-zone:hover, .upload-zone.dragover { border-color: #C1502E; background: #FBEFE9; }
.slot { padding: 10px 6px; border-radius: 8px; border: 1.5px solid #EBE6DE; font-size: 13.5px; font-weight: 600; text-align: center; cursor: pointer; color: #3A3A3A; }
.slot.active { background: #16283F; border-color: #16283F; color: #FFF; }
.slot.taken { opacity: .35; cursor: not-allowed; text-decoration: line-through; }

/* --- Ajouts thème WordPress (au-delà de la maquette statique) --- */
.toitcmoi-wrap { width: 1440px; max-width: 100%; background: #FAF7F2; margin: 0 auto; }
.toitcmoi-form-msg { padding: 16px 20px; border-radius: 8px; font-size: 14.5px; font-weight: 600; margin-bottom: 20px; }
.toitcmoi-form-msg.success { background: #E4EFE8; color: #2F8F5B; }
.toitcmoi-form-msg.error { background: #FBEAEA; color: #B23A2E; }
.toitcmoi-honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
@media (max-width: 1440px) {
  .toitcmoi-wrap, .toitcmoi-wrap > div { width: 100% !important; }
}

/* ==========================================================================
   Responsive (mobile) -- ajoute pour corriger l'affichage sur telephone.
   Les proprietes touchees ici sont en !important : c'est le seul moyen de
   passer au-dessus des styles inline utilises partout dans le theme sans
   reecrire chaque gabarit en profondeur.
   ========================================================================== */

.nav-toggle { display: none; background: none; border: none; padding: 6px; margin: 0; cursor: pointer; align-items: center; justify-content: center; border-radius: 6px; }
.nav-toggle:hover { background: #FAF7F2; }

.acc-body-inner { flex-wrap: wrap; }

@media (max-width: 900px) {
  .site-nav, .site-footer, .page-hero, .stats-row, .trust-row, .section, .cta-banner {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  .cta-banner { margin-left: 16px !important; margin-right: 16px !important; }
  .site-nav { padding-top: 16px !important; padding-bottom: 16px !important; }

  .nav-toggle { display: flex !important; order: 3; }
  .site-nav-cta { order: 2; }
  .site-nav-links {
    display: none !important;
    order: 4;
    width: 100%;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
  }
  .site-nav-links.open { display: flex !important; }
  .site-nav-links a { display: block; width: 100%; padding: 12px 4px; border-bottom: 1px solid #EBE6DE; }

  .footer-cols { gap: 32px !important; }

  .hero-flex, .trust-row, .stats-row { gap: 32px !important; }
}

@media (max-width: 640px) {
  h1 { font-size: 30px !important; line-height: 1.18 !important; }
  h2 { font-size: 24px !important; }

  .cta-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 32px 24px !important;
  }

  .row2 { grid-template-columns: 1fr !important; }

  .acc-price-col { flex: 1 1 100% !important; text-align: left !important; margin-top: 8px; }

  .mention-label { flex: 1 1 100% !important; }

  .footer-cols { flex-direction: column !important; gap: 24px !important; }
}

@media (max-width: 480px) {
  .slot-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}

/* ==========================================================================
   Consentement cookies (RGPD)
   ========================================================================== */

.btn-link { background: none; border: none; padding: 8px 4px; margin: 0; font-weight: 700; font-size: 14px; color: #16283F; text-decoration: underline; cursor: pointer; font-family: inherit; }

.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; background: #FFFFFF; border-top: 1px solid #EBE6DE; box-shadow: 0 -6px 24px rgba(22,40,63,0.12); }
.cookie-banner-inner { max-width: 1200px; margin: 0 auto; padding: 20px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cookie-banner-text { flex: 1 1 420px; font-size: 13.5px; line-height: 1.6; color: #4A4A4A; margin: 0; }
.cookie-banner-text a { color: #C1502E; font-weight: 700; }
.cookie-banner-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
.cookie-banner-actions .btn { padding: 11px 20px; font-size: 13.5px; }

.cookie-prefs { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.cookie-banner[hidden], .cookie-prefs[hidden] { display: none !important; }
.cookie-prefs-overlay { position: absolute; inset: 0; background: rgba(22,40,63,0.55); }
.cookie-prefs-panel { position: relative; background: #FFFFFF; border-radius: 14px; max-width: 560px; width: 100%; max-height: 86vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
.cookie-prefs-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; border-bottom: 1px solid #EBE6DE; }
.cookie-prefs-head h2 { font-size: 19px; color: #16283F; }
.cookie-prefs-close { background: none; border: none; font-size: 24px; line-height: 1; color: #8A8378; cursor: pointer; padding: 4px 8px; }
.cookie-prefs-body { padding: 8px 26px; }
.cookie-cat { padding: 16px 0; border-bottom: 1px solid #EBE6DE; }
.cookie-cat:last-child { border-bottom: none; }
.cookie-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 700; font-size: 14.5px; color: #16283F; cursor: pointer; }
.cookie-cat-head input[type="checkbox"] { width: 18px; height: 18px; accent-color: #C1502E; cursor: pointer; }
.cookie-cat-always { font-size: 12px; font-weight: 700; color: #2F8F5B; text-transform: uppercase; letter-spacing: 0.03em; cursor: default; }
.cookie-cat p { margin: 8px 0 0 0; font-size: 13px; line-height: 1.6; color: #6B6459; }
.cookie-prefs-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 20px 26px; border-top: 1px solid #EBE6DE; flex-wrap: wrap; }
.cookie-prefs-actions .btn { padding: 11px 20px; font-size: 13.5px; }

.consent-gate-locked { padding: 28px 20px; border: 1px dashed #EBE6DE; border-radius: 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.consent-gate-locked p { margin: 0; font-size: 13.5px; color: #6B6459; max-width: 340px; }

@media (max-width: 640px) {
  .cookie-banner-inner { padding: 18px 20px; }
  .cookie-banner-actions { width: 100%; justify-content: stretch; }
  .cookie-banner-actions .btn, .cookie-banner-actions .btn-link { flex: 1 1 auto; justify-content: center; text-align: center; }
}

/* ------------------------------------------------------------------------
 * Bouton "Me rappeler" + modale (voir functions.php, section 16, et
 * footer.php pour le point d'entrée principal, page-devis-contact.php pour
 * le second point d'entrée). Même structure de modale que .cookie-prefs
 * ci-dessus (overlay + panneau), pour rester cohérent visuellement.
 * ---------------------------------------------------------------------- */
.rappel-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: #C1502E;
  color: #FFF;
  font-weight: 700;
  font-size: 14.5px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(22,40,63,0.28);
  font-family: inherit;
}
.rappel-fab:hover { background: #A8431F; }
.rappel-fab svg { flex-shrink: 0; }

.rappel-modal { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center; padding: 24px; }
.rappel-modal[hidden] { display: none !important; }
.rappel-modal-overlay { position: absolute; inset: 0; background: rgba(22,40,63,0.55); }
.rappel-modal-panel { position: relative; background: #FFFFFF; border-radius: 14px; max-width: 440px; width: 100%; max-height: 86vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
.rappel-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px 4px; }
.rappel-modal-head h2 { font-family: 'Archivo', Arial, sans-serif; font-weight: 700; font-size: 19px; color: #16283F; margin: 0; }
.rappel-modal-close { background: none; border: none; font-size: 24px; line-height: 1; color: #8A8378; cursor: pointer; padding: 4px 8px; }
.rappel-modal-body { padding: 12px 26px 26px; }
.rappel-intro { font-size: 14px; color: #6B6459; line-height: 1.5; margin: 0 0 18px; }
.rappel-field { margin-bottom: 14px; }
.rappel-field label { display: block; font-size: 13px; font-weight: 700; color: #16283F; margin-bottom: 5px; }
.rappel-field input[type="text"], .rappel-field input[type="tel"] { width: 100%; padding: 12px 14px; border: 1px solid #DCD5C9; border-radius: 6px; font-size: 15px; font-family: inherit; box-sizing: border-box; }
.rappel-field input:focus { outline: 2px solid #C1502E; outline-offset: 1px; }
#rappel-form .btn { width: 100%; justify-content: center; border: none; cursor: pointer; }
.rappel-status { margin-top: 12px; font-size: 13.5px; padding: 10px 12px; border-radius: 6px; display: none; }
.rappel-status.is-success { display: block; background: #EAF5EE; color: #2E7D4F; }
.rappel-status.is-error { display: block; background: #FBEAE6; color: #B3311A; }

@media (max-width: 640px) {
  .rappel-fab {
    left: 16px;
    right: 16px;
    bottom: 16px;
    justify-content: center;
    border-radius: 10px;
    padding: 15px 20px;
  }
}

/* --- Champs obligatoires : astérisque rouge et contrôle de saisie --- */
.req { color: #D32F2F; font-weight: 700; margin-left: 2px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #D32F2F; background: #FFF8F8; }
.field-error { color: #B23A2E; font-size: 12.5px; font-weight: 600; margin-top: 6px; }

/* ---- Bandeau d'urgence (haut de page) ---- */
.urgence-bar { position: relative; display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; background: #C1502E; color: #FFF; padding: 10px 48px 10px 24px; font-size: 14.5px; font-weight: 600; text-align: center; }
.urgence-bar[hidden] { display: none; }
.urgence-pulse { width: 9px; height: 9px; border-radius: 50%; background: #FFF; flex: 0 0 auto; animation: urgence-pulse 1.8s infinite; }
@keyframes urgence-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); } 70% { box-shadow: 0 0 0 9px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.urgence-sub { font-weight: 500; opacity: .95; }
.urgence-call { display: inline-flex; align-items: center; gap: 8px; background: #FFF; color: #C1502E; padding: 7px 16px; border-radius: 999px; font-weight: 800; font-size: 14.5px; white-space: nowrap; text-decoration: none; }
.urgence-call:hover { background: #FBEFE9; }
.urgence-close { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: transparent; border: 0; color: #FFF; font-size: 24px; line-height: 1; cursor: pointer; padding: 4px 10px; opacity: .85; }
.urgence-close:hover { opacity: 1; }
@media (max-width: 640px) {
  .urgence-bar { gap: 8px 12px; padding: 9px 40px 9px 12px; font-size: 13.5px; }
  .urgence-sub { display: block; }
  .urgence-text { flex: 1 1 100%; }
  .urgence-pulse { display: none; }
}
@media (prefers-reduced-motion: reduce) { .urgence-pulse { animation: none; } }

/* ---- Barre d'appel fixe, mobile uniquement (footer.php) ---- */
.mobile-cta { display: none; }
@media (max-width: 640px) {
  .mobile-cta { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 8900; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); background: #FFF; border-top: 1px solid #E4DED3; box-shadow: 0 -4px 14px rgba(0,0,0,.08); }
  .mobile-cta-call { flex: 1.4; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #C1502E; color: #FFF; border-radius: 8px; padding: 9px 8px; font-weight: 800; font-size: 14px; line-height: 1.2; text-decoration: none; }
  .mobile-cta-title { display: inline-flex; align-items: center; gap: 7px; }
  .mobile-cta-sub { font-weight: 500; font-size: 11px; opacity: .92; }
  .mobile-cta-devis { flex: 1; display: flex; align-items: center; justify-content: center; border: 2px solid #16283F; color: #16283F; border-radius: 8px; padding: 9px 8px; font-weight: 700; font-size: 14px; text-decoration: none; background: #FFF; }
}
