/* Harmonisé sur la couleur primaire #78350f (favicon) — outils/design_harmoniser.py */
/* ==========================================================================
   Construction en Bois — direction « Ossature bois »
   Brun charpente, ocre bois clair, blanc. Typographie géométrique (Verdana
   grasse). Header ocre pâle surmontant une bande brune, tiroir brun à liens
   ocre pâle, footer brun en colonnes serrées avec un bas de page ocre,
   page d'inscription en deux colonnes avec champs à bord marqué.
   ========================================================================== */

:root {
  --brun: #78350f;          /* brun charpente : fonds sombres, texte sur ocre pâle */
  --brun-profond: #2c1305;  /* texte foncé lisible sur fond ocre plein */
  --ocre: #c65819;          /* ocre bois : accents, fonds nécessitant un texte foncé */
  --ocre-clair: #eb9361;    /* ocre clair : titres et liseré sur fond brun */
  --ocre-pale: #f8d7c4;     /* ocre très clair : fond du header, liens du tiroir */
  --police-charpente: Verdana, Geneva, "Segoe UI", Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   HEADER DESKTOP (hdr-centered)
   -------------------------------------------------------------------------- */

header.site-header.hdr-centered {
  background: var(--ocre-pale);
  font-family: var(--police-charpente);
}

header.site-header.hdr-centered .hdr-centered-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
}

/* Le logo reste dans le flux sur mobile (marque à gauche, actions à droite) */
header.site-header.hdr-centered .brand {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brun);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .01em;
  text-decoration: none;
  position: static;
}

header.site-header.hdr-centered .brand-logo {
  border-radius: 5px;
  box-shadow: 0 0 0 2px var(--ocre);
}

header.site-header.hdr-centered .hamburger {
  color: var(--brun);
  border: 2px solid var(--brun);
  border-radius: 5px;
  padding: 6px;
  background: transparent;
}

/* Logo vraiment centré, par une grille à trois pistes : la marque occupe la
   piste du milieu, les actions la piste de droite — aucune superposition
   possible, contrairement à un centrage par positionnement absolu.
   Actif seulement au-delà du seuil où le hamburger disparaît (860 px),
   pour ne jamais cohabiter avec lui dans la même rangée. */
@media (min-width: 861px) {
  header.site-header.hdr-centered .hdr-centered-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    column-gap: 14px;
  }
  header.site-header.hdr-centered .brand {
    grid-column: 2;
    justify-self: center;
    margin-right: 0;
  }
  header.site-header.hdr-centered .hdr-centered-auth {
    grid-column: 3;
    justify-self: end;
    position: static;
  }
}

/* Bande brune du bas : la nav elle-même, sur toute la largeur du bandeau.
   Réservée au-delà de 768 px : en dessous, le gabarit masque déjà cette nav
   au profit du tiroir, et une règle non conditionnelle la ferait réapparaître
   par-dessus la barre mobile. */
@media (min-width: 769px) {
  header.site-header.hdr-centered .hdr-centered-nav {
    background: var(--brun);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    padding: 4px 6px;
    border-radius: 6px;
    margin-bottom: 14px;
  }
}

header.site-header.hdr-centered .nav-link,
header.site-header.hdr-centered .dropdown-trigger {
  color: #fff;
  font-weight: 600;
  font-size: .93rem;
  text-decoration: none;
  padding: 10px 14px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 0;
  font-family: inherit;
}

header.site-header.hdr-centered .nav-link::after,
header.site-header.hdr-centered .dropdown-trigger::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  background: var(--ocre-clair);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

header.site-header.hdr-centered .nav-link:hover::after,
header.site-header.hdr-centered .nav-link:focus-visible::after,
header.site-header.hdr-centered .dropdown-trigger:hover::after,
header.site-header.hdr-centered .dropdown.open .dropdown-trigger::after {
  transform: scaleX(1);
}

header.site-header.hdr-centered .dropdown-arrow {
  width: 14px;
  height: 14px;
}

/* Panneau du menu « Nos cantons » — mécanisme d'ouverture intact,
   seul l'habillage visuel change */
header.site-header.hdr-centered .dropdown-panel {
  background: #fff;
  border: 2px solid var(--brun);
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 10px 24px rgba(44, 19, 5, .22);
}

header.site-header.hdr-centered .dropdown-item {
  border-radius: 6px;
  padding: 8px 10px;
  gap: 10px;
  align-items: center;
}

header.site-header.hdr-centered .dropdown-item:hover,
header.site-header.hdr-centered .dropdown-item:focus-visible {
  background: var(--ocre-pale);
}

