/* Pages de Mon asso et Moi (app.mon-asso-et-moi.fr).
   Couleurs reprises de Réf/CHARTE_GRAPHIQUE.md (clair et sombre). */

@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(fonts/Inter-Regular.ttf) format("truetype"); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(fonts/Inter-Medium.ttf) format("truetype"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(fonts/Inter-SemiBold.ttf) format("truetype"); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(fonts/Inter-Bold.ttf) format("truetype"); }

:root {
  --background: #F4F6FB;
  --card: #FFFFFF;
  --foreground: #0B111E;
  --muted: #E8EBF3;
  --muted-foreground: #5C6A8A;
  --border: #D7DDEA;
  --primary: #4F39F6;
  --primary-foreground: #FFFFFF;
  --primary-soft: #EEF2FF;
  --primary-soft-foreground: #432DD7;
  --brand: #7F22FE;
  --destructive: #E7000B;
  --destructive-button: #E7000B;
  --destructive-soft: #FEF2F2;
  --success: #009966;
  --success-soft: #ECFDF5;
  --warning: #B45309;
  --warning-soft: #FFFBEB;
  --gradient: linear-gradient(90deg, #8200DB, #FF2056);
  --shadow: 0 1px 3px rgb(0 0 0 / 8%), 0 1px 2px -1px rgb(0 0 0 / 8%);
  --radius: 12px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #090E1A;
    --card: #0E1525;
    --foreground: #F1F4F9;
    --muted: #131D34;
    --muted-foreground: #8591AD;
    --border: #16213C;
    --primary: #5B62F1;
    --primary-soft: #191C4D;
    --primary-soft-foreground: #A1A5F7;
    --brand: #8E51FF;
    --destructive: #F87171;
    --destructive-button: #D92626;
    --destructive-soft: rgb(217 38 38 / 15%);
    --success: #00D492;
    --success-soft: rgb(0 212 146 / 15%);
    --warning: #FFB900;
    --warning-soft: rgb(255 185 0 / 15%);
    --shadow: 0 1px 3px rgb(0 0 0 / 40%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
}

a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--brand); }

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

.container { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 16px; }

/* En-tête */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.site-header .logo img { display: block; height: 32px; width: auto; }
.site-nav { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.site-nav a { color: var(--muted-foreground); text-decoration: none; font-weight: 500; font-size: 15px; padding: 4px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand); }

/* Contenu */
main { padding: 40px 0 56px; }
h1 { font-size: 32px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.02em; }
h2 { font-size: 21px; line-height: 1.3; margin: 36px 0 8px; }
h3 { font-size: 17px; margin: 24px 0 4px; }
p, ul, ol { margin: 0 0 12px; }
li { margin-bottom: 4px; }
.lead { font-size: 18px; color: var(--muted-foreground); margin-bottom: 24px; }
.updated { color: var(--muted-foreground); font-size: 14px; margin-bottom: 24px; }
.muted { color: var(--muted-foreground); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 16px 0;
}
.card h2:first-child, .card h3:first-child { margin-top: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 24px 0; }
.grid .card { margin: 0; }

.callout { border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; border: 1px solid transparent; }
.callout-info { background: var(--primary-soft); color: var(--primary-soft-foreground); }
.callout-danger { background: var(--destructive-soft); color: var(--destructive); border-color: color-mix(in srgb, var(--destructive) 30%, transparent); }
.callout-success { background: var(--success-soft); color: var(--success); }
.callout-warning { background: var(--warning-soft); color: var(--warning); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }

/* Accueil */
.hero { text-align: center; padding: 16px 0 8px; }
.hero img { width: 260px; }
.hero h1 { font-size: 36px; margin-top: 16px; }
.hero .lead { max-width: 620px; margin: 8px auto 24px; }

/* Formulaires */
label { display: block; font-weight: 600; font-size: 14px; margin: 16px 0 6px; }
input, select {
  width: 100%;
  font: inherit;
  color: var(--foreground);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
input:focus, select:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
input.code { letter-spacing: 0.4em; font-size: 22px; text-align: center; max-width: 240px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; font-size: 15px; }
.check input { width: auto; margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 15px;
  border: 0; border-radius: 8px; padding: 10px 18px; margin-top: 20px;
  cursor: pointer; text-decoration: none;
  background: var(--primary); color: var(--primary-foreground);
}
.btn:hover { color: var(--primary-foreground); filter: brightness(1.08); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; filter: none; }
.btn-danger { background: var(--destructive-button); }
.btn-ghost { background: transparent; color: var(--primary); padding-left: 0; padding-right: 0; }
.btn-ghost:hover { color: var(--brand); filter: none; }
.actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

.error { color: var(--destructive); font-size: 14px; margin-top: 8px; }
[hidden] { display: none !important; }

/* Pied de page */
.site-footer { border-top: 1px solid var(--border); background: var(--card); padding: 24px 0; font-size: 14px; color: var(--muted-foreground); }
.site-footer .container { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted-foreground); }
.site-footer a:hover { color: var(--brand); }

