/* Site public de Coco (ecoutecoco.app). Couleurs reprises de l'appli et du back-office. */
:root {
  --primary: #0284c7;
  --primary-deep: #0369a1;
  --primary-soft: #e0f2fe;
  --navy: #0f4c81;
  --amber: #f59e0b;
  --amber-deep: #b45309;
  --amber-soft: #fef3c7;
  --mint: #10b981;
  --mint-soft: #d1fae5;
  --purple: #7c3aed;
  --purple-soft: #ede9fe;
  --canvas: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --body: #475569;
  --muted: #64748b;
  --radius: 16px;
  --radius-lg: 24px;
  /* Polices système : aucune requête vers un service tiers. */
  --font-title: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
}

a { color: var(--primary-deep); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { color: var(--text); font-family: var(--font-title); line-height: 1.2; }
h1 { font-size: clamp(32px, 6vw, 52px); margin: 0 0 16px; letter-spacing: -0.01em; }
h2 { font-size: clamp(22px, 3.4vw, 28px); margin: 48px 0 12px; }
h3 { font-size: 19px; margin: 24px 0 8px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 16px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }

/* En-tête */
.top { background: var(--card); border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--font-title); font-weight: 700; font-size: 24px; }
.brand img { width: 40px; height: 40px; }
.links { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 15px; }
.links a { text-decoration: none; color: var(--body); font-weight: 600; }
.links a:hover, .links a[aria-current="page"] { color: var(--primary-deep); }

/* Accueil */
.hero { padding: 64px 0 56px; background: linear-gradient(180deg, var(--primary-soft), var(--canvas)); }
.hero .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero p.lead { font-size: 20px; color: var(--body); margin: 0 0 24px; max-width: 34em; }
.pill { display: inline-block; margin-top: 0; background: var(--amber-soft); color: var(--amber-deep); font-weight: 700; font-size: 14px; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; font-family: var(--font-title); font-size: 17px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 0 var(--primary-deep); }
.btn-primary:hover { background: var(--primary-deep); color: #fff; }
.btn-ghost { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

.section { padding: 56px 0; }
.section > .wrap > h2:first-child { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.card h3 { margin-top: 12px; }
.card p { margin: 0; }
.dot { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; font-size: 24px; }
.dot svg { width: 26px; height: 26px; }
.c1 { background: var(--primary-soft); color: var(--primary-deep); }
.c2 { background: var(--amber-soft); color: var(--amber-deep); }
.c3 { background: var(--mint-soft); color: #047857; }
.c4 { background: var(--purple-soft); color: var(--purple); }

.band { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.list { padding-left: 0; list-style: none; margin: 0; display: grid; gap: 12px; }
.list li { display: flex; gap: 12px; align-items: flex-start; }
.list li::before { content: ""; flex: 0 0 10px; height: 10px; margin-top: 9px; border-radius: 50%; background: var(--mint); }

/* Pages légales */
.legal { padding: 48px 0 72px; }
.legal .date { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.legal h2 { scroll-margin-top: 16px; }
.legal ul { padding-left: 22px; }
.legal li { margin: 4px 0; }
.toc { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin: 24px 0 8px; }
.toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.toc a { text-decoration: none; }
.box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin: 16px 0; }
.box p { margin: 4px 0; }
.note { background: var(--amber-soft); border-radius: var(--radius); padding: 16px 20px; color: #78350f; margin: 16px 0; }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 560px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--text); background: var(--canvas); font-family: var(--font-title); }
tr:last-child td { border-bottom: 0; }
ol.steps { padding-left: 22px; }
ol.steps li { margin: 8px 0; }

/* Pied de page */
.foot { background: #1e293b; color: #cbd5e1; padding: 40px 0; font-size: 15px; }
.foot .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot a { color: #fff; }
.foot nav { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.foot p { margin: 4px 0; }

@media (max-width: 820px) {
  .hero { padding: 40px 0; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art svg { max-width: 220px; }
  .grid { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
  table { min-width: 0; font-size: 14px; }
  th, td { padding: 10px; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background 0.15s ease, transform 0.15s ease; }
  .btn:hover { transform: translateY(-1px); }
}

/* Boutons des stores (désactivés tant que l'appli n'est pas publiée) et capture de l'appli */
.stores { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.store { display: inline-flex; align-items: center; gap: 12px; min-width: 200px; padding: 10px 20px 10px 16px; border-radius: 14px; background: var(--text); color: #fff; text-decoration: none; font-family: var(--font-title); font-weight: 700; font-size: 18px; line-height: 1.15; }
.store svg { width: 28px; height: 28px; flex: 0 0 28px; }
.store small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 12px; opacity: 0.8; }
.store { margin: 0; cursor: default; }
a.store:hover { background: var(--navy); color: #fff; }
.stores-note { font-size: 15px; color: var(--muted); margin: 12px 0 0; }
.phone { margin: 0 auto; width: 100%; max-width: 300px; padding: 10px; background: var(--text); border-radius: 36px; box-shadow: 0 24px 48px rgba(15, 76, 129, 0.18); }
.phone img { display: block; width: 100%; height: auto; border-radius: 28px; }
@media (max-width: 820px) {
  .phone { order: 2; max-width: 260px; }
  .store { flex: 1 1 200px; }
}
.phone figcaption { color: #cbd5e1; font-size: 12px; text-align: center; padding: 8px 0 2px; }
.split { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: center; }
.split > div > h2:first-child { margin-top: 0; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split .phone { order: 2; }
}

/* Comment ça marche */
.how { list-style: none; counter-reset: etape; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.how li { counter-increment: etape; background: var(--canvas); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: grid; gap: 6px; }
.how li::before { content: counter(etape); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; font-family: var(--font-title); font-weight: 700; margin-bottom: 6px; }
.how strong { color: var(--text); font-family: var(--font-title); font-size: 19px; }

/* Questions fréquentes */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 20px; }
.faq summary { cursor: pointer; padding: 16px 0; color: var(--text); font-family: var(--font-title); font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary-deep); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; }
