/* Cerebro, site principal : page d'accueil Optis Oignons (une seule page + pages légales).
   Univers repris de la vitrine optis-oignons.com : fond #050309, violets #714bc7 / #7043D8 / #50309F, lavande #B48CCB,
   gris #a39fab, police Figtree (titres et texte). Mobile d'abord, bureau à partir de 960 px. */

@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/figtree-var-latin.woff2') format('woff2'); }

:root {
  --bg: #050309;
  --surface: #0f0b18;
  --surface-2: #161124;
  --line: rgba(239, 242, 255, .14);
  --text: #ffffff;
  --muted: #a39fab;
  --ice: #eff2ff;
  --lav: #b48ccb;
  --violet: #714bc7;
  --violet-2: #7043d8;
  --violet-3: #50309f;
  --radius: 14px;
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
p, li { text-wrap: pretty; }
ul[role="list"] { list-style: none; margin: 0; padding: 0; }
::selection { background: var(--violet-2); color: #fff; }
:focus-visible { outline: 2px solid var(--lav); outline-offset: 3px; border-radius: 4px; }
.cb-skip { position: absolute; left: -9999px; top: 8px; z-index: 20; background: #fff; color: var(--bg); padding: 10px 14px; font-weight: 700; border-radius: 6px; }
.cb-skip:focus { left: 8px; }
.cb-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------------------------------------------------------------- Boutons */
.cb-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 8px; border: 1px solid transparent; font: 700 17px/1 var(--font); text-decoration: none; cursor: pointer; transition: background-color .2s ease-out, color .2s ease-out, border-color .2s ease-out; }
.cb-btn-paper { background: #fff; color: var(--bg); }
.cb-btn-paper:hover { background: var(--ice); }
.cb-btn-line { background: transparent; color: #fff; border-color: rgba(239, 242, 255, .4); }
.cb-btn-line:hover { border-color: #fff; background: rgba(239, 242, 255, .08); }
.cb-linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

/* ---------------------------------------------------------------- En-tête */
.cb-header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.cb-logo { display: inline-flex; padding: 4px 0; }
.cb-logo img { width: 150px; height: auto; }
.cb-header-link { color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; padding: 10px 16px; border: 1px solid rgba(239, 242, 255, .32); border-radius: 8px; }
.cb-header-link:hover { border-color: #fff; background: rgba(239, 242, 255, .08); }
html { scroll-padding-top: 16px; }

/* ---------------------------------------------------------------- Premier écran */
.cb-hero { padding: 28px 0 8px; }
.cb-hero-grid { display: flex; flex-direction: column; gap: 8px; }
.cb-hero-text { display: flex; flex-direction: column; gap: 16px; }
.cb-hero-title { font-size: clamp(40px, 11vw, 80px); line-height: 1.02; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.cb-hero-sub { font-size: clamp(19px, 4.6vw, 28px); line-height: 1.35; font-weight: 500; color: var(--ice); max-width: 30ch; text-wrap: balance; }
.cb-anim { position: relative; width: min(100%, 260px); aspect-ratio: 1; margin: 0 auto; opacity: 0; transition: opacity .9s cubic-bezier(.16, 1, .3, 1); }
.cb-anim::before { content: ''; position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(closest-side, rgba(112, 67, 216, .28), rgba(112, 67, 216, 0)); }
.cb-anim.is-on { opacity: 1; }
.cb-anim canvas { position: relative; display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.cb-anim canvas:active { cursor: grabbing; }

/* ---------------------------------------------------------------- Sections */
.cb-sec { padding: 56px 0; }
.cb-h1 { font-size: clamp(34px, 7vw, 52px); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.cb-h2 { font-size: clamp(26px, 6vw, 38px); line-height: 1.15; font-weight: 700; letter-spacing: -.015em; text-wrap: balance; }
.cb-sec-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.cb-sec-head p { color: var(--muted); max-width: 48ch; }

/* Trois métiers */
.cb-trades .cb-h2 { margin-bottom: 28px; }
.cb-trade-list { display: grid; gap: 28px; }
.cb-trade { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.cb-trade h3 { font-size: 21px; line-height: 1.25; font-weight: 700; }
.cb-trade p { color: var(--muted); font-size: 16px; line-height: 1.55; max-width: 40ch; }

/* Modèles */
.cb-model-list { display: grid; gap: 20px; }
.cb-model-link { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: border-color .25s ease-out, transform .25s cubic-bezier(.16, 1, .3, 1), background-color .25s ease-out; }
.cb-model-link:hover { border-color: rgba(180, 140, 203, .7); background: var(--surface-2); transform: translateY(-3px); }
.cb-model-link:focus-visible { outline-offset: 4px; border-radius: var(--radius); }
.cb-model-shot { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); border-bottom: 1px solid var(--line); overflow: hidden; }
.cb-model-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.cb-model-link:hover .cb-model-shot img { transform: scale(1.02); }
.cb-model-noshot { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 28px; font-weight: 700; color: var(--lav); }
.cb-model-body { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 22px; }
.cb-model-name { font-size: 24px; line-height: 1.2; font-weight: 700; }
.cb-model-trade { color: var(--lav); font-size: 15px; }
.cb-model-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 15px; font-weight: 700; }
.cb-model-cta svg { transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.cb-model-link:hover .cb-model-cta svg { transform: translateX(4px); }

/* Appel à l'action */
.cb-cta { padding: 8px 0 64px; }
.cb-cta-inner { position: relative; }
.cb-cta-inner::before { content: ''; position: absolute; inset: 0 20px; z-index: -1; border-radius: 20px; background: linear-gradient(135deg, var(--violet-2) 0%, var(--violet-3) 100%); }
.cb-cta-inner { isolation: isolate; padding-top: 44px; padding-bottom: 44px; padding-left: 44px; padding-right: 44px; display: flex; flex-direction: column; gap: 16px; }
.cb-cta-inner > p { color: var(--ice); max-width: 46ch; }
.cb-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 8px; }
.cb-btn-icon { flex: none; margin-right: 10px; }
@media (max-width: 719px) { .cb-cta-actions .cb-btn { flex: 1 1 100%; } }
.cb-btn-on-violet { color: #fff; border-color: rgba(255, 255, 255, .7); }
.cb-btn-on-violet:hover { border-color: #fff; background: rgba(255, 255, 255, .12); color: #fff; }
.cb-cta :focus-visible { outline-color: #fff; }

/* Pages légales */
.cb-prose { max-width: 760px; display: flex; flex-direction: column; gap: 16px; }
.cb-prose h2 { font-size: 22px; font-weight: 700; margin-top: 16px; }
.cb-prose p, .cb-prose li { color: #d8d4e0; }
.cb-prose a { color: #fff; }
.cb-prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.cb-back { font-weight: 700; display: inline-block; padding: 12px 0; }

/* ---------------------------------------------------------------- Pied de page */
.cb-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.cb-footer-row { display: flex; flex-direction: column; gap: 6px; padding-top: 20px; padding-bottom: 24px; }
.cb-footer-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.cb-footer-links a, .cb-footer-links .cb-linklike { color: var(--muted); text-decoration: none; padding: 12px 0; display: inline-block; }
.cb-footer-links a:hover, .cb-footer-links .cb-linklike:hover { color: #fff; text-decoration: underline; }

/* ---------------------------------------------------------------- Bannière de consentement */
.cb-consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; background: #14101f; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: #d8d4e0; box-shadow: 0 12px 32px rgba(0, 0, 0, .45); }
.cb-consent[hidden] { display: none; }
.cb-consent-title { color: #fff; font-weight: 700; }
.cb-consent a { color: #fff; }
.cb-consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.cb-consent .cb-btn { min-height: 46px; padding: 0 16px; font-size: 16px; }

/* ================================================================ Bureau */
@media (min-width: 720px) {
  .cb-wrap { padding: 0 32px; }
  .cb-anim { width: min(100%, 360px); }
  .cb-logo img { width: 200px; }
  .cb-trade-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .cb-model-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  /* Un seul modèle : carte horizontale sur toute la largeur (capture à gauche, texte à droite) */
  .cb-model-list.n-1 { grid-template-columns: 1fr; }
  .cb-model-list.n-1 .cb-model-link { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .cb-model-list.n-1 .cb-model-shot { border-bottom: 0; border-right: 1px solid var(--line); }
  .cb-model-list.n-1 .cb-model-body { justify-content: center; padding: 32px 40px; }
  .cb-model-list.n-1 .cb-model-name { font-size: 32px; }
  .cb-cta-inner::before { inset: 0 32px; }
  .cb-cta-inner { padding: 64px 80px; }
  .cb-consent { left: auto; right: 20px; bottom: 20px; max-width: 420px; }
  .cb-footer-row { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
}
@media (min-width: 960px) {
  .cb-header-row { padding-top: 24px; padding-bottom: 24px; }
  .cb-hero { padding: 32px 0 16px; }
  .cb-hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: 32px; }
  .cb-anim { width: 100%; max-width: 520px; }
  .cb-model-list.n-3, .cb-model-list.n-5, .cb-model-list.n-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cb-model-list.n-3 .cb-model-name, .cb-model-list.n-5 .cb-model-name, .cb-model-list.n-6 .cb-model-name { font-size: 22px; }
  .cb-sec { padding: 80px 0; }
  .cb-sec-head { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 36px; }
  .cb-trades .cb-h2 { margin-bottom: 36px; }
  .cb-cta { padding: 24px 0 96px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cb-anim, .cb-model-link, .cb-model-shot img, .cb-model-cta svg, .cb-btn { transition: none; }
  .cb-model-link:hover { transform: none; }
  .cb-model-link:hover .cb-model-shot img { transform: none; }
}
