/* ==========================================================================
   Côme — cometherobot.com
   Design system issu de la charte visuelle officielle (docs/08_charte_visuelle.md)
   Palette : corail #FF8A6B · cyan #5FE0EC · blush #F29AA6 · encre #20262E
             fonds crème #FAF7F2 / gris clair #F3F5F8
   Principes : rondeurs, blanc lumineux, mouvements doux (ease-out 200–300 ms),
   contraste WCAG AA, cibles tactiles larges, jamais d'agressivité.
   ========================================================================== */

:root {
  --coral: #FF8A6B;
  --coral-deep: #E86A47;      /* corail assombri pour texte/AA */
  --coral-soft: #FFF1EC;
  --cyan: #5FE0EC;
  --cyan-deep: #1FA9B8;
  --cyan-soft: #E9FAFC;
  --blush: #F29AA6;
  --ink: #20262E;
  --ink-soft: #4A5560;
  --cream: #FAF7F2;
  --grey-bg: #F3F5F8;
  --white: #FFFFFF;
  --shadow-egg: #E4E8EC;
  --success: #3CB371;
  --info: #4A90D9;
  --warn: #E5A93C;
  --radius-l: 28px;
  --radius-m: 18px;
  --radius-s: 12px;
  --shadow-soft: 0 10px 40px rgba(32, 38, 46, 0.08);
  --shadow-card: 0 6px 24px rgba(32, 38, 46, 0.07);
  --font: "Nunito", "Quicksand", ui-rounded, -apple-system, "SF Pro Rounded",
          "Segoe UI", system-ui, sans-serif;
  --maxw: 1160px;
}

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

/* L'attribut hidden doit toujours gagner, même sur les éléments stylés en grid/flex. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: var(--coral-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; font-weight: 700; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }

.section { padding: clamp(64px, 9vw, 110px) 20px; }
.wrap { max-width: var(--maxw); margin: 0 auto; }
.center { text-align: center; }
.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--ink-soft); max-width: 44em; margin-left: auto; margin-right: auto; }
.eyebrow {
  display: inline-block; font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--coral-deep);
  background: var(--coral-soft); padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 28px; border-radius: 999px;
  font-family: inherit; font-size: 1.02rem; font-weight: 700; cursor: pointer;
  border: 2px solid transparent; text-decoration: none !important;
  transition: transform 0.22s ease-out, box-shadow 0.22s ease-out, background 0.22s ease-out;
}
.btn:focus-visible { outline: 3px solid var(--cyan-deep); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-deep) 100%);
  color: var(--white); box-shadow: 0 8px 24px rgba(232, 106, 71, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(232, 106, 71, 0.45); }
.btn-secondary { background: var(--white); color: var(--ink); border-color: var(--shadow-egg); }
.btn-secondary:hover { border-color: var(--coral); transform: translateY(-2px); }
.btn-big { min-height: 60px; padding: 16px 38px; font-size: 1.12rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(32, 38, 46, 0.06);
}
.header-in {
  max-width: var(--maxw); margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; color: var(--ink); text-decoration: none !important; }
.brand img { width: 38px; height: 38px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a {
  color: var(--ink-soft); font-weight: 600; font-size: 0.95rem;
  padding: 8px 12px; border-radius: 999px; text-decoration: none !important;
  transition: background 0.2s ease-out, color 0.2s ease-out;
}
.nav a:hover { background: var(--coral-soft); color: var(--coral-deep); }
.nav .btn { min-height: 42px; padding: 8px 20px; font-size: 0.95rem; margin-left: 6px; }
.nav-toggle { display: none; }

/* Sélecteur de langue */
.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px;
  background: var(--white); border: 1.5px solid var(--shadow-egg); border-radius: 999px;
  padding: 6px 14px; font-family: inherit; font-size: 0.9rem; font-weight: 700;
  color: var(--ink); cursor: pointer;
}
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px;
  background: var(--white); border-radius: var(--radius-s); box-shadow: var(--shadow-soft);
  padding: 6px; display: none; flex-direction: column; z-index: 60;
}
.lang-menu.open { display: flex; }
.lang-menu a {
  padding: 9px 14px; border-radius: 8px; color: var(--ink); font-weight: 600;
  font-size: 0.95rem; text-decoration: none !important;
}
.lang-menu a:hover, .lang-menu a[aria-current="true"] { background: var(--coral-soft); color: var(--coral-deep); }

