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

:root {
  --blue: #0066cc;
  --blue-dark: #004fa3;
  --blue-light: #e8f1fb;
  --dark: #1c1c2e;
  --gray: #6b7280;
  --gray-light: #f4f6f9;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: .25s ease;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--dark);
  line-height: 1.6;
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-dark); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== BOUTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--blue-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,102,204,.3);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn-outline:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--blue);
}
.btn-white:hover {
  background: var(--blue-light);
  color: var(--blue-dark);
  transform: translateY(-2px);
}

/* ===== HEADER / NAV ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo img {
  height: 52px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--dark);
  font-weight: 500;
  font-size: .95rem;
  position: relative;
}

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

.nav-links a:not(.btn):hover::after,
.nav-links a:not(.btn).active::after { width: 100%; }
.nav-links a:not(.btn):hover { color: var(--blue); }

/* Le bouton CTA de la nav garde ses propres couleurs */
.nav-links .btn { position: static; }

.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  margin: 5px 0;
  transition: all var(--transition);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #0066cc 0%, #004fa3 60%, #003580 100%);
  color: var(--white);
  padding: 96px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content { position: relative; }

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero h1 span { color: #7ec8e3; }

.hero p {
  font-size: 1.15rem;
  opacity: .9;
  max-width: 560px;
  margin: 0 auto 36px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-badges {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.2);
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  opacity: .9;
}

.hero-badge svg { opacity: .8; }

/* ===== SECTIONS ===== */
section { padding: 80px 0; }

.section-label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--dark);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray);
  max-width: 540px;
}

.section-header { margin-bottom: 52px; }
.section-header.centered { text-align: center; }
.section-header.centered .section-subtitle { margin: 0 auto; }

/* ===== SERVICES ===== */
.services { background: var(--gray-light); scroll-margin-top: 72px; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

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

.service-card-icon {
  background: var(--blue-light);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card-icon svg {
  color: var(--blue);
}

.service-card-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--dark);
}

.service-card p {
  color: var(--gray);
  font-size: .95rem;
  margin-bottom: 20px;
  flex: 1;
}

.service-card .btn {
  align-self: flex-start;
}

/* ===== POURQUOI NOUS ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}

.why-item {
  text-align: center;
  padding: 32px 20px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.why-item:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
}

.why-icon {
  width: 60px; height: 60px;
  background: var(--blue-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--blue);
}

.why-item h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.why-item p {
  font-size: .9rem;
  color: var(--gray);
}

/* ===== CTA BAND ===== */
.cta-band {
  background: linear-gradient(135deg, #0066cc, #004fa3);
  color: var(--white);
  text-align: center;
  padding: 72px 0;
}

.cta-band h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-band p {
  font-size: 1.05rem;
  opacity: .85;
  margin-bottom: 32px;
}

/* ===== SERVICE DETAIL PAGE ===== */
.page-hero {
  background: linear-gradient(135deg, #0066cc 0%, #004fa3 100%);
  color: var(--white);
  padding: 72px 0 64px;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.page-hero p {
  font-size: 1.1rem;
  opacity: .85;
  max-width: 600px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-size: .85rem;
  margin-bottom: 24px;
  opacity: .75;
}

.breadcrumb a { color: inherit; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.detail-grid.reverse { direction: rtl; }
.detail-grid.reverse > * { direction: ltr; }

.detail-list {
  list-style: none;
  margin-top: 24px;
}

.detail-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: .95rem;
}

.detail-list li:last-child { border-bottom: none; }

.detail-list li::before {
  content: '';
  width: 20px; height: 20px;
  background: var(--blue-light);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%230066cc'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
}

.service-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.service-image img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

/* Image en format portrait : hauteur naturelle, pas de crop */
.service-image.portrait {
  align-self: start;
}
.service-image.portrait img {
  height: auto;
  max-height: 560px;
  object-fit: cover;
  object-position: center top;
}

.service-image-placeholder {
  width: 100%;
  height: 360px;
  background: linear-gradient(135deg, var(--blue-light), #d0e8ff);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--blue);
}

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

.contact-info {
  background: var(--blue);
  color: var(--white);
  border-radius: var(--radius);
  padding: 40px;
}

.contact-info h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 32px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-info-item svg {
  flex-shrink: 0;
  opacity: .85;
  margin-top: 2px;
}

.contact-info-item strong { display: block; margin-bottom: 4px; }
.contact-info-item span { font-size: .9rem; opacity: .85; }
.contact-info-item a { color: var(--white); opacity: .9; }
.contact-info-item a:hover { opacity: 1; }

/* ===== FORMULAIRE ===== */
.form-card {
  scroll-margin-top: 88px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label:not(.devis-toggle) {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .95rem;
  color: var(--dark);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,102,204,.12);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* Devis toggle */
.devis-toggle {
  display: flex !important;  /* surpasse le display:block de .form-group label */
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--blue-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-bottom: 0;
  border: 2px solid transparent;
  transition: border-color var(--transition), background var(--transition);
  user-select: none;
}

.devis-toggle:has(input:checked) {
  border-color: var(--blue);
  background: #d6e9f8;
}

/* Checkbox natif masqué — remplacé par .devis-toggle-box */
.devis-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Checkbox custom */
.devis-toggle-box {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border: 2px solid var(--blue);
  border-radius: 5px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.devis-toggle-box::after {
  content: '';
  display: block;
  width: 5px;
  height: 10px;
  border: 2.5px solid var(--white);
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0;
  transition: opacity var(--transition);
}

.devis-toggle:has(input:checked) .devis-toggle-box {
  background: var(--blue);
}

.devis-toggle:has(input:checked) .devis-toggle-box::after {
  opacity: 1;
}

.devis-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: .95rem;
  color: var(--dark);
  margin: 0;
  line-height: 1.3;
}

/* Devis section */
.devis-section {
  display: none;
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  padding: 28px;
  margin-top: 20px;
  border: 1px solid var(--border);
}

.devis-section.visible { display: block; }

.devis-section h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-group {
  margin-bottom: 20px;
}

.slider-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 10px;
}

.slider-value {
  background: var(--blue);
  color: var(--white);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 700;
  min-width: 70px;
  text-align: center;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  cursor: pointer;
  accent-color: var(--blue);
  border: none;
  padding: 0;
}

.devis-select-group {
  margin-bottom: 20px;
}

.devis-select-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.devis-select-group select {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .95rem;
  background: var(--white);
  color: var(--dark);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.devis-select-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,102,204,.12);
}

.devis-result {
  margin-top: 24px;
  background: var(--white);
  border: 2px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  text-align: center;
}

.devis-result-label {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 4px;
}

.devis-result-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 6px;
}

.devis-result-note {
  font-size: .8rem;
  color: var(--gray);
  font-style: italic;
}

.form-submit {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form-message {
  display: none;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  margin-top: 16px;
}

.form-message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
  display: block;
}

.form-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  display: block;
}

.input-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .15);
}