@media (max-width: 600px) {
  main { padding: 28px 0 40px; }
  h1 { font-size: 26px; }
  .hero h1 { font-size: 28px; }
  .hero img { width: 200px; }
  .card { padding: 18px; }
}

/* ===== Page de présentation (index.html) ===== */
.container-wide { max-width: 1120px; }
.icon { width: 20px; height: 20px; flex: none; }

.site-header.sticky { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.site-nav .nav-cta { color: var(--primary-foreground); background: var(--primary); padding: 6px 14px; border-radius: 8px; }
.site-nav .nav-cta:hover { color: var(--primary-foreground); filter: brightness(1.08); }

.btn-gradient { background: var(--gradient); }
.btn-secondary { background: var(--card); color: var(--foreground); border: 1px solid var(--border); }
.btn-secondary:hover { color: var(--brand); filter: none; border-color: var(--brand); }
.btn-lg { font-size: 16px; padding: 12px 22px; }

.landing main { padding: 0; }
.section { padding: 72px 0; }
.section-alt { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head h2 { font-size: 32px; letter-spacing: -0.02em; margin: 8px 0 12px; }
.section-head p { color: var(--muted-foreground); font-size: 17px; margin: 0; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); }

/* Bandeau d'accueil : halos de l'écran de connexion de l'app (heroGlows). */
.landing-hero { position: relative; overflow: hidden; padding: 72px 0 80px; }
.landing-hero::before, .landing-hero::after, .landing-hero .glow {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 0;
}
.landing-hero::before { width: 420px; height: 420px; background: rgb(249 115 22 / 20%); top: -120px; right: -80px; }
.landing-hero::after { width: 380px; height: 380px; background: rgb(244 63 94 / 20%); bottom: -160px; left: 30%; }
.landing-hero .glow { width: 460px; height: 460px; background: rgb(167 139 250 / 15%); top: -80px; left: -140px; }
.landing-hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.landing-hero h1 { font-size: 52px; line-height: 1.08; letter-spacing: -0.03em; margin: 12px 0 20px; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing-hero .lead { font-size: 19px; margin-bottom: 8px; max-width: 560px; }
.landing-hero .actions .btn { margin-top: 24px; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted-foreground); font-size: 14px; }
.hero-points li { display: flex; align-items: center; gap: 6px; margin: 0; }
.hero-points .icon { width: 16px; height: 16px; color: var(--success); }
.hero-visual { text-align: center; }
.hero-visual img { width: 100%; max-width: 420px; filter: drop-shadow(0 20px 40px rgb(127 34 254 / 18%)); }

/* Tuiles de fonctionnalités : teintes des cartes de l'accueil de l'app. */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.section-alt .feature { background: var(--background); box-shadow: none; }
.feature h3 { margin: 14px 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted-foreground); font-size: 15px; }
.tile { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; color: var(--tint); background: color-mix(in srgb, var(--tint) 8%, transparent); }
.tile .icon { width: 22px; height: 22px; }
.t-indigo { --tint: #615FFF; } .t-violet { --tint: #8E51FF; } .t-sky { --tint: #00A6F4; } .t-amber { --tint: #FE9A00; }
.t-green { --tint: #00C950; } .t-pink { --tint: #F6339A; } .t-red { --tint: #FB2C36; }
@media (prefers-color-scheme: dark) {
  .tile { background: color-mix(in srgb, var(--tint) 16%, transparent); }
}

/* Étapes */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); }
.step::before { counter-increment: step; content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--gradient); color: #fff; font-weight: 700; }
.step h3 { margin: 14px 0 6px; }
.step p { margin: 0; color: var(--muted-foreground); font-size: 15px; }

/* Confiance */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.trust div { display: flex; gap: 14px; align-items: flex-start; }
.trust h3 { margin: 0 0 4px; font-size: 16px; }
.trust p { margin: 0; color: var(--muted-foreground); font-size: 15px; }

