/* Site de l'app (Garnie, Cimea, Vesal) : page d'attente, blog, pages légales. Charte de chaque app, thèmes sombre et clair. */
@font-face { font-family: 'Sora'; src: url(fonts/Sora-Variable.ttf) format('truetype'); font-weight: 100 800; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url(fonts/Figtree-Variable.ttf) format('truetype'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'Funnel Display'; src: url(fonts/FunnelDisplay-Variable.ttf) format('truetype'); font-weight: 300 800; font-display: swap; }
@font-face { font-family: 'Funnel Sans'; src: url(fonts/FunnelSans-Variable.ttf) format('truetype'); font-weight: 300 800; font-display: swap; }
@font-face { font-family: 'Familjen Grotesk'; src: url(fonts/FamiljenGrotesk-Variable.ttf) format('truetype'); font-weight: 400 700; font-display: swap; }

/* Chartes (tokens.json de chaque app, thème sombre) */
.ap-cimea { --bg: #1E1522; --surface: #2A1F2F; --line: #3E3044; --ink: #F6E9EE; --muted: #BBA5B8; --accent: #E0708A; --on-accent: #1E1522; --display: 'Sora', system-ui, sans-serif; --text: 'Figtree', system-ui, sans-serif; --track: -0.03em; }
.ap-garnie { --bg: #20140E; --surface: #2E1E15; --line: #4A3426; --ink: #FFF6EC; --muted: #D9BFA6; --accent: #F5A623; --on-accent: #20140E; --display: 'Funnel Display', system-ui, sans-serif; --text: 'Funnel Sans', system-ui, sans-serif; --track: -0.03em; }
.ap-vesal { --bg: #0F2747; --surface: #173459; --line: #4E6E96; --ink: #F4EFE6; --muted: #A9BAD0; --accent: #FF5A4E; --on-accent: #FFFFFF; --display: 'Familjen Grotesk', system-ui, sans-serif; --text: 'Familjen Grotesk', system-ui, sans-serif; --track: -0.04em; }

.ap-site { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--text); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
.ap-site * { box-sizing: border-box; }
.ap-site a { color: inherit; }
.ap-site main { max-width: 1180px; margin: 0 auto; padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left)); }
.ap-site h1, .ap-site h2, .ap-site h3 { font-family: var(--display); font-weight: 700; letter-spacing: var(--track); line-height: 1.06; margin: 0; }
.ap-site h1 em, .ap-site h2 em { font-style: normal; color: var(--accent); }
.ap-lead { color: var(--muted); font-size: 19px; max-width: 640px; }
.ap-small { color: var(--muted); font-size: 14px; }
.ap-eyebrow { text-wrap: balance; margin: 0 0 18px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

/* Boutons et badge */
.ap-btn { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 22px; border-radius: 999px; background: var(--accent); color: var(--on-accent) !important; font-weight: 700; text-decoration: none; }
.ap-btn-ghost { background: transparent; color: var(--ink) !important; border: 1px solid var(--line); }
.ap-badge { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 18px; border-radius: 12px; background: #000; color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.22); }
.ap-badge span { display: grid; line-height: 1.05; font-size: 17px; font-weight: 600; }
.ap-badge small { font-size: 11px; font-weight: 500; opacity: .8; }
a.ap-badge { padding: 0; border: 0; background: none; }

/* Héros */
.ap-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: 56px 0 72px; }
.ap-hero h1 { font-size: clamp(44px, 5.6vw, 72px); }
.ap-hero .ap-lead { margin: 22px 0 28px; }
.ap-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ap-note { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.ap-hero-shot img { display: block; width: 100%; max-width: 380px; margin: 0 auto; height: auto; border-radius: 28px; box-shadow: 0 40px 80px rgba(0,0,0,.4); }

/* Sections */
.ap-sec { padding: 72px 0; border-top: 1px solid var(--line); }
.ap-sec h2 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 18px; }
.ap-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 32px; }
.ap-feat { display: flex; flex-direction: column; gap: 18px; padding: 24px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.ap-feat h3 { font-size: 24px; margin: 8px 0 10px; }
.ap-feat p { margin: 0; color: var(--muted); }
.ap-feat img { display: block; width: 100%; height: auto; border-radius: 16px; margin-top: auto; }
.ap-num { font-family: var(--display); font-weight: 700; color: var(--accent); font-size: 15px; }

.ap-example blockquote { margin: 0 0 16px; font-family: var(--display); font-weight: 700; font-size: clamp(28px, 3.4vw, 42px); letter-spacing: var(--track); line-height: 1.12; color: var(--accent); max-width: 900px; }
.ap-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 28px 0 14px; }
.ap-card { display: grid; gap: 6px; padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.ap-card b { font-family: var(--display); font-size: 20px; }
.ap-card span { color: var(--muted); }
.ap-card small { justify-self: start; margin-top: 4px; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; }

.ap-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ap-gallery img { display: block; width: 100%; height: auto; border-radius: 22px; }

.ap-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.ap-trust b { display: block; font-family: var(--display); font-size: 21px; margin-bottom: 6px; }
.ap-trust p { margin: 0; color: var(--muted); }

.ap-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 280px)); gap: 16px; margin: 28px 0 16px; }
.ap-plan { position: relative; display: grid; gap: 4px; padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.ap-plan.is-pick { border-color: var(--accent); }
.ap-plan span { position: absolute; top: -12px; left: 20px; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; }
.ap-plan strong { font-family: var(--display); font-size: 40px; letter-spacing: var(--track); line-height: 1; }
.ap-plan small { color: var(--muted); }

.ap-faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.ap-faq summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; }
.ap-faq summary::after { content: '+'; float: right; color: var(--accent); font-size: 22px; line-height: 1; }
.ap-faq details[open] summary::after { content: '–'; }
.ap-faq p { margin: 10px 0 0; color: var(--muted); }

