/* =============================
   Éther Drift Patrimoine Automobile — style.css
   Design style: modern_bold (bold fonts, bright colors, geometric shapes, high contrast)
   Layout: MOBILE-FIRST, Flexbox-only (NO CSS Grid/Columns)
   ============================= */

/* RESET & BASELINE */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding-left: 1.25rem; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; border: none; background: none; cursor: pointer; }
:focus-visible { outline: 3px solid #F2E8C9; outline-offset: 2px; }

/* THEME VARIABLES (with fallbacks) */
:root {
  --c-primary: #0D1B2A; /* dark navy */
  --c-secondary: #0B3D2E; /* deep green */
  --c-accent: #F2E8C9; /* light cream */
  --c-ink: #0D1B2A; /* text on light */
  --c-bg: #FFFFFF; /* page background */
  --c-muted: #E6ECF2; /* light divider */
  --c-soft: #F7F9FC; /* soft background */
  --shadow-1: 0 6px 16px rgba(13,27,42,.15);
  --shadow-2: 0 12px 28px rgba(13,27,42,.22);
  --radius-s: 10px; /* geometric rounded */
  --radius-m: 14px;
  --radius-pill: 1000px;
  --speed-fast: .18s;
  --speed: .28s;
}

/* TYPOGRAPHY */
body {
  background: #FFFFFF; background: var(--c-bg);
  color: #0D1B2A; color: var(--c-ink);
  font-family: Arial, Helvetica, sans-serif; /* brand body */
  line-height: 1.6;
  font-size: 16px;
}
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; /* brand display */ font-weight: 700; letter-spacing: .3px; }
h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 24px; line-height: 1.25; }
h3 { font-size: 18px; line-height: 1.3; }
p, li { font-size: 16px; }
strong { font-weight: 700; }

/* GEOMETRIC EMPHASIS (modern_bold) */
.content-wrapper > h1, .content-wrapper > h2 { position: relative; padding-top: 6px; }
.content-wrapper > h1::before, .content-wrapper > h2::before {
  content: ""; display: block; width: 72px; height: 6px; border-radius: 3px;
  background: #F2E8C9; background: var(--c-accent);
  margin-bottom: 14px;
}

