/* =========================================================
   Shell réel CGT Alkor (refonte) — compléments propres au site
   Laravel/Blade qui ne sont pas dans le design system mockup :
   - menu déroulant de langues (Strapi)
   - overlay de recherche
   - offset d'ancre sous le header sticky
   Le design system reste dans refonte.css (source unique).
   ========================================================= */

/* Ancrages : ne pas masquer la cible sous le header sticky */
html {
  scroll-padding-top: 96px;
}

/* ---------- Sélecteur de langue ---------- */
.lang {
  position: relative;
  display: inline-flex;
}
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  max-height: min(60vh, 420px);
  overflow-y: auto;
  padding: 6px;
  background: rgba(5, 29, 52, 0.98);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-md);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45);
  z-index: 120;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.lang.open .lang-menu {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.lang-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-2);
  transition: color 0.2s, background 0.2s;
}
.lang-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang-menu a:hover,
.lang-menu a[aria-current="true"] {
  color: var(--text);
  background: rgba(97, 177, 188, 0.12);
}

/* Drapeaux : juste le visuel, pas les lettres « fr » */
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lang-flag {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
  display: block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
  flex: 0 0 auto;
}
.lang-caret { opacity: 0.7; transition: transform 0.25s var(--ease-out); }
.lang.open .lang-caret { transform: rotate(180deg); }

/* =========================================================
   Grille responsive 3-up (gammes, projets) — mobile-first :
   1 colonne mobile, 2 colonnes tablette, 3 colonnes desktop.
   Remplace les styles inline qui forçaient 3 colonnes sur mobile.
   ========================================================= */
.grid-3 {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .grid-3 { gap: 24px; grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================
   Parallaxe immersif (scroll) — transform piloté en JS.
   Respecte prefers-reduced-motion (JS n'attache rien dans ce cas).
   ========================================================= */
[data-parallax] {
  will-change: transform;
  backface-visibility: hidden;
}
/* Le média hero est sur-dimensionné pour ne jamais révéler ses bords
   pendant le défilement parallaxe. */
.hero-media[data-parallax] {
  top: -12%;
  bottom: auto;
  height: 124%;
}
@media (prefers-reduced-motion: reduce) {
  [data-parallax] { transform: none !important; }
}

/* =========================================================
   Drawer mobile — refonte UX 2026
   ========================================================= */

/* Structure générale */
.drawer {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0;
  z-index: 110;
  background: linear-gradient(165deg,
    rgba(3, 12, 28, 0.99) 0%,
    rgba(5, 29, 58, 0.99) 100%
  );
  backdrop-filter: blur(28px) saturate(1.15);
  -webkit-backdrop-filter: blur(28px) saturate(1.15);
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
.drawer.open { transform: translateX(0); }

/* Header du drawer */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}
.drawer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.drawer-brand img {
  height: 34px;
  width: auto;
  display: block;
}
.drawer-brand-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  opacity: 0.9;
}
.drawer-close-btn {
  color: var(--text-3);
  flex-shrink: 0;
}

/* Body scrollable */
.drawer-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  -webkit-overflow-scrolling: touch;
}

/* Section */
.drawer-section {
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.drawer-section:last-child { border-bottom: 0; }

.drawer-section-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-soft);
  opacity: 0.72;
  margin-bottom: 10px;
  padding-left: 2px;
}

/* Familles produits (gros boutons avec icône) */
.drawer-families {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.drawer-family {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px;
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.22s var(--ease-out), border-color 0.22s;
  -webkit-tap-highlight-color: transparent;
}
.drawer-family:hover,
.drawer-family:active {
  background: rgba(97, 177, 188, 0.1);
  border-color: rgba(97, 177, 188, 0.22);
}
.drawer-family-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: rgba(97, 177, 188, 0.12);
  color: var(--accent-soft);
  flex-shrink: 0;
}
.drawer-family-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.drawer-family-body strong {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}
.drawer-family-body small {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.3;
}
.drawer-family-arrow {
  color: var(--text-3);
  flex-shrink: 0;
  opacity: 0.6;
  transition: transform 0.2s, opacity 0.2s;
}
.drawer-family:hover .drawer-family-arrow {
  transform: translateX(3px);
  opacity: 1;
}

/* Liens secondaires */
.drawer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.drawer-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 2px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.drawer-links a:last-child { border-bottom: 0; }
.drawer-links a:hover,
.drawer-links a:active {
  color: var(--text);
  padding-left: 4px;
}
.drawer-links a svg { color: var(--text-3); opacity: 0.6; flex-shrink: 0; }
.drawer-links a:hover svg { opacity: 1; }

.drawer-links-secondary a {
  font-size: 14px;
  color: var(--text-3);
}
.drawer-links-secondary a:hover { color: var(--text-2); }

/* Liens de la section principale (gammes) : plus imposants */
.drawer-links-primary a {
  font-size: 18px;
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  color: var(--text);
  letter-spacing: -0.01em;
  padding: 16px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.drawer-links-primary a:hover {
  color: var(--accent-soft);
  padding-left: 6px;
}
.drawer-section-families {
  padding-top: 20px;
  padding-bottom: 4px;
}

/* Footer */
.drawer-footer {
  flex-shrink: 0;
  padding: 16px 20px max(20px, env(safe-area-inset-bottom, 16px));
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(3, 10, 22, 0.6);
}
.drawer-cta {
  width: 100%;
  justify-content: center;
  gap: 8px;
}
.drawer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: var(--text-3);
}
.drawer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  color: var(--text-3);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--hairline);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.drawer-social a:hover {
  color: var(--accent-soft);
  background: rgba(97, 177, 188, 0.1);
  border-color: rgba(97, 177, 188, 0.3);
}

/* ---------- Overlay de recherche ---------- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  padding: clamp(64px, 14vh, 180px) 20px 20px;
  background: rgba(3, 15, 30, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}
.search-overlay.is-open {
  display: block;
  opacity: 1;
}
.search-overlay-inner {
  width: min(720px, 100%);
  margin: 0 auto;
}
.search-form {
  position: relative;
  display: flex;
  align-items: center;
}
.search-form .search-ic {
  position: absolute;
  left: 20px;
  color: var(--accent-soft);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 18px 56px 18px 54px;
  font-size: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus {
  border-color: rgba(97, 177, 188, 0.55);
  box-shadow: 0 0 0 4px rgba(97, 177, 188, 0.14);
}
.search-close {
  position: absolute;
  right: 12px;
  color: var(--text-3);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--r-pill);
  transition: color 0.2s, background 0.2s;
}
.search-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.search-suggestions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.search-suggestions .eyebrow { width: 100%; margin-bottom: 4px; }
.search-suggestions a {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.search-suggestions a:hover {
  color: var(--text);
  background: rgba(97, 177, 188, 0.12);
  border-color: rgba(97, 177, 188, 0.4);
}
