/*
 * Site public et pages légales de Dearly.
 * Couleurs et typographies de la direction artistique (design/Dearly App.dc.html, section DA) :
 * encre #2A2230, crème #FBF7F2, lilas #E3D6FB, pêche #FFD9C6, violet d'accent #7A5FD0,
 * Instrument Serif pour les titres, Figtree pour le texte (Google Fonts, chargées dans chaque page).
 */

/* Polices hébergées sur le site (licence SIL OFL) plutôt que chargées chez Google Fonts :
   aucune requête vers un tiers, cohérent avec « aucun traceur » de la politique de confidentialité. */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/InstrumentSerif_400Regular.ttf") format("truetype"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/InstrumentSerif_400Regular_Italic.ttf") format("truetype"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("/assets/fonts/Figtree_400Regular.ttf") format("truetype"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url("/assets/fonts/Figtree_500Medium.ttf") format("truetype"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("/assets/fonts/Figtree_600SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("/assets/fonts/Figtree_700Bold.ttf") format("truetype"); }

:root {
  --ink: #2A2230;
  --cream: #FBF7F2;
  --sand: #F3ECE4;
  --line: #EDE4DA;
  --muted: #6E6375;
  --accent: #7A5FD0;
  --accent-contrast: #ffffff;
  --lilac: #E3D6FB;
  --peach: #FFD9C6;
  --butter: #FCEBB0;
  --mint: #CDEBD9;
  --sky: #D4E3F7;
  --gradient: linear-gradient(145deg, var(--lilac), var(--peach));

  --bg: var(--cream);
  --bg-soft: #ffffff;
  --text: var(--ink);
  --text-muted: var(--muted);
  --border: var(--line);
  --accent-soft: #F1ECFB;

  --radius: 20px;
  --maxw: 760px;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* En-tête */

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
}

.brand .dot {
  color: #B9A4F0;
}

.brand img {
  width: 34px;
  height: 34px;
}

.header-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.header-link:hover {
  border-color: var(--accent);
}

/* Accueil */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 64px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  left: 50%;
  top: -260px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--gradient);
  opacity: 0.55;
  filter: blur(10px);
  z-index: -1;
}

.hero-icon {
  width: 112px;
  height: 112px;
  margin-bottom: 24px;
  filter: drop-shadow(0 18px 28px rgba(122, 95, 208, 0.35));
}

.hero .wordmark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  line-height: 1;
  margin: 0 0 18px;
  color: var(--text);
}

.hero .wordmark span {
  color: #B9A4F0;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 9vw, 72px);
  line-height: 1.02;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.hero h1 em {
  display: block;
}

.hero p {
  color: var(--text-muted);
  font-size: 19px;
  max-width: 500px;
  margin: 0 auto 28px;
}

.soon {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-weight: 600;
  font-size: 15px;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.store-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 180px;
  padding: 10px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  line-height: 1.2;
}

.store-badge small {
  font-size: 12px;
  opacity: 0.8;
}

.store-badge strong {
  font-size: 19px;
}

.features {
  display: grid;
  gap: 14px;
  padding-bottom: 48px;
}

@media (min-width: 700px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  padding: 24px 22px;
  border-radius: 24px;
}

.feature:nth-child(1) { background: var(--lilac); }
.feature:nth-child(2) { background: var(--peach); }
.feature:nth-child(3) { background: var(--mint); }

.feature h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.1;
  margin: 0 0 8px;
}

.feature p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  margin: 0 0 14px;
}

.cards {
  display: grid;
  gap: 12px;
  padding-bottom: 64px;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  text-decoration: none;
}

.card strong {
  display: block;
  margin-bottom: 2px;
}

.card span {
  color: var(--text-muted);
  font-size: 15px;
}

.card:hover {
  border-color: var(--accent);
}

/* Pages de contenu (légal, contact) */

.page {
  padding: 32px 0 64px;
}

.page h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 7vw, 54px);
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.page .intro {
  color: var(--text-muted);
  font-size: 18px;
  margin: 0 0 8px;
}

.page .updated {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 32px;
}

.page h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.15;
  margin: 40px 0 10px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.page h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.page h3 {
  font-size: 17px;
  margin: 24px 0 6px;
}

.page p,
.page ul,
.page ol {
  margin: 0 0 14px;
}

.page ul,
.page ol {
  padding-left: 22px;
}

.page li {
  margin-bottom: 6px;
}

.callout {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  margin: 0 0 20px;
}

.callout p:last-child {
  margin-bottom: 0;
}

.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  opacity: 0.92;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--sand);
  font-weight: 700;
}

details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 0 10px;
  background: #ffffff;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

details[open] summary {
  margin-bottom: 8px;
}

details p:last-child,
details ol:last-child,
details ul:last-child {
  margin-bottom: 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

/* 404 */

.not-found {
  text-align: center;
  padding: 80px 0;
}

.not-found .code {
  font-family: var(--serif);
  font-style: italic;
  font-size: 96px;
  color: var(--accent);
  line-height: 1;
  margin: 0 0 12px;
}

.not-found h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 40px;
  margin: 0 0 8px;
}

/* Pied de page */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--sand);
  color: var(--text-muted);
  font-size: 14px;
  padding: 28px 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-footer p {
  margin: 0;
}