/* ---------- Bandeau confiance (haut de page) ---------- */
.trust-bar { background: var(--ink); color: #E6EBEF; }
.trust-in {
  max-width: var(--maxw); margin: 0 auto; padding: 10px 20px;
  display: flex; gap: 10px; align-items: center; justify-content: center;
  font-size: 0.92rem; line-height: 1.45; text-align: center;
}
.trust-in svg { width: 20px; height: 20px; flex: none; }
.trust-in p { margin: 0; }
.trust-in strong { color: var(--cyan); }
.trust-in a { color: var(--coral); font-weight: 700; white-space: nowrap; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(48px, 8vw, 96px) 20px clamp(40px, 6vw, 80px);
  background:
    radial-gradient(1200px 600px at 80% -10%, var(--cyan-soft) 0%, rgba(233,250,252,0) 55%),
    radial-gradient(900px 500px at 8% 110%, var(--coral-soft) 0%, rgba(255,241,236,0) 60%),
    var(--cream);
}
.hero-in {
  max-width: var(--maxw); margin: 0 auto; display: grid;
  grid-template-columns: 1.1fr 0.9fr; gap: clamp(24px, 5vw, 64px); align-items: center;
}
.hero h1 { margin-bottom: 0.4em; }
.hero .lead { margin-left: 0; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.hero-note { font-size: 0.9rem; color: var(--ink-soft); margin-top: 12px; }
.hero-figure { position: relative; text-align: center; }
.hero-figure img {
  width: min(400px, 82%); margin: 0 auto;
  filter: drop-shadow(0 30px 40px rgba(32, 38, 46, 0.14));
  animation: bob 5.5s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); border: 1.5px solid var(--shadow-egg);
  border-radius: 999px; padding: 8px 16px; font-size: 0.88rem; font-weight: 700; color: var(--ink-soft);
}
.badge svg { width: 17px; height: 17px; flex: none; }

/* ---------- Cartes capacités ---------- */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px; margin-top: 44px;
}
.card {
  background: var(--white); border-radius: var(--radius-m); padding: 26px 24px;
  box-shadow: var(--shadow-card); border: 1px solid rgba(32,38,46,0.04);
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.card .ico {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--coral-soft); margin-bottom: 16px;
}
.card:nth-child(3n+2) .ico { background: var(--cyan-soft); }
.card:nth-child(3n)   .ico { background: #FDF0F2; }
.card .ico svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--ink-soft); font-size: 0.97rem; margin: 0; }

/* ---------- Scènes (vie avec Côme) ---------- */
.scenes { display: grid; gap: 26px; margin-top: 44px; }
.scene {
  display: grid; grid-template-columns: 1.25fr 0.75fr; border-radius: var(--radius-l);
  overflow: hidden; background: var(--white); box-shadow: var(--shadow-card); align-items: stretch;
}
.scene:nth-child(even) { grid-template-columns: 0.75fr 1.25fr; }
.scene:nth-child(even) .scene-img { order: 2; }
.scene-img { position: relative; min-height: 260px; }
.scene-img img { width: 100%; height: 100%; object-fit: cover; }
.scene-txt { padding: clamp(24px, 3.4vw, 44px); display: flex; flex-direction: column; justify-content: center; }
.scene-txt .tag { color: var(--coral-deep); font-weight: 800; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.scene-txt p { color: var(--ink-soft); margin: 0; }

/* ---------- Famille ---------- */
.family { background: var(--grey-bg); }
.family-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 44px; }
.family-card { background: var(--white); border-radius: var(--radius-m); padding: 28px 24px; box-shadow: var(--shadow-card); }
.family-card .emoji { font-size: 2rem; margin-bottom: 10px; }
.family-card p { color: var(--ink-soft); font-size: 0.97rem; margin: 0; }