/* ===== FOOTER ===== */
footer {
  background: var(--dark);
  color: rgba(255,255,255,.75);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand img {
  height: 48px;
  width: auto;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
  opacity: .9;
}

.footer-brand p {
  font-size: .9rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 {
  color: var(--white);
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--white); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  font-size: .9rem;
}

.footer-contact-item svg { flex-shrink: 0; opacity: .6; margin-top: 2px; }

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,.1);
  margin-bottom: 24px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .85rem;
}

/* ===== UTILITAIRES ===== */
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid.reverse { direction: ltr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  section { padding: 56px 0; }
  .hero { padding: 64px 0 56px; }

  .nav-links { display: none; flex-direction: column; gap: 0; position: absolute; top: 72px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); padding: 12px 0; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 24px; }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-links a:not(.btn).active {
    color: var(--blue);
    font-weight: 700;
    border-left: 3px solid var(--blue);
    padding-left: 21px;
  }
  .nav-burger { display: block; }

  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .hero-badges { gap: 16px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .form-card { padding: 24px; }
  .contact-info { padding: 28px; }
}

/* ===== GALERIE RÉALISATIONS ===== */
.gallery {
  background: var(--dark);
  color: var(--white);
}

.gallery .section-label { color: #7ec8e3; }
.gallery .section-title { color: var(--white); }
.gallery .section-subtitle { color: rgba(255,255,255,.65); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 240px 240px;
  gap: 12px;
}

.gallery-item {
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-item-caption {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover .gallery-item-caption { opacity: 1; }

.gallery-item-caption span {
  color: var(--white);
  font-size: .85rem;
  font-weight: 600;
}

/* Item large (premier) */
.gallery-item.large {
  grid-row: span 2;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }
  .gallery-item.large { grid-row: span 1; }
  .gallery-item { height: 180px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item { height: 220px; }
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.92);
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 48px rgba(0,0,0,.6);
  cursor: default;
}

.lightbox-close {
  position: fixed;
  top: 20px; right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: .7;
  transition: opacity var(--transition);
  z-index: 1001;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-caption {
  position: fixed;
  bottom: 24px;
  left: 0; right: 0;
  text-align: center;
  color: rgba(255,255,255,.75);
  font-size: .9rem;
}

/* ===== TURNSTILE ===== */