/* LAYOUT CONTAINERS (Flex only) */
.container {
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; flex-direction: column; gap: 20px;
}
.content-wrapper {
  display: flex; flex-direction: column; gap: 16px; align-items: flex-start; justify-content: flex-start;
}
main { display: flex; flex-direction: column; gap: 20px; }
section { margin-bottom: 60px; padding: 40px 20px; background: #FFFFFF; border-radius: var(--radius-m); }

/* Alternate soft section background for rhythm (keeps contrast) */
main > section:nth-of-type(odd) { background: #F7F9FC; background: var(--c-soft); }

/* NAVIGATION — HEADER */
header { position: sticky; top: 0; z-index: 1000; background: #0D1B2A; background: var(--c-primary); color: #F2E8C9; color: var(--c-accent); box-shadow: 0 2px 12px rgba(0,0,0,.15); }
header .container { padding-top: 14px; padding-bottom: 14px; }
header .content-wrapper { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }
.logo { display: flex; align-items: center; }
.logo img { height: 36px; width: auto; }

.main-nav { display: none; align-items: center; gap: 18px; }
.main-nav a {
  color: #F2E8C9; color: var(--c-accent); font-weight: 700; padding: 8px 10px; border-radius: 8px; position: relative;
}
.main-nav a::after {
  content: ""; position: relative; display: block; height: 3px; width: 0; background: #F2E8C9; background: var(--c-accent); border-radius: 2px; transition: width var(--speed);
}
.main-nav a:hover::after, .main-nav a:focus-visible::after { width: 100%; }

.header-cta { display: none; align-items: center; gap: 12px; }
.header-cta a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--radius-s); font-weight: 800; letter-spacing: .3px;
  background: #F2E8C9; background: var(--c-accent); color: #0D1B2A; color: var(--c-primary);
  transition: transform var(--speed-fast) ease, box-shadow var(--speed-fast) ease, background var(--speed-fast) ease, color var(--speed-fast) ease;
  box-shadow: var(--shadow-1);
}
.header-cta a:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.header-cta a + a { background: transparent; color: #F2E8C9; color: var(--c-accent); box-shadow: inset 0 0 0 2px #F2E8C9; }
.header-cta a + a:hover { background: #F2E8C9; color: #0D1B2A; }

/* MOBILE MENU */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; color: #0D1B2A; background: #F2E8C9; font-size: 20px; font-weight: 900;
}
.mobile-menu-toggle:hover { filter: brightness(.95); }
.mobile-menu {
  position: fixed; inset: 0; background: rgba(13,27,42,.96); color: #F2E8C9; z-index: 1200;
  display: flex; flex-direction: column; padding: 24px; gap: 20px;
  transform: translateX(100%); transition: transform var(--speed) ease;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; width: 44px; height: 44px; border-radius: 10px; color: #0D1B2A; background: #F2E8C9; font-size: 18px; font-weight: 900; }
.mobile-nav { display: flex; flex-direction: column; gap: 12px; }
.mobile-nav a { display: flex; align-items: center; padding: 12px 10px; border-radius: 10px; font-weight: 800; background: rgba(242,232,201,.06); color: #F2E8C9; }
.mobile-nav a:hover { background: rgba(242,232,201,.16); }

/* HERO & CTA LINKS IN SECTIONS */
.content-wrapper > div > a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; border-radius: var(--radius-s); font-weight: 800; letter-spacing: .3px;
  background: #0B3D2E; background: var(--c-secondary); color: #F2E8C9; box-shadow: var(--shadow-1);
  transition: transform var(--speed-fast) ease, box-shadow var(--speed-fast) ease, background var(--speed-fast) ease, color var(--speed-fast) ease;
}
.content-wrapper > div > a:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.content-wrapper > div > a + a { background: #F2E8C9; color: #0D1B2A; box-shadow: inset 0 0 0 2px #0D1B2A; }
.content-wrapper > div { display: flex; flex-wrap: wrap; gap: 12px; }

/* LISTS & TEXT */
ul li, ol li { margin-bottom: 8px; }
ul li::marker { color: #0B3D2E; }
ol { padding-left: 1.25rem; }
.text-section { display: flex; flex-direction: column; gap: 12px; }

/* FEATURE GRID */
.feature-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.feature-grid > div {
  flex: 1 1 260px; min-width: 260px; background: #FFFFFF; border-radius: var(--radius-m);
  border: 2px solid #E6ECF2; box-shadow: var(--shadow-1); padding: 20px;
  display: flex; flex-direction: column; gap: 10px; position: relative;
}
.feature-grid > div::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; border-top-left-radius: var(--radius-m); border-bottom-left-radius: var(--radius-m); background: #0B3D2E; background: var(--c-secondary);
}
.feature-grid > div:hover { transform: translateY(-4px); transition: transform var(--speed-fast); }

/* TRUST BADGES */
.trust-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.trust-badges span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-pill); background: #F2E8C9; color: #0D1B2A; font-weight: 700; }
.trust-badges img { width: 18px; height: 18px; }

/* TESTIMONIALS (High contrast on light background) */
.testimonial-card {
  display: flex; align-items: center; gap: 20px; padding: 20px; border-radius: var(--radius-m);
  background: #F2E8C9; color: #0D1B2A; box-shadow: var(--shadow-1);
  flex-wrap: wrap;
}

/* DETAILS / SUMMARY (FAQs) */
details { width: 100%; border-radius: var(--radius-m); background: #FFFFFF; border: 2px solid #E6ECF2; box-shadow: var(--shadow-1); }
summary {
  list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 800; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #0D1B2A;
}
summary::after { content: "+"; font-weight: 900; color: #0B3D2E; }
details[open] summary::after { content: "–"; }
details .text-section { padding: 0 16px 16px; }

/* FOOTER */
footer { background: #0D1B2A; color: #F2E8C9; padding: 30px 0; }
footer .content-wrapper { display: flex; flex-direction: column; gap: 18px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-nav a { color: #F2E8C9; padding: 8px 10px; border-radius: 8px; background: rgba(242,232,201,.06); font-weight: 700; }
.footer-nav a:hover { background: rgba(242,232,201,.16); }
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand img { width: 40px; height: auto; }
.footer-cta { display: flex; flex-direction: column; gap: 10px; }
.footer-cta a { color: #0D1B2A; background: #F2E8C9; padding: 8px 12px; border-radius: var(--radius-s); font-weight: 800; display: inline-flex; }
.footer-meta { opacity: .9; }

/* ICON LISTS (contact page) */
ul li img { width: 18px; height: 18px; margin-right: 8px; display: inline-block; vertical-align: middle; }
ul li { display: flex; align-items: center; gap: 8px; }

/* GENERIC CARDS & GRIDS (MANDATORY PATTERNS) */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: #FFFFFF; border-radius: var(--radius-m); box-shadow: var(--shadow-1); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* ACCESSIBILITY & INTERACTIONS */
a, button { transition: color var(--speed-fast) ease, background-color var(--speed-fast) ease, transform var(--speed-fast) ease, box-shadow var(--speed-fast) ease; }
a:hover, a:focus-visible { filter: none; }

/* COOKIE CONSENT — Banner */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500; display: none;
  background: #0D1B2A; color: #F2E8C9; box-shadow: 0 -8px 24px rgba(0,0,0,.2);
}
.cookie-banner.show, .cookie-banner.is-visible { display: flex; }
.cookie-banner .container { flex-direction: column; gap: 12px; padding: 16px 20px; }
.cookie-banner .cookie-text { display: flex; flex-direction: column; gap: 8px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn, .cookie-actions button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: var(--radius-s); font-weight: 800; }
.cookie-actions .accept { background: #F2E8C9; color: #0D1B2A; box-shadow: var(--shadow-1); }
.cookie-actions .accept:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.cookie-actions .reject { background: transparent; color: #F2E8C9; box-shadow: inset 0 0 0 2px #F2E8C9; }
.cookie-actions .settings { background: #0B3D2E; color: #F2E8C9; }

/* COOKIE CONSENT — Modal */
.cookie-modal {
  position: fixed; inset: 0; z-index: 1600; display: none; align-items: center; justify-content: center;
  background: rgba(13,27,42,.62);
}
.cookie-modal.open, .cookie-modal.is-open { display: flex; }
.cookie-modal .modal-panel {
  background: #FFFFFF; color: #0D1B2A; border-radius: 16px; box-shadow: var(--shadow-2);
  width: min(92vw, 640px); padding: 20px; display: flex; flex-direction: column; gap: 16px;
}
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Toggle control for cookie categories */
.toggle { display: inline-flex; align-items: center; gap: 10px; }
.toggle input[type="checkbox"] { appearance: none; width: 44px; height: 26px; border-radius: 26px; background: #E6ECF2; position: relative; transition: background var(--speed-fast);
}
.toggle input[type="checkbox"]::after { content: ""; position: absolute; left: 4px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: #0D1B2A; transition: transform var(--speed-fast); }
.toggle input[type="checkbox"]:checked { background: #0B3D2E; }
.toggle input[type="checkbox"]:checked::after { transform: translateX(18px); background: #F2E8C9; }
.toggle .label { font-weight: 700; }

/* RESPONSIVE */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
  .content-wrapper { gap: 18px; }
  .text-image-section { flex-direction: row; }
  .cookie-banner .container { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 992px) {
  header .content-wrapper { gap: 20px; }
  .main-nav { display: flex; }
  .header-cta { display: flex; }
  .mobile-menu-toggle { display: none; }
  .container { gap: 24px; }
  section { padding: 48px 28px; }
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  p, li { font-size: 18px; }
}

/* PRINT (simple) */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  section { background: #FFFFFF; box-shadow: none; }
}

/* UTILITY (safe, flex-only) */
.flex { display: flex; }
.row { display: flex; flex-direction: row; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.center { display: flex; align-items: center; justify-content: center; }

/* Ensure all critical spacing and no overlap */
section + section { margin-top: 0; }

/* Page-specific small touches */
/* KPI/notes links as chips where applicable */
.content-wrapper a[href$=".html"]:not(.main-nav a):not(.footer-nav a):not(.mobile-nav a) {
  /* keep regular link appearance inside paragraphs */
}

/* Accessibility: visible skip styles if added later */
.skip-link { position: absolute; top: -40px; left: 0; background: #F2E8C9; color: #0D1B2A; padding: 8px 12px; border-radius: 0 0 8px 0; }
.skip-link:focus { top: 0; }