.ap-tips ul { margin: 8px 0 24px; padding: 0; list-style: none; }
.ap-tips li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ap-tips a { text-decoration: none; font-weight: 600; }
.ap-contact .ap-lead { margin: 0 0 24px; }
.ap-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
	.ap-hero { grid-template-columns: 1fr; gap: 36px; padding-top: 28px; }
	.ap-trust { grid-template-columns: 1fr; }
	.ap-plans { grid-template-columns: 1fr 1fr; }
	.ap-sec { padding: 52px 0; }
}
@media (max-width: 480px) {
	.ap-plans { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .ap-site * { scroll-behavior: auto !important; } }

/* Thème clair (couleurs claires des pages légales de chaque app) */
@media (prefers-color-scheme: light) {
	.ap-cimea { --bg: #FBF4F2; --surface: #FFFFFF; --line: #EEDDE0; --ink: #3A2440; --muted: #7A6178; --accent: #B4435D; --on-accent: #FFFFFF; }
	.ap-garnie { --bg: #F2E6D6; --surface: #FBF4EA; --line: #D9C2A5; --ink: #20140E; --muted: #5E4632; --accent: #8A4F0A; --on-accent: #FFFFFF; }
	.ap-vesal { --bg: #F4EFE6; --surface: #FFFFFF; --line: #C9D3E0; --ink: #0F2747; --muted: #4E6280; --accent: #D9382C; --on-accent: #FFFFFF; }
	.ap-hero-shot img { box-shadow: 0 30px 60px rgba(0,0,0,.16); }
}
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
.ap-site h1, .ap-site h2, .ap-site h3, .ap-site blockquote { text-wrap: balance; }
.ap-site p, .ap-site li { text-wrap: pretty; }
.ap-site img { max-width: 100%; }
.ap-skip { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 10px 16px; border-radius: 999px; background: var(--accent); color: var(--on-accent) !important; font-weight: 700; text-decoration: none; }
.ap-skip:focus { top: 12px; }
.ap-site :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* En-tête : fond plein, fixé, sous l'heure et la batterie */
.ap-top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); padding-top: env(safe-area-inset-top); }
.ap-top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1180px; margin: 0 auto; padding: 12px max(24px, env(safe-area-inset-right)) 12px max(24px, env(safe-area-inset-left)); }
.ap-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; text-decoration: none; }
.ap-brand img { width: 36px; height: 36px; border-radius: 9px; }
.ap-nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.ap-nav a { text-decoration: none; opacity: .85; }
.ap-lang { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 700; line-height: 1; opacity: 1 !important; }
@media (hover: hover) { .ap-nav a:hover { opacity: 1; color: var(--accent); } }

/* Badge « Bientôt sur l'App Store » : noir dans les deux thèmes, comme le badge d'Apple */
.ap-badge { cursor: default; }
a.ap-badge.is-live { cursor: pointer; }
.ap-cta > * { flex: 0 0 auto; }