header.site-header.hdr-centered .hp-blason-sm {
  border: 1px solid var(--ocre-pale);
  border-radius: 4px;
}

header.site-header.hdr-centered .dropdown-item-keyword {
  color: var(--brun);
  font-weight: 700;
  font-size: .92rem;
}

header.site-header.hdr-centered .dropdown-item-sub {
  color: var(--brun);
  font-size: .78rem;
  font-weight: 500;
}

/* Bouton d'en-tête : sur fond clair, plein brun / texte blanc */
header.site-header.hdr-centered .btn.btn-primary {
  background: var(--brun);
  color: #fff;
  border: 2px solid var(--brun);
  border-radius: 5px;
  font-weight: 700;
  font-family: var(--police-charpente);
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
}

/* --------------------------------------------------------------------------
   BARRE + TIROIR MOBILE (< 992 px)
   Couleurs littérales : .mobile-drawer n'hérite pas des variables du header.
   -------------------------------------------------------------------------- */

.mobile-drawer {
  background: #78350f;
  font-family: Verdana, Geneva, "Segoe UI", Arial, sans-serif;
}

.mobile-drawer .mobile-close {
  color: #f8d7c4;
  border: 2px solid #f8d7c4;
  border-radius: 5px;
  background: transparent;
}

.mobile-drawer .mobile-section-title {
  color: #eb9361;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 14px 4px 6px;
  border-top: 1px solid rgba(248, 215, 196, .25);
  margin-top: 8px;
}

.mobile-drawer .mobile-nav-link {
  color: #f8d7c4;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 12px 6px;
  border-bottom: 1px solid rgba(248, 215, 196, .18);
  text-decoration: none;
}

.mobile-drawer .mobile-nav-link:hover,
.mobile-drawer .mobile-nav-link:focus-visible {
  color: #eb9361;
  background: rgba(248, 215, 196, .08);
}

.mobile-drawer .mobile-auth {
  padding-top: 16px;
}

.mobile-drawer .mobile-auth .btn.btn-primary {
  background: #c65819;
  color: #2c1305;
  border: 2px solid #c65819;
  border-radius: 5px;
  font-weight: 700;
  min-height: 44px;
  width: 100%;
  justify-content: center;
  display: flex;
  align-items: center;
}

/* --------------------------------------------------------------------------
   FOOTER (ftr-columns)
   Colonnes de contenu serrées ; le bas de page forme la quatrième bande,
   ocre, qui referme la composition.
   -------------------------------------------------------------------------- */

footer.site-footer.ftr-columns {
  background: var(--brun);
  color: var(--ocre-pale);
  font-family: var(--police-charpente);
}

footer.site-footer.ftr-columns .footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding-top: 8px;
}

@media (min-width: 720px) {
  footer.site-footer.ftr-columns .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 20px 26px;
  }
  footer.site-footer.ftr-columns .footer-grid > div + div {
    border-left: 1px solid rgba(248, 215, 196, .2);
    padding-left: 24px;
  }
}

footer.site-footer.ftr-columns .footer-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
}

footer.site-footer.ftr-columns .footer-tagline {
  color: var(--ocre-pale);
  font-size: .88rem;
  line-height: 1.5;
}

footer.site-footer.ftr-columns .footer-heading {
  color: var(--ocre-clair);
  font-weight: 700;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
  border-bottom: 2px solid rgba(235, 147, 97, .35);
  padding-bottom: 6px;
}

footer.site-footer.ftr-columns .footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

footer.site-footer.ftr-columns .footer-links a {
  color: var(--ocre-pale);
  text-decoration: none;
  font-size: .9rem;
  position: relative;
  width: fit-content;
}

footer.site-footer.ftr-columns .footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--ocre-clair);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}

footer.site-footer.ftr-columns .footer-links a:hover,
footer.site-footer.ftr-columns .footer-links a:focus-visible {
  color: var(--ocre-clair);
}

footer.site-footer.ftr-columns .footer-links a:hover::after,
footer.site-footer.ftr-columns .footer-links a:focus-visible::after {
  transform: scaleX(1);
}

footer.site-footer.ftr-columns .footer-grid .btn.btn-primary {
  background: var(--ocre);
  color: var(--brun-profond);
  border: 2px solid var(--ocre);
  border-radius: 5px;
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
}

/* Bas de page ocre : la quatrième bande */
footer.site-footer.ftr-columns .footer-bottom {
  background: var(--ocre);
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
}

footer.site-footer.ftr-columns .footer-copy {
  color: var(--brun-profond);
  font-size: .82rem;
  font-weight: 600;
}