/* ---------- Confidentialité ---------- */
.privacy { background: linear-gradient(180deg, #FFFFFF 0%, var(--cyan-soft) 140%); }
.privacy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-top: 44px; }
.privacy-card {
  background: var(--white); border-radius: var(--radius-m); padding: 26px 24px;
  border: 1.5px solid rgba(31, 169, 184, 0.18); box-shadow: var(--shadow-card);
}
.privacy-card .ico {
  width: 48px; height: 48px; border-radius: 14px; background: var(--cyan-soft);
  display: grid; place-items: center; margin-bottom: 14px;
}
.privacy-card .ico svg { width: 24px; height: 24px; }
.privacy-card p { color: var(--ink-soft); font-size: 0.96rem; margin: 0; }
.privacy-banner {
  margin-top: 36px; background: var(--ink); color: #F5F8FA; border-radius: var(--radius-m);
  padding: 26px 30px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.privacy-banner strong { color: var(--cyan); }
.privacy-banner svg { width: 34px; height: 34px; flex: none; }

/* ---------- Specs ---------- */
.specs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 40px; }
.spec {
  background: var(--white); border-radius: var(--radius-s); padding: 18px 20px;
  box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 2px;
}
.spec dt { font-size: 0.82rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--coral-deep); }
.spec dd { margin: 0; color: var(--ink); font-weight: 600; }
.spec dd small { display: block; color: var(--ink-soft); font-weight: 400; font-size: 0.85rem; }

/* ---------- App ---------- */
.app-section { background: var(--grey-bg); }
.app-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 60px); align-items: center; margin-top: 20px; }
.app-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.app-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); }
.app-list li strong { color: var(--ink); }
.app-list svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.phone-mock {
  background: var(--white); border-radius: 36px; box-shadow: var(--shadow-soft);
  padding: 14px; max-width: 320px; margin: 0 auto; border: 1px solid rgba(32,38,46,0.06);
}
.phone-screen { border-radius: 26px; overflow: hidden; background: var(--cream); }
.phone-screen img { width: 100%; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 40px auto 0; display: grid; gap: 12px; }
details {
  background: var(--white); border-radius: var(--radius-s); box-shadow: var(--shadow-card);
  padding: 4px 22px; border: 1px solid rgba(32,38,46,0.04);
}
details summary {
  cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--coral-deep);
  transition: transform 0.22s ease-out;
}
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--ink-soft); padding-bottom: 16px; margin: 0; }

/* ---------- Pré-commande ---------- */
.preorder {
  background:
    radial-gradient(900px 480px at 90% 0%, rgba(95, 224, 236, 0.18) 0%, transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(255, 138, 107, 0.22) 0%, transparent 55%),
    var(--ink);
  color: #F5F8FA;
}
.preorder .eyebrow { background: rgba(255,255,255,0.1); color: var(--coral); }
.preorder h2 { color: var(--white); }
.preorder .lead { color: #B9C2CC; }
.preorder-box {
  margin: 44px auto 0; max-width: 880px; background: var(--white); color: var(--ink);
  border-radius: var(--radius-l); box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  display: grid; grid-template-columns: 0.9fr 1.1fr; overflow: hidden;
}
.preorder-side {
  background: linear-gradient(160deg, var(--coral-soft), #fff 70%);
  padding: clamp(24px, 3.5vw, 40px); display: flex; flex-direction: column; gap: 8px;
}
.preorder-side img { width: 150px; margin-bottom: 4px; }
.price { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.02em; }
.price small { font-size: 1rem; font-weight: 600; color: var(--ink-soft); }
.preorder-side ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; font-size: 0.93rem; color: var(--ink-soft); }
.preorder-side li { display: flex; gap: 8px; align-items: flex-start; }
.preorder-side li svg { width: 18px; height: 18px; flex: none; margin-top: 3px; }
.preorder-form { padding: clamp(24px, 3.5vw, 40px); display: grid; gap: 14px; align-content: start; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 0.92rem; }
.field input, .field select {
  font-family: inherit; font-size: 1rem; padding: 13px 16px; min-height: 50px;
  border: 1.5px solid var(--shadow-egg); border-radius: var(--radius-s);
  background: var(--white); color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus { outline: 3px solid rgba(95,224,236,0.5); border-color: var(--cyan-deep); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.86rem; color: var(--ink-soft); }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--coral-deep); flex: none; }
