/* ============================================================
   css/styles.css
   TOINETT – Design System (version dense)
   ============================================================ */

/* ===== 1. RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1D2A3A;
  background-color: #F8F9FA;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

/* ===== 2. VARIABLES CSS ===== */
:root {
  /* Couleurs primaires - charte TOINETT (logo) */
  --violet: #7F00FF;          /* charte, 6.28:1 sur blanc */
  --violet-light: #F3E8FF;    /* teinte de fond */
  --violet-dark: #3A0070;     /* fonds sombres, blanc dessus 14.85:1 */
  --violet-hover: #6B00D6;

  /* Couleur d'accent - charte TOINETT (logo) */
  --orange: #FFA500;          /* charte, aplats uniquement */
  --orange-hover: #E69400;
  --orange-light: #FFF4E0;
  --orange-text: #B35F00;     /* variante lisible, 4.61:1 sur blanc */

  /* Pieces jointes du formulaire (css/pieces-jointes.css) */
  --pj-fond: var(--gray-light);
  --pj-bordure: var(--gray-text);
  --pj-texte: var(--black-text);
  --pj-doux: var(--gray-text);
  --pj-accent: var(--orange);
  --pj-sur-accent: var(--violet-dark);
  --pj-lien: var(--violet);
  --pj-alerte-fond: var(--orange-light);
  --pj-rayon: var(--radius-sm);

  /* Neutres */
  --white: #FFFFFF;
  --gray-light: #F8F9FA;
  --gray-mid: #E9ECEF;
  --gray-text: #5A6B7C;
  --black-text: #1D2A3A;

  /* Succès */
  --green: #28A745;

  /* Ombres */
  --shadow-card: 0 4px 16px -6px rgba(58, 0, 112, 0.12);
  --shadow-hover: 0 12px 28px -8px rgba(58, 0, 112, 0.18);
  --shadow-btn: 0 4px 14px rgba(255, 165, 0, 0.38);

  /* Bordures */
  --radius-card: 12px;
  --radius-btn: 50px;
  --radius-sm: 6px;

  /* Transitions */
  --transition: 0.3s ease;

  /* Espacements (denses) */
  --space-xs: 4px;
  --space-sm: 10px;
  --space-md: 16px;
  --space-lg: 28px;
  --space-xl: 44px;
  --space-xxl: 60px;

  /* Typo */
  --font-title: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
}

/* ===== 3. TYPOGRAPHIE ===== */
h1,
h2,
h3,
h4 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.2;
  color: var(--violet);
}

h1 {
  font-size: 42px;
  letter-spacing: -0.5px;
}
h2 {
  font-size: 30px;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
}
h3 {
  font-size: 22px;
  font-weight: 600;
}
h4 {
  font-size: 18px;
  font-weight: 600;
}

p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-text);
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--orange-text);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.section-title {
  margin-bottom: 6px;
}

.section-sub {
  font-size: 17px;
  color: var(--gray-text);
  max-width: 600px;
  margin: 0 auto var(--space-lg) auto;
  text-align: center;
}

.text-center {
  text-align: center;
}

.text-white {
  color: var(--white) !important;
}

/* ===== 4. CONTENEUR ===== */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ===== 5. BOUTONS ===== */
.btn-primary {
  display: inline-block;
  background: var(--orange);
  color: var(--violet-dark);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 32px;
  border: none;
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-btn);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 165, 0, 0.48);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--violet);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 28px;
  border: 2px solid var(--violet);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--violet);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 6px 18px;
  font-size: 13px;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

/* ===== 6. BADGES ===== */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-green {
  background: var(--green);
  color: var(--white);
}

.badge-orange {
  background: var(--orange-light);
  color: var(--orange-text);
}

.badge-white {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== 7. CARTES ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px 18px;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--orange-light);
}

.card-icon {
  font-size: 36px;
  margin-bottom: var(--space-sm);
  display: block;
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--violet);
}

.card-text {
  font-size: 14px;
  color: var(--gray-text);
  margin-bottom: 0;
}

/* ===== 8. SECTIONS (denses) ===== */
section {
  padding: var(--space-xl) 0;
}

/* Alternance de fond. Selecteur positionnel : specificite 0,1,1, donc il
   battait .hero (0,1,0) et blanchissait le hero, qui est le 2e enfant de
   <body>. Les sections qui imposent leur fond le font desormais par une
   classe, pas par leur rang dans le DOM. */