/* Pages simples : blog, article, légales, introuvable */
.ap-page { max-width: 760px; margin: 0 auto; padding: 48px 0 80px; }
.ap-page h1 { font-size: clamp(36px, 6vw, 56px); margin-bottom: 14px; }
.ap-page h1 em { font-style: normal; color: var(--accent); }
.ap-page > .ap-lead { margin: 0 0 32px; }
.ap-crumb { margin: 0 0 14px; font-size: 14px; }
.ap-crumb a { color: var(--muted); text-decoration: none; }
.ap-meta { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
.ap-list { list-style: none; margin: 0 0 24px; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); overflow: hidden; }
.ap-list li + li { border-top: 1px solid var(--line); }
.ap-list a { display: flex; align-items: center; gap: 16px; min-height: 76px; padding: 14px 18px; text-decoration: none; }
.ap-list img { flex: none; width: 96px; height: 64px; border-radius: 12px; object-fit: cover; }
.ap-list span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ap-list strong { font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.25; letter-spacing: -0.01em; }
.ap-list small { color: var(--muted); font-size: 14px; line-height: 1.45; }
@media (hover: hover) { .ap-list a:hover strong { color: var(--accent); } }
.ap-empty { display: grid; justify-items: start; gap: 18px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.ap-empty p { margin: 0; font-size: 19px; }
.ap-empty-page { padding-top: 96px; padding-bottom: 120px; }
.ap-empty-page .ap-lead { margin: 0 0 28px; }

.ap-prose h2 { font-size: 24px; margin: 40px 0 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.ap-prose h3 { font-size: 19px; margin: 28px 0 8px; }
.ap-prose p, .ap-prose li { font-size: 17px; line-height: 1.65; }
.ap-prose p { margin: 0 0 14px; }
.ap-prose ul, .ap-prose ol { margin: 0 0 16px; padding-left: 1.2em; }
.ap-prose li { margin: 0 0 6px; }
.ap-prose a { color: var(--accent); text-underline-offset: .2em; }
.ap-prose img { height: auto; border-radius: 14px; }
.ap-prose table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; display: block; overflow-x: auto; }
.ap-prose th, .ap-prose td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ap-prose th { color: var(--muted); font-weight: 700; }
.ap-doc h1 { font-size: clamp(32px, 5vw, 44px); }
.ap-doc h2 { font-family: var(--display); font-size: 22px; line-height: 1.2; margin: 36px 0 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.ap-doc p, .ap-doc li { font-size: 17px; line-height: 1.65; }
.ap-doc a { color: var(--accent); text-underline-offset: .2em; }
.ap-doc .meta { color: var(--muted); font-size: 14px; }
.ap-doc .note { padding: 14px 18px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ap-doc table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.ap-doc th, .ap-doc td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ap-doc th { color: var(--muted); }
.ap-art-img { display: block; width: 100%; height: auto; margin: 0 0 28px; border-radius: 20px; }
.ap-art-cta { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 18px; margin-top: 48px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.ap-art-cta img { border-radius: 13px; }
.ap-art-cta b { font-family: var(--display); font-size: 20px; }
.ap-art-cta p { margin: 4px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

/* Pied de page */
.ap-foot { border-top: 1px solid var(--line); background: var(--surface); padding-bottom: env(safe-area-inset-bottom); }
.ap-foot-in { max-width: 1180px; margin: 0 auto; padding: 36px max(24px, env(safe-area-inset-right)) 32px max(24px, env(safe-area-inset-left)); }
.ap-foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px; }
.ap-foot-id { display: grid; gap: 2px; margin: 0; color: var(--muted); font-size: 15px; }
.ap-foot-id b { color: var(--ink); font-family: var(--display); font-size: 20px; }
.ap-foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; }
.ap-foot-links a { text-decoration: none; }
@media (hover: hover) { .ap-foot-links a:hover { color: var(--accent); } }
.ap-foot-h { margin: 32px 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ap-foot-apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ap-foot-apps a { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; }
.ap-foot-apps img { flex: none; width: 40px; height: 40px; border-radius: 10px; }
.ap-foot-apps span { display: grid; min-width: 0; line-height: 1.25; }
.ap-foot-apps b { font-size: 16px; }
.ap-foot-apps small { color: var(--muted); font-size: 13px; }
@media (hover: hover) { .ap-foot-apps a:hover { border-color: var(--accent); } }
.ap-foot-legal { margin: 28px 0 0; color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
	.ap-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ap-nav a:not(.ap-lang):not(.ap-blog) { display: none; }
	.ap-nav { gap: 18px; }
}
@media (max-width: 640px) {
	.ap-hero h1 { font-size: 42px; }
	.ap-hero .ap-lead { font-size: 18px; }
	.ap-cta { display: grid; grid-template-columns: 1fr; }
	.ap-cta .ap-badge, .ap-cta .ap-btn { justify-content: center; width: 100%; }
	.ap-hero-shot img { max-width: 300px; }
	.ap-page { padding: 32px 0 64px; }
	.ap-list a { align-items: flex-start; padding: 14px; gap: 12px; }
	.ap-list img { width: 72px; height: 54px; }
	.ap-art-cta { grid-template-columns: 48px 1fr; }
	.ap-art-cta img { width: 48px; height: 48px; }
	.ap-art-cta .ap-badge { grid-column: 1 / -1; justify-content: center; }
	.ap-foot-apps { grid-template-columns: 1fr; }
	.ap-foot-top { flex-direction: column; align-items: flex-start; }
}