footer.site-footer.ftr-columns .footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

footer.site-footer.ftr-columns .footer-bottom-links a {
  color: var(--brun-profond);
  font-size: .82rem;
  font-weight: 600;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   PAGE « AJOUTER MON ENTREPRISE » (.ie-wrap)
   Formulaire à gauche, arguments dans une colonne ocre pâle à bord brun.
   -------------------------------------------------------------------------- */

.ie-wrap {
  font-family: var(--police-charpente);
}

.ie-wrap .page-header h1 {
  color: var(--brun);
  font-weight: 700;
}

.ie-wrap .ie-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}

@media (min-width: 960px) {
  .ie-wrap .ie-grid {
    grid-template-columns: 1.7fr 1fr;
    gap: 34px;
  }
}

.ie-wrap .ie-card {
  background: #fef7f3;
  border: 1px solid var(--ocre-pale);
  border-left: 6px solid var(--ocre);
  border-radius: 10px;
  padding: 28px;
}

.ie-wrap .qf-section {
  color: var(--brun);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-bottom: 2px solid var(--ocre);
  padding-bottom: 8px;
  margin: 22px 0 16px;
}

.ie-wrap .qf-section:first-of-type {
  margin-top: 4px;
}

.ie-wrap .quote-lead-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .ie-wrap .quote-lead-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
  }
  .ie-wrap .quote-field-wide {
    grid-column: 1 / -1;
  }
}

.ie-wrap .quote-field label {
  color: var(--brun-profond);
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: 6px;
  display: inline-block;
}

.ie-wrap .qf-opt {
  color: var(--ocre);
  font-weight: 500;
}

.ie-wrap .ie-form input,
.ie-wrap .ie-form select,
.ie-wrap .ie-form textarea {
  border: 2px solid var(--brun);
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: .95rem;
  background: #fff;
  color: var(--brun-profond);
  width: 100%;
}

.ie-wrap .ie-form textarea {
  min-height: 100px;
  padding-top: 12px;
}

.ie-wrap .ie-form input:focus,
.ie-wrap .ie-form select:focus,
.ie-wrap .ie-form textarea:focus {
  outline: none;
  border-color: var(--ocre);
  box-shadow: 0 0 0 3px rgba(198, 88, 25, .3);
}

.ie-wrap .quote-lead-actions {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ie-wrap .quote-lead-actions .btn.btn-primary {
  background: var(--ocre);
  color: var(--brun-profond);
  border: 2px solid var(--ocre);
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  min-height: 48px;
  padding: 0 26px;
  align-self: flex-start;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.ie-wrap .quote-lead-actions .btn.btn-primary:hover,
.ie-wrap .quote-lead-actions .btn.btn-primary:focus-visible {
  transform: translateY(-2px);
  filter: brightness(.94);
  box-shadow: 0 8px 16px rgba(44, 19, 5, .25);
}

.ie-wrap .quote-lead-actions small {
  color: var(--brun-profond);
  font-size: .8rem;
}

.ie-wrap .ie-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ie-wrap .ie-why {
  background: var(--ocre-pale);
  border: 2px solid var(--brun);
  border-radius: 10px;
  padding: 22px;
}

.ie-wrap .ie-why h2 {
  color: var(--brun);
  font-weight: 700;
  font-size: 1.05rem;
  border-bottom: 2px solid rgba(120, 53, 15, .3);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.ie-wrap .ie-why ul {
  list-style: disc;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ie-wrap .ie-why li::marker {
  color: var(--ocre);
}

.ie-wrap .ie-why p {
  color: var(--brun-profond);
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   ANIMATIONS SOBRES
   -------------------------------------------------------------------------- */

@keyframes cebBandeGlisse {
  from { transform: translateX(-14%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

header.site-header.hdr-centered .hdr-centered-nav {
  animation: cebBandeGlisse .6s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  header.site-header.hdr-centered .hdr-centered-nav,
  header.site-header.hdr-centered .nav-link::after,
  header.site-header.hdr-centered .dropdown-trigger::after,
  footer.site-footer.ftr-columns .footer-links a::after,
  .ie-wrap .quote-lead-actions .btn.btn-primary {
    animation: none !important;
    transition: none !important;
  }
  header.site-header.hdr-centered .hdr-centered-nav {
    opacity: 1;
    transform: none;
  }
  .ie-wrap .quote-lead-actions .btn.btn-primary:hover,
  .ie-wrap .quote-lead-actions .btn.btn-primary:focus-visible {
    transform: none;
    filter: none;
  }
}
