/* ============================================================
   Urbanito - Design System (style.css)
   Direction : "Énergie claire" - light vif éditorial.
   Fond clair, typo display, accents couleur par univers,
   dégradés mesh, ombres colorées, micro-interactions.
   ============================================================ */

:root {
  /* Marque */
  --brand: #156F58;          /* vert forêt-sauge, CTA & accents */
  --brand-dark: #0E4F3F;
  --brand-soft: #E1F0EA;     /* fond doux teinté marque */
  --brand-mint: #14E0B0;     /* touche "électrique" */
  --sage: #9FB89C;

  /* Accents catégories (couleur + rgb pour ombres) */
  --acc-forest: #157F66;  --acc-forest-rgb: 21,127,102;
  --acc-mint:   #0AB89A;  --acc-mint-rgb:   10,184,154;
  --acc-sage:   #5E9A82;  --acc-sage-rgb:   94,154,130;
  --acc-amber:  #D98A1F;  --acc-amber-rgb:  217,138,31;
  --acc-copper: #C25E3C;  --acc-copper-rgb: 194,94,60;
  --acc-slate:  #4F6B7D;  --acc-slate-rgb:  79,107,125;

  /* accent courant (overridé par [data-accent]) */
  --acc: var(--brand);
  --acc-rgb: 21,127,102;

  /* Neutres */
  --ink: #11201B;            /* titres */
  --text: #38453F;           /* corps */
  --muted: #687a72;          /* secondaire */
  --line: #E2EAE5;           /* bordures */
  --bg: #FAFCF9;             /* fond page */
  --bg-alt: #EFF5F0;         /* fond section alternée */
  --surface: #FFFFFF;        /* cartes */

  /* Sémantique */
  --amazon: #FF9E0F;
  --amazon-dark: #F07E05;
  --success: #1FA368;
  --warning: #C98A2B;
  --error: #C9503A;

  /* Dégradés signature */
  --grad-brand: linear-gradient(120deg, #0E4F3F 0%, #157F66 45%, #0AB89A 100%);
  --grad-mint: linear-gradient(120deg, #157F66 0%, #14E0B0 100%);
  --grad-amazon: linear-gradient(180deg, #FFB23F 0%, #FF9E0F 55%, #F07E05 100%);
  --grad-text: linear-gradient(100deg, #0AB89A 0%, #157F66 60%, #0E4F3F 100%);

  /* Mesures */
  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(17, 32, 27, .05), 0 3px 10px rgba(17, 32, 27, .045);
  --shadow: 0 8px 28px rgba(17, 32, 27, .09);
  --shadow-lg: 0 24px 60px rgba(17, 32, 27, .14);
  --shadow-acc: 0 18px 40px rgba(var(--acc-rgb), .18);
  --container: 1160px;
  --space: 16px;

  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', var(--font);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.12; font-weight: 700; letter-spacing: -0.025em; font-family: var(--font-display); }
h1 { font-size: clamp(2.2rem, 5.4vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: .5em; }
h3 { font-size: 1.22rem; font-weight: 600; }
p { margin-bottom: 1em; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 22px; }

.section { padding: 68px 0; }
.section--alt { background: var(--bg-alt); }
.section--tight { padding: 40px 0; }

/* Texte en dégradé (mots accent) */
.grad-text, .accent {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--brand);
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: var(--grad-mint);
}
.section-head .eyebrow::before { display: none; }

.section-head { text-align: center; max-width: 660px; margin: 0 auto 42px; }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head p { color: var(--muted); margin-top: 8px; font-size: 1.05rem; }
.section-head__cta { margin-top: 18px; }

.note {
  font-size: .9rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-mint);
  padding: 13px 17px;
  border-radius: var(--radius-sm);
}

/* ---------------- Boutons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: .95rem;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, filter .16s ease;
  text-align: center;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--lg { padding: 16px 30px; font-size: 1.02rem; }
.btn--sm { padding: 9px 16px; font-size: .85rem; }
.btn--block { display: flex; width: 100%; }

.btn--primary { background: var(--grad-brand); color: #fff; box-shadow: 0 6px 18px rgba(21, 127, 102, .26); }
.btn--primary:hover { color: #fff; box-shadow: 0 12px 28px rgba(21, 127, 102, .34); filter: brightness(1.05); }

.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); box-shadow: var(--shadow-sm); }

.btn--amazon {
  background: var(--grad-amazon); color: #1a1407;
  box-shadow: 0 6px 18px rgba(240, 126, 5, .28);
}
.btn--amazon::after {
  content: "\2197"; font-size: .9em; font-weight: 800; opacity: .8;
  transition: transform .16s ease;
}
.btn--amazon:hover { color: #1a1407; box-shadow: 0 12px 30px rgba(240, 126, 5, .4); filter: brightness(1.04); }
.btn--amazon:hover::after { transform: translate(2px, -2px); }
.btn--block.btn--amazon { justify-content: center; }

.aff-note { display: block; font-size: .72rem; color: var(--muted); margin-top: 6px; }

/* ---------------- Header ---------------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 252, 249, .82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 18px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.36rem; color: var(--ink); letter-spacing: -.04em; font-family: var(--font-display); }
.logo:hover { color: var(--ink); }
.logo__mark { width: 31px; height: 31px; color: var(--brand); flex: none; }
.logo__dot { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav__item { position: relative; }
.nav__link { display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px; border-radius: 999px; color: var(--text); font-weight: 600; font-size: .95rem; transition: background .15s ease, color .15s ease; }
.nav__link:hover { background: var(--brand-soft); color: var(--brand-dark); }
.nav__link--active { color: var(--brand-dark); background: var(--brand-soft); }
.nav__caret { transition: transform .15s ease; }
/* Dropdown catégories */
.nav__sub {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; display: none; flex-direction: column; gap: 2px; z-index: 60;
}
.nav__sub-link { padding: 10px 13px; border-radius: var(--radius-sm); color: var(--text); font-weight: 600; font-size: .92rem; }
.nav__sub-link:hover { background: var(--brand-soft); color: var(--brand-dark); }
.nav__sub-link--active { background: var(--brand-soft); color: var(--brand-dark); }
.nav__item--has-sub:hover .nav__sub,
.nav__item--has-sub.open .nav__sub { display: flex; }
.nav__item--has-sub:hover .nav__caret { transform: rotate(180deg); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 42px; font-size: 1.3rem; cursor: pointer; color: var(--ink); }

/* ---------------- Breadcrumbs ---------------- */
.breadcrumbs { font-size: .85rem; color: var(--muted); padding: 16px 0 0; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs__sep { margin: 0 8px; opacity: .5; }

/* ---------------- Footer ---------------- */
.footer { background: var(--ink); color: #c5d2cb; margin-top: 72px; padding: 56px 0 28px; position: relative; }
.footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad-mint); }
.footer a { color: #c5d2cb; transition: color .15s ease; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
.footer__brand { color: #fff; font-weight: 700; font-size: 1.32rem; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; font-family: var(--font-display); }
.footer__desc { font-size: .9rem; color: #93a69c; max-width: 30ch; }
.footer__heading { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.footer__links { list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: .9rem; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.footer__copy { font-size: .85rem; color: #93a69c; }
.footer__affiliate { font-size: .78rem; color: #80938a; max-width: 75ch; line-height: 1.55; }

/* ---------------- Progress bar ---------------- */
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--grad-mint); z-index: 100; transition: width .1s linear; }

/* ---------------- Tableaux ---------------- */
.table-wrap { overflow-x: auto; margin-bottom: 1.4em; }
.styled-table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.styled-table th, .styled-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.styled-table th[scope="row"] { font-weight: 700; color: var(--ink); width: 42%; background: var(--bg-alt); }
.styled-table tr:last-child th, .styled-table tr:last-child td { border-bottom: none; }

/* ---------------- Reveal au scroll ---------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.16,.8,.3,1), transform .7s cubic-bezier(.16,.8,.3,1); will-change: opacity, transform; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .btn:active { transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .nav--open { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px; gap: 4px; box-shadow: var(--shadow); }
  .nav--open .nav__item, .nav--open .nav__link { width: 100%; }
  .nav--open .nav__sub { position: static; display: flex; box-shadow: none; border: none; padding: 2px 0 6px 14px; min-width: 0; }
  .nav--open .nav__caret { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .section { padding: 52px 0; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .footer__grid { grid-template-columns: 1fr; }
}