section:nth-child(even):not(.hero):not(.trust-bar) {
  background: var(--white);
}

.section-dark {
  background: var(--violet-dark) !important;
  color: var(--white);
}

.section-dark .section-title,
.section-dark .section-tag {
  color: var(--white);
}

.section-dark .section-sub {
  color: rgba(255, 255, 255, 0.8);
}

/* ===== 9. NAVIGATION ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-mid);
  padding: 6px 0;
  transition: all var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== LOGO AVEC ICÔNE ===== */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 20px;
  color: var(--violet);
  text-decoration: none;
}

.logo img {
  display: block;
  height: 42px;
  width: auto;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.logo:hover img {
  transform: scale(1.04);
}

.footer-brand .logo img {
  height: 62px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  font-weight: 600;
  font-size: 14px;
  color: var(--black-text);
  transition: color var(--transition);
  position: relative;
  text-decoration: none;
  padding: 4px 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--orange-text);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links .btn-primary {
  padding: 6px 18px;
  font-size: 13px;
  box-shadow: none;
}

.nav-links .btn-primary:hover {
  box-shadow: var(--shadow-btn);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--violet);
  border-radius: 2px;
  transition: all var(--transition);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ===== 10. HERO (dense, impactant) ===== */
section.hero {
  background: linear-gradient(135deg, #2E0059 0%, var(--violet-dark) 45%, #6B00D6 100%);
  color: var(--white);
  padding: var(--space-xl) 0 var(--space-lg);
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-content {
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  padding: 3px 16px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.5px;
  margin-bottom: var(--space-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero h1 {
  font-size: 48px;
  color: var(--white);
  margin-bottom: 6px;
  line-height: 1.1;
}

.hero h1 span {
  color: var(--orange);
}

.hero .hero-sub {
  font-size: 17px;
  opacity: 0.9;
  margin-bottom: var(--space-md);
  max-width: 440px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.hero-actions .btn-secondary {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}

.hero-actions .btn-secondary:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

/* Bandeau de confiance dans le hero */
.hero-trust {
  margin-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.hero-trust span {
  background: rgba(255, 255, 255, 0.07);
  padding: 3px 14px;
  border-radius: 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-trust .dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
}

.hero-trust .dot-orange {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  display: inline-block;
}

.hero-image {
  z-index: 2;
  text-align: center;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hero-baseline {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 10px;
}

/* Décorations */
.hero-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 165, 0, 0.08);
  z-index: 1;
}

.hero-circle-1 {
  width: 300px;
  height: 300px;
  top: -60px;
  right: -60px;
}

.hero-circle-2 {
  width: 180px;
  height: 180px;
  bottom: -30px;
  left: 15%;
  background: rgba(255, 255, 255, 0.03);
}

/* ===== 11. QUI SOMMES-NOUS ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.about-text .badge {
  margin-bottom: 6px;
}

.about-text p {
  color: var(--gray-text);
  margin-bottom: var(--space-sm);
  font-size: 15px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.stat-item {
  text-align: center;
  background: var(--violet-light);
  padding: var(--space-md) 10px;
  border-radius: var(--radius-card);
  transition: all var(--transition);
}

.stat-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.stat-icon {
  font-size: 22px;
  display: block;
  margin-bottom: 2px;
}

.stat-number {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 30px;
  color: var(--violet);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--gray-text);
  font-weight: 600;
}

.about-image {
  background: var(--violet-light);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-card);
}

.about-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* ===== 12. SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ===== 13. PROCESSUS ===== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.process-step {
  text-align: center;
  padding: var(--space-md) var(--space-sm);
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
  border-top: 3px solid var(--orange);
}

.process-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.step-number {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 36px;
  color: var(--violet-light);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.process-step h4 {
  margin-bottom: var(--space-xs);
  font-size: 17px;
}

.process-step p {
  font-size: 14px;
  color: var(--gray-text);
  margin-bottom: 0;
}

/* ===== 14. RÉALISATIONS ===== */
/* Portfolio sans photo publiable : etat annonce, pas de visuel de substitution */
.portfolio-empty {
  background: var(--white);
  border: 1px dashed var(--gray-mid);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}

.portfolio-empty img {
  max-width: 320px;
  width: 100%;
  height: auto;
  margin: 0 auto var(--space-md);
}

.portfolio-empty p {
  color: var(--gray-text);
  font-size: 15px;
  margin-bottom: var(--space-sm);
}

.portfolio-empty p:last-child {
  margin-bottom: 0;
}

.portfolio-empty strong {
  color: var(--black-text);
}

.portfolio-empty a {
  color: var(--orange-text);
  font-weight: 600;
  text-decoration: underline;
}

/* Comparatif avant / apres. COMPOSANT EN ATTENTE : aucune page ne l'utilise
   aujourd'hui, faute de photos "apres" reelles. Le balisage a reprendre le jour
   ou David fournit ses cliches est documente dans CLAUDE.md. Ne pas l'alimenter
   avec une image generee. */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.compare-card {
  background: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
}

.compare-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.compare-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--gray-mid);
}

.compare-pair figure {
  position: relative;
  margin: 0;
  background: var(--violet-light);
}

.compare-pair img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.compare-pair figcaption {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 12px;
  border-radius: var(--radius-btn);
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--white);
  backdrop-filter: blur(2px);
}

.compare-pair .is-before figcaption {
  background: rgba(29, 42, 58, 0.82);
}

.compare-pair .is-after figcaption {
  background: var(--violet);
}

.compare-card .card-body {
  padding: 16px 20px 20px;
}

.compare-card .card-body h3 {
  font-size: 19px;
  margin-bottom: 4px;
}

.compare-card .card-body p {
  font-size: 14px;
  color: var(--gray-text);
  margin-bottom: 0;
}

.compare-card .badge {
  margin-top: 10px;
}

/* Photos portant deja leur cartouche AVANT / APRES incruste : pas de
   figcaption ajoute, et hauteur naturelle pour ne rien rogner. */
.compare-brut img {
  height: auto;
}

.compare-trois {
  grid-template-columns: repeat(3, 1fr);
}

.compare-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px !important;
}

.compare-meta span {
  background: var(--violet-light);
  color: var(--violet-dark);
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 3px 10px;
  border-radius: var(--radius-btn);
}

/* ===== 15. POURQUOI CHOISIR TOINETT ===== */
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.reason-item {
  text-align: center;
  padding: var(--space-md) var(--space-sm);
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}

.reason-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.reason-icon {
  font-size: 30px;
  margin-bottom: 6px;
  display: block;
}

.reason-item h4 {
  font-size: 16px;
  margin-bottom: 2px;
}

.reason-item p {
  font-size: 13px;
  color: var(--gray-text);
  margin-bottom: 0;
}

/* ===== 16. CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-infos h3 {
  margin-bottom: var(--space-sm);
}

.contact-infos p {
  color: var(--gray-text);
  margin-bottom: var(--space-md);
  font-size: 15px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  font-size: 16px;
}

.contact-detail .icon {
  font-size: 20px;
  width: 34px;
  text-align: center;
  color: var(--orange-text);
}

.contact-detail a {
  color: var(--black-text);
  transition: color var(--transition);
}

.contact-detail a:hover {
  color: var(--orange-text);
}

.contact-form {
  background: var(--white);
  padding: var(--space-lg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.contact-form .form-group {
  margin-bottom: 14px;
}

.contact-form label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 3px;
  color: var(--black-text);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 9px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius-sm);
  transition: border var(--transition), box-shadow var(--transition);
  background: var(--gray-light);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.22);
}

.contact-form textarea {
  resize: vertical;
  min-height: 90px;
}

.contact-form .btn-primary {
  width: 100%;
}

.form-status {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  border-left: 4px solid transparent;
}

.form-status-error {
  background: var(--orange-light);
  color: #8A3D00;
  border-left-color: var(--orange);
}

.form-status-info {
  background: var(--violet-light);
  color: var(--violet-dark);
  border-left-color: var(--violet);
}

.form-notice {
  background: var(--orange-light);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--black-text);
  margin-bottom: var(--space-md);
}

.form-notice a {
  color: var(--orange-text);
  font-weight: 700;
  text-decoration: underline;
}

.form-status-success {
  background: #E8F6EC;
  color: #1B6B31;
  border-left-color: var(--green);
}

/* ===== 16 bis. PAGES LEGALES ===== */
.legal {
  max-width: 820px;
  margin: 0 auto;
  background: var(--white);
  padding: var(--space-lg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.legal h2 {
  font-size: 20px;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}

.legal h2:first-child {
  margin-top: 0;
}

.legal p {
  font-size: 15px;
  color: var(--gray-text);
  margin-bottom: var(--space-sm);
  line-height: 1.7;
}

.legal strong {
  color: var(--black-text);
}

.legal a {
  color: var(--orange-text);
  font-weight: 600;
  text-decoration: underline;
}

/* Trou a combler. Volontairement voyant : outils/valider.py echoue tant
   qu'il en reste un, pour interdire une mise en ligne incomplete. */
.a-completer {
  background: var(--orange-light);
  border: 2px dashed var(--orange);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--black-text) !important;
  font-size: 14px !important;
}

/* ===== 17. BANDEAU DE CONFIANCE ===== */
.trust-bar {
  background: var(--violet-dark);
  padding: var(--space-md) 0;
  border-top: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
}

.trust-grid {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
}

.trust-item .icon {
  font-size: 22px;
}

.trust-item .label {
  font-weight: 700;
  font-size: 15px;
  color: var(--orange);
}

.trust-item .desc {
  font-size: 12px;
  opacity: 0.8;
}

/* ===== 18. FOOTER ===== */
footer {
  background: var(--violet-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-xl) 0 var(--space-md);
}

footer a {
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition);
}

footer a:hover {
  color: var(--orange);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-brand .logo {
  color: var(--white);
  margin-bottom: 8px;
  display: inline-flex;
}

.footer-brand p {
  font-size: 14px;
  max-width: 260px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-links h4,
.footer-contact h4 {
  color: var(--white);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  font-size: 16px;
}

.footer-links li {
  margin-bottom: var(--space-xs);
}

.footer-links a {
  font-size: 14px;
  text-decoration: none;
}

.footer-contact p {
  font-size: 14px;
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
}

.footer-bottom a:hover {
  color: var(--orange);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: var(--space-md);
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

/* ===== 19. ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== 20. RESPONSIVE ===== */

/* Tablettes */
@media (max-width: 992px) {
  h1 {
    font-size: 34px;
  }
  h2 {
    font-size: 26px;
  }

  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero h1 {
    font-size: 36px;
  }
  .hero .hero-sub {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-trust {
    justify-content: center;
  }
  .hero-image {
    max-width: 60%;
    margin: 0 auto;
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .about-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .process-grid {
    grid-template-columns: 1fr 1fr;
  }
  .reasons-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--white);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: var(--space-md);
    border-bottom: 2px solid var(--gray-mid);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    gap: var(--space-sm);
  }
  .nav-links.open {
    display: flex;
  }
  .menu-toggle {
    display: flex;
  }
  .nav-links .btn-primary {
    width: 100%;
    text-align: center;
  }
}

/* Mobiles */
@media (max-width: 600px) {
  .logo img {
    height: 34px;
  }

  .compare-pair {
    grid-template-columns: 1fr;
  }

  .compare-trois {
    grid-template-columns: 1fr;
  }

  .compare-pair img {
    height: 220px;
  }

  h1 {
    font-size: 26px;
  }
  h2 {
    font-size: 22px;
  }
  .hero {
    min-height: auto;
    padding: 40px 0 28px;
  }
  .hero h1 {
    font-size: 28px;
  }
  .hero .hero-sub {
    font-size: 15px;
  }
  .hero-image {
    max-width: 80%;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .process-grid {
    grid-template-columns: 1fr;
  }
  .reasons-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .contact-form {
    padding: var(--space-md);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn-secondary {
    text-align: center;
  }

  .trust-grid {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  section {
    padding: var(--space-lg) 0;
  }
}

/* Très petits écrans */
@media (max-width: 400px) {
  .about-stats {
    grid-template-columns: 1fr;
  }
  .reasons-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 21. DIRECTION A : COMPARATEUR, PHOTO DE FOND, PARTENAIRE =====
   Recopie de demo/demo.css le 2026-09-17, quand David a retenu la
   direction A. Le site ne depend plus du dossier demo/.
   La section 3 de demo.css (.monte) n'a pas ete reprise : le site
   anime deja avec .fade-in, gere par le bloc 2 de js/main.js. */

/* ===== 1. COMPARATEUR AVANT / APRES ===== */
/* Le mouvement que David a repere chez le site de son collegue :
   une poignee que l'on fait glisser pour reveler l'apres. */

.ab {
  --pos: 50%;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--violet-dark);
  user-select: none;
  touch-action: pan-y;
}

.ab img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.ab .ab-apres {
  clip-path: inset(0 0 0 var(--pos));
}

.ab-curseur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
}

.ab-curseur:focus-visible + .ab-poignee {
  box-shadow: 0 0 0 4px var(--orange);
}

.ab-poignee {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 3px;
  margin-left: -1.5px;
  background: var(--white);
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.45);
}

.ab-poignee::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* Double fleche gauche-droite, dessinee avec deux triangles CSS : plus
   sur qu'un degrade, qui rendait un chevron au lieu de fleches. */
.ab-poignee::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 0;
  height: 0;
  margin: -6px 0 0 -13px;
  border: 6px solid transparent;
  border-right-color: var(--violet);
}

.ab-poignee > i {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 0;
  height: 0;
  margin: -6px 0 0 1px;
  border: 6px solid transparent;
  border-left-color: var(--violet);
}

.ab-etiq {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 4px 12px;
  border-radius: var(--radius-btn);
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--white);
  pointer-events: none;
}

.ab-etiq-avant {
  left: 12px;
  background: rgba(29, 42, 58, 0.85);
}

.ab-etiq-apres {
  right: 12px;
  background: var(--violet);
}

/* Visuels sans comparateur (chantiers recus le 2026-09-14). Meme
   format 4:3 que .ab, pour que les cartes de la galerie restent alignees. */
.ab-paire,
.ab-sequence,
.ab-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--gray-light);
}

.ab-paire,
.ab-sequence {
  display: grid;
  gap: 4px;
  list-style: none;
}

.ab-paire { grid-template-columns: 1fr 1fr; }
.ab-sequence { grid-template-columns: repeat(3, 1fr); }

.ab-paire figure,
.ab-sequence li {
  position: relative;
  margin: 0;
  overflow: hidden;
}

.ab-paire img,
.ab-sequence img,
.ab-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ab-sequence img { object-position: 50% 62%; }

.ab-sequence span {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  padding: 4px 6px;
  border-radius: var(--radius-btn);
  background: rgba(29, 42, 58, 0.85);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
}

.ab-sequence b {
  display: inline-block;
  min-width: 18px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--violet-dark);
  text-align: center;
}

/* ===== 2. SECTION SOMBRE AVEC PHOTO DE TOITURE ===== */
/* Demande de David : "une photo de toiture en fond, meme en sombre,
   un peu comme la plaquette commerciale". La photo est assombrie A LA
   SOURCE par outils/preparer_photos.py, pas par une surcouche : le
   texte reste lisible meme si l'image met du temps a charger. */

/* Specificite : section.hero (0,1,1) porte deja un background, il faut
   au moins autant de poids pour le remplacer. */
section.hero.hero-photo {
  position: relative;
  background-image:
    linear-gradient(105deg, rgba(46, 0, 89, 0.94) 0%, rgba(58, 0, 112, 0.80) 45%, rgba(107, 0, 214, 0.55) 100%),
    url('../img/chantiers/fond-toiture.jpg');
  background-size: cover;
  background-position: center 38%;
}

.hero-photo .hero-circle {
  display: none;
}

/* --- Mention partenaire, pied de page --- */

.partenaire {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.partenaire a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
}

/* --- Comparateur sur petit ecran --- */

@media (max-width: 600px) {
  .ab {
    aspect-ratio: 3 / 4;
  }

  .ab-poignee::after {
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
  }
}

/* ===== 22. FORMULAIRE BRANCHE AU BACKEND (2026-09-18) ===== */

/* Champ piege a robots. PAS display:none ni visibility:hidden : des
   robots les detectent et laissent le champ vide. Il sort de l'ecran,
   et il est retire du parcours clavier (tabindex) et vocal (aria-hidden)
   dans le HTML. */
.hors-ecran {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Accord RGPD, obligatoire avant tout envoi */
.form-consentement label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.45;
  color: var(--gray-text);
  cursor: pointer;
}

.form-consentement input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--violet);
}

.form-consentement a {
  color: var(--violet);
  text-decoration: underline;
}

/* Champ signale en erreur par le serveur */
.contact-form [aria-invalid="true"] {
  border-color: var(--orange-text);
}