/* Tarifs */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: stretch; }
.plan { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.plan.featured { border: 2px solid var(--brand); }
.plan .badge { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--primary-soft-foreground); background: var(--primary-soft); border-radius: 999px; padding: 2px 10px; margin-bottom: 10px; }
.plan h3 { margin: 0; font-size: 19px; }
.plan .price { font-size: 38px; font-weight: 700; letter-spacing: -0.02em; margin: 10px 0 0; }
.plan .price small { font-size: 15px; font-weight: 500; color: var(--muted-foreground); }
.plan ul { list-style: none; padding: 0; margin: 18px 0 0; flex: 1; }
.plan li { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; }
.plan li .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--success); }

/* Téléchargement */
.downloads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.download { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.download h3 { margin: 12px 0 0; font-size: 17px; }
.download p { margin: 0; color: var(--muted-foreground); font-size: 14px; }
.download .btn-wrap { margin-top: auto; width: 100%; }
.download .btn-wrap .btn { width: 100%; margin-top: 16px; }

.cta-band { text-align: center; padding: 56px 24px; border-radius: 20px; background: var(--gradient); color: #fff; }
.cta-band h2 { margin: 0 0 8px; font-size: 30px; }
.cta-band p { margin: 0 auto; max-width: 560px; opacity: 0.92; }
.cta-band .btn { background: #fff; color: #5B0FB8; margin-top: 24px; }
.cta-band .btn:hover { color: #5B0FB8; filter: brightness(0.96); }

@media (max-width: 960px) {
  .landing-hero .container { grid-template-columns: 1fr; text-align: center; }
  .landing-hero .lead { margin-left: auto; margin-right: auto; }
  .landing-hero .actions, .hero-points { justify-content: center; }
  .hero-visual img { max-width: 280px; }
  .features, .steps, .trust { grid-template-columns: repeat(2, 1fr); }
  .downloads { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .site-nav .hide-sm { display: none; }
  .landing-hero { padding: 48px 0 56px; }
  .landing-hero h1 { font-size: 36px; }
  .section { padding: 52px 0; }
  .section-head h2 { font-size: 26px; }
  .features, .steps, .trust, .downloads { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 20px; }
  .cta-band h2 { font-size: 24px; }
}
.btn[aria-disabled="true"] { opacity: 0.6; cursor: default; pointer-events: none; }
.plan .btn { margin-top: 24px; }
.pricing-extra { margin-top: 16px; }
.pricing-extra h3 { margin: 0 0 4px; }
.price-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; }
.price-table th, .price-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.price-table th { font-size: 13px; color: var(--muted-foreground); font-weight: 600; }
.price-table tbody tr:last-child td { border-bottom: 0; }
.vat-note { text-align: center; color: var(--muted-foreground); font-size: 13px; margin-top: 16px; }
@media (max-width: 640px) { .price-table th, .price-table td { padding: 8px 6px; } }

/* ===== Page Abonnement (abonnement.html) ===== */
.small { font-size: 14px; }
.success { color: var(--success); font-size: 14px; margin-top: 12px; }
.account-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.account-bar .btn { margin-top: 0; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-title h2 { margin: 0; }
.state { display: inline-block; font-size: 13px; font-weight: 600; line-height: 1; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.state-success { background: var(--success-soft); color: var(--success); }
.state-info { background: var(--primary-soft); color: var(--primary-soft-foreground); }
.state-warning { background: var(--warning-soft); color: var(--warning); }
.state-danger { background: var(--destructive-soft); color: var(--destructive); }
.state-muted { background: var(--muted); color: var(--muted-foreground); }
.kv { display: grid; grid-template-columns: minmax(140px, auto) 1fr; gap: 8px 24px; margin: 16px 0 0; }
.kv dt { color: var(--muted-foreground); font-size: 15px; }
.kv dd { margin: 0; font-weight: 500; }
.kv dd.danger { color: var(--destructive); }
#subscribe, #manage { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 4px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 12px 0 8px; }
.choice { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-weight: 400; font-size: 15px; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice input { width: auto; margin-top: 4px; accent-color: var(--primary); }
.choice strong { display: block; }
.choice-price { display: block; color: var(--muted-foreground); }
.invoices { list-style: none; padding: 0; margin: 8px 0 0; }
.invoices li { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--border); margin: 0; }
.invoices li:last-child { border-bottom: 0; }
.invoice-links { display: flex; align-items: center; gap: 16px; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } }
.after-downloads { margin-top: 24px; }