.form-note { font-size: 0.82rem; color: var(--ink-soft); margin: 0; }
.form-status { font-weight: 700; margin: 0; min-height: 1.4em; }
.form-status.ok { color: var(--success); }
.form-status.err { color: #C94F2E; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #97A2AD; padding: 48px 20px 40px; font-size: 0.92rem; }
.footer-in { max-width: var(--maxw); margin: 0 auto; display: grid; gap: 26px; grid-template-columns: 1.2fr 1fr 1fr; }
.site-footer .brand { color: var(--white); margin-bottom: 8px; }
.site-footer h4 { color: var(--white); font-size: 0.95rem; margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: #B9C2CC; }
.site-footer a:hover { color: var(--white); }
.footer-bottom { max-width: var(--maxw); margin: 30px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.09); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Révélation au scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease-out, transform 0.55s ease-out; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Espace compte ---------- */
.account-wrap { max-width: 620px; margin: 0 auto; padding: 40px 20px 90px; display: grid; gap: 18px; }
.account-card {
  background: var(--white); border-radius: var(--radius-l); box-shadow: var(--shadow-card);
  padding: clamp(22px, 4vw, 34px); display: grid; gap: 14px;
}
.account-card h1 { font-size: 1.7rem; text-align: center; margin: 0; }
.account-card h2 { font-size: 1.15rem; margin: 0; }
.account-card form { display: grid; gap: 12px; }
.linklike {
  background: none; border: none; color: var(--coral-deep); font-family: inherit;
  font-size: 0.95rem; font-weight: 700; cursor: pointer; padding: 6px; text-align: center;
}
.linklike:hover { text-decoration: underline; }
.preorder-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.preorder-list li {
  background: var(--coral-soft); border-radius: var(--radius-s);
  padding: 10px 14px; font-weight: 600; font-size: 0.95rem;
}
.account-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-danger { background: #FDECEC; color: #C0392B; border-color: transparent; }
.btn-danger:hover { background: #F9D8D5; transform: translateY(-2px); }

/* ---------- Pages légales ---------- */
.legal { max-width: 780px; margin: 0 auto; padding: 60px 20px 90px; }
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.3rem; margin-top: 1.8em; }
.legal p, .legal li { color: var(--ink-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-in, .app-cols, .preorder-box { grid-template-columns: 1fr; }
  .scene, .scene:nth-child(even) { grid-template-columns: 1fr; }
  .scene .scene-img, .scene:nth-child(even) .scene-img { order: -1; min-height: 220px; }
  .footer-in { grid-template-columns: 1fr; }
  .hero-figure { order: -1; }
  .hero-figure img { width: min(300px, 70%); }
}
@media (max-width: 760px) {
  .nav {
    position: fixed; inset: 60px 12px auto 12px; background: var(--white);
    border-radius: var(--radius-m); box-shadow: var(--shadow-soft);
    flex-direction: column; align-items: stretch; padding: 12px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 16px; }
  .nav-toggle {
    display: inline-flex; margin-left: auto; background: none; border: none;
    width: 46px; height: 46px; align-items: center; justify-content: center; cursor: pointer;
  }
  .nav-toggle svg { width: 26px; height: 26px; }
  .lang-switch { margin-left: 0; }
}
