/* Dictalia — dictalia.pro
   Design tokens mirror the app's own design system (Dictalia/UI/DesignSystem)
   and the App Store screenshot set, so the site and the product feel like one thing. */

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

:root {
  --bg: #F7F6F3;
  --bg-elevated: #FFFFFF;
  --bg-sunken: #EFEDE8;
  --ink: #1B1F24;
  --ink-soft: #565F6B;
  --ink-faint: #89919C;
  --border: #E2DFD8;
  --accent: #2C6E77;
  --accent-ink: #1F535C;
  --accent-soft: rgba(44, 110, 119, 0.10);
  --success: #3A8D5C;
  --warning: #B9852E;
  --error: #B5493B;
  --error-soft: rgba(181, 73, 59, 0.10);

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --maxw: 1120px;
}

:root[data-theme="dark"] {
  --bg: #12161B;
  --bg-elevated: #191E25;
  --bg-sunken: #0D1015;
  --ink: #E8EAED;
  --ink-soft: #9BA3AD;
  --ink-faint: #6B7480;
  --border: #262C34;
  --accent: #55ABA2;
  --accent-ink: #9BD8D0;
  --accent-soft: rgba(85, 171, 162, 0.16);
  --success: #5FBE8A;
  --warning: #E0A94D;
  --error: #E0897A;
  --error-soft: rgba(224, 137, 122, 0.16);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161B;
    --bg-elevated: #191E25;
    --bg-sunken: #0D1015;
    --ink: #E8EAED;
    --ink-soft: #9BA3AD;
    --ink-faint: #6B7480;
    --border: #262C34;
    --accent: #55ABA2;
    --accent-ink: #9BD8D0;
    --accent-soft: rgba(85, 171, 162, 0.16);
    --success: #5FBE8A;
    --warning: #E0A94D;
    --error: #E0897A;
    --error-soft: rgba(224, 137, 122, 0.16);
  }
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.wordmark .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
  font-size: 15px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 920px) {
  .nav-links { position: fixed; inset: 72px 0 auto 0; background: var(--bg-elevated); border-bottom: 1px solid var(--border); flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 28px 20px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease; }
  .nav-links[data-open="true"] { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 40px;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 28px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin-bottom: 26px;
}
.hero h1 em { font-style: normal; color: var(--accent-ink); }

.hero p.lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #FFFFFF; }
:root[data-theme="dark"] .btn-primary { color: #0D1015; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #0D1015; } }
.btn-primary:hover { opacity: 0.92; }

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-visual .phone-shot {
  width: min(300px, 72vw);
  border-radius: 34px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.35);
  transform: rotate(2.5deg);
}
.hero-visual .phone-shot.secondary {
  position: absolute;
  width: min(230px, 56vw);
  top: 14%;
  left: -6%;
  transform: rotate(-9deg);
  box-shadow: 0 30px 70px -28px rgba(0, 0, 0, 0.3);
  z-index: -1;
  opacity: 0.9;
}

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 16px; }
  .hero-visual .phone-shot.secondary { display: none; }
}

/* ---------- Section scaffolding ---------- */
section { padding: 100px 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 14px;
  display: block;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.2;
  text-wrap: balance;
  margin-bottom: 14px;
}
.section-head p {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 54ch;
}

#fonctionnalites { background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.feature-card {
  background: var(--bg-elevated);
  padding: 34px 30px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.feature-card.in-view { opacity: 1; transform: translateY(0); }
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 20px;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  margin-bottom: 10px;
}
.feature-card p { color: var(--ink-soft); font-size: 15px; line-height: 1.6; }

@media (max-width: 860px) {
  .feature-grid { grid-template-columns: 1fr; }
}
@media (min-width: 861px) and (max-width: 1080px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Screenshot gallery ---------- */
.gallery-scroll {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 8px 28px 24px;
  margin: 0 -28px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.gallery-scroll::-webkit-scrollbar { height: 8px; }
.gallery-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.gallery-item {
  flex: 0 0 auto;
  width: 230px;
  scroll-snap-align: start;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.35);
  background: var(--bg-sunken);
}
.gallery-item img { width: 100%; height: auto; }

/* ---------- Privacy band ---------- */
#confidentialite { background: var(--ink); color: var(--bg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #confidentialite { background: var(--bg-sunken); color: var(--ink); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); } }
:root[data-theme="dark"] #confidentialite { background: var(--bg-sunken); color: var(--ink); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
#confidentialite .section-head p { color: color-mix(in srgb, var(--bg) 65%, transparent); }
:root[data-theme="dark"] #confidentialite .section-head p { color: var(--ink-soft); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #confidentialite .section-head p { color: var(--ink-soft); } }

.privacy-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.privacy-item .num { font-family: var(--font-mono); font-size: 13px; color: var(--accent-ink); margin-bottom: 12px; display: block; }
.privacy-item h3 { font-family: var(--font-display); font-weight: 500; font-size: 19px; margin-bottom: 8px; }
.privacy-item p { font-size: 15px; color: color-mix(in srgb, var(--bg) 68%, transparent); line-height: 1.6; }
:root[data-theme="dark"] .privacy-item p { color: var(--ink-soft); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .privacy-item p { color: var(--ink-soft); } }

@media (max-width: 760px) { .privacy-list { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Contact ---------- */
#contact { background: var(--bg-elevated); border-top: 1px solid var(--border); }
.contact-wrap { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: start; }
@media (max-width: 860px) { .contact-wrap { grid-template-columns: 1fr; gap: 40px; } }

.contact-meta a.mail-link {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
}

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 15.5px;
  color: var(--ink);
  transition: border-color 0.15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field textarea { min-height: 130px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

.hp-field { position: absolute; left: -9999px; opacity: 0; }

.form-status {
  margin-top: 16px;
  font-size: 14.5px;
  padding: 12px 16px;
  border-radius: 10px;
  display: none;
}
.form-status.visible { display: block; }
.form-status.success { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.form-status.error { background: var(--error-soft); color: var(--error); }

/* ---------- Footer ---------- */
footer { padding: 48px 0 60px; }
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-copy { font-size: 13px; color: var(--ink-faint); font-family: var(--font-mono); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .feature-card { transition: none; opacity: 1; transform: none; }
}
