/* 2IM Technology — feuille de style commune à toutes les pages.
   Charte fixe : un seul thème clair, couleurs de la marque ci-dessous. */
:root {
  color-scheme: light;
  --navy: #0B2545;
  --blue: #0072BC;
  --blue-ink: #005A96;
  --orange: #F07F1F;
  --green: #7AB929;
  --ink: #10213A;
  --muted: #4A5B70;
  --line: #E3E9F0;
  --tint: #EAF3FB;
  --paper: #FFFFFF;
  --soft: #F3F6F9;
  --font-display: 'Exo 2', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
h1, h2 { text-wrap: balance; }
a { color: var(--blue-ink); transition: background-color .2s, color .2s, box-shadow .2s, transform .2s, filter .2s; }
a:hover { color: var(--navy); }
button { transition: background-color .2s, color .2s, filter .2s, border-color .2s; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue) !important; }
fieldset { min-width: 0; }
input, select, textarea { max-width: 100%; min-width: 0; }

/* En-tête */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.site-header__in { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-logo { display: block; line-height: 0; }
.site-logo img { height: 48px; width: auto; }
.main-nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.nav-link { padding: 12px 14px; font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; border-radius: 8px; }
.nav-link:hover { background: var(--soft); color: var(--ink); }
.nav-link.is-current { color: var(--blue); background: var(--tint); font-weight: 700; }
.nav-cta { margin-left: 8px; padding: 12px 22px; background: var(--orange); color: var(--navy); font-weight: 700; font-size: 15px; border-radius: 999px; text-decoration: none; }
.nav-cta:hover { color: var(--navy); filter: brightness(1.07); }
.nav-cta.is-current { background: var(--navy); color: var(--paper); }
.tri-strip { display: flex; height: 4px; }
.tri-strip span:nth-child(1) { flex: 6; background: var(--blue); }
.tri-strip span:nth-child(2) { flex: 3; background: var(--orange); }
.tri-strip span:nth-child(3) { flex: 2; background: var(--green); }

.menu-toggle { display: none; width: 48px; height: 48px; border: 1px solid #D5DFEA; border-radius: 12px; background: var(--paper); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-toggle span { display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--navy); transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; }
  .main-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 8px 0 4px; }
  .main-nav.is-open { display: flex; }
  .nav-cta { margin: 8px 0 0; text-align: center; }
}

/* Survols des cartes et boutons */
a[style*="border-radius:999px"]:hover, button[type="submit"]:hover { filter: brightness(1.07); }
a[style*="border-radius:18px"]:hover { box-shadow: 0 14px 34px rgba(11,37,69,.10); transform: translateY(-2px); }
aside nav a:not([aria-current]):hover { background: var(--soft); }
footer a:hover { color: var(--paper) !important; text-decoration: underline !important; }
.gal-item img { transition: transform .3s; }
.gal-item:hover img { transform: scale(1.03); }

@media (max-width: 640px) {
  [style*="grid-template-columns:repeat(auto-fit"] { grid-template-columns: minmax(0, 1fr) !important; }
  section > svg[aria-hidden="true"] { display: none; }
  .topbar-social { display: none !important; }
  [style*="border-radius:20px;padding:40px"] { padding: 24px !important; }
}

/* Filtres Réalisations */
.filter-btn { min-height: 44px; padding: 11px 18px; border-radius: 999px; border: 1px solid #D5DFEA; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-weight: 600; font-size: 14px; cursor: pointer; }
.filter-btn:hover { border-color: var(--blue); }
.filter-btn.is-active { background: var(--navy); border-color: var(--navy); color: var(--paper); }

/* Formulaires */
.pill { position: relative; display: inline-flex; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 11px 16px; border-radius: 999px; border: 1px solid #C3CFDC; background: var(--paper); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.pill span:hover { border-color: var(--blue); }
.pill input:checked + span { background: var(--blue); border-color: var(--blue); color: var(--paper); }
.pill input:checked + span::before { content: "✓"; }
.pill input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.form-error { margin: 0; padding: 14px 16px; border-radius: 12px; background: #FDECEC; color: #8A1C1C; font-size: 15px; font-weight: 600; }
[aria-invalid="true"] { border-color: #C0392B !important; }

/* Visionneuse photo */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(6,18,36,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: max(24px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.lightbox__bar, .lightbox__stage { width: 100%; max-width: 1100px; display: flex; align-items: center; }
.lightbox__bar { justify-content: space-between; color: #DCE6F2; font-size: 14px; }
.lightbox__stage { gap: 16px; }
.lightbox__img { flex: 1; min-width: 0; max-height: 72vh; object-fit: contain; border-radius: 12px; }
.lightbox__caption { margin: 0; max-width: 900px; text-align: center; color: var(--paper); font-size: 16px; line-height: 1.5; }
.lb-btn { width: 52px; height: 52px; flex: none; border-radius: 999px; border: 0; background: var(--paper); color: var(--navy); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lb-close { background: transparent; color: var(--paper); border: 1px solid rgba(255,255,255,.4); width: 48px; height: 48px; }
@media (max-width: 640px) { .lightbox__stage .lb-btn { display: none; } }

/* Boutons flottants */
.wa-float { position: fixed; right: max(20px, calc(env(safe-area-inset-right, 0px) + 12px)); bottom: max(20px, calc(env(safe-area-inset-bottom, 0px) + 12px)); z-index: 50; width: 58px; height: 58px; border-radius: 999px; background: #25D366; color: var(--navy); display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 28px rgba(11,37,69,.28); }
.wa-float:hover { color: var(--navy); transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* Accessibilité et formulaires */
.skip-link { position: absolute; left: -9999px; top: 12px; z-index: 200; padding: 12px 18px; border-radius: 8px; background: var(--navy); color: var(--paper); font-weight: 700; text-decoration: none; }
.skip-link:focus { left: 12px; color: var(--paper); }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }
