/* Roar Cosmos UI — composants (HTML + CSS, sans framework)
   Chargé après tokens.css : toutes les couleurs passent par les variables sémantiques
   (--surface, --text, --text-accent…), qui basculent avec data-theme="lune" | "nuit".
   Polices hébergées par Google Fonts : */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@700;800&family=Poppins:wght@400;500;600&family=Playfair+Display:ital,wght@1,500&display=swap");

.rc, .rc * { box-sizing: border-box; }
.rc { font-family: var(--font-body); color: var(--text); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
.rc img, .rc svg { max-width: 100%; }
.rc :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* ── Fonds de section ── */
.rc-section { position: relative; overflow: hidden; background: var(--surface); color: var(--text); padding-block: var(--space-8); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.rc-section > .rc-wrap { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; }
.rc-section--ciel { background: linear-gradient(180deg, var(--nuit) 0%, var(--indigo) 100%); }
.rc-section--ciel-aura { background: radial-gradient(circle at 70% 45%, rgba(107, 75, 163, 0.45), transparent 60%), linear-gradient(180deg, var(--nuit) 0%, var(--indigo) 100%); }
.rc-aura { background: radial-gradient(circle at 50% 45%, rgba(107, 75, 163, 0.45), transparent 65%); }
.rc-sky { position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(245, 242, 250, 0.8), transparent 60%),
    radial-gradient(1.5px 1.5px at 38% 72%, rgba(245, 242, 250, 0.6), transparent 60%),
    radial-gradient(2px 2px at 64% 26%, rgba(231, 184, 90, 0.9), transparent 60%),
    radial-gradient(1.5px 1.5px at 82% 64%, rgba(200, 182, 236, 0.8), transparent 60%),
    radial-gradient(1.5px 1.5px at 22% 88%, rgba(245, 242, 250, 0.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 92% 12%, rgba(245, 242, 250, 0.7), transparent 60%),
    radial-gradient(2px 2px at 52% 52%, rgba(200, 182, 236, 0.5), transparent 60%);
  background-size: 420px 300px; }
@media (max-width: 600px) { .rc-section { padding-block: 56px; } }

/* ── En-tête de section ── */
.rc-eyebrow { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0 0 14px; font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-accent); }
.rc-eyebrow svg { width: 14px; height: 14px; flex: none; fill: currentColor; }
.rc-title { font-family: var(--font-display); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; margin: 0 0 16px; font-size: clamp(30px, 4.6vw, 48px); color: var(--text); }
.rc-title--hero { font-size: clamp(40px, 7vw, 76px); line-height: 1.02; }
.rc-title em, .rc-accent { font-family: var(--font-accent); font-style: italic; font-weight: 500; letter-spacing: -0.01em; color: var(--text-accent); }
.rc-lead { margin: 0; max-width: 62ch; font-size: 17px; color: var(--text-muted); }
.rc-section-head { margin-bottom: var(--space-7); }

/* ── Boutons ── */
.rc-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); font-family: var(--font-body); font-weight: 600; font-size: 15px; line-height: 1.2; padding: 12px 22px; min-height: 44px; border-radius: var(--radius-pill); border: 0; cursor: pointer; text-decoration: none; transition: box-shadow .25s ease, transform .25s ease, background-color .25s ease, color .25s ease; }
.rc-btn svg { width: 18px; height: 18px; flex: none; }
.rc-btn--primary { background: var(--action); color: var(--on-action); }
.rc-btn--primary:hover { box-shadow: var(--glow-or); transform: translateY(-1px); }
.rc-btn--secondary { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.rc-btn--secondary:hover { background: var(--tag-bg); }
.rc-btn--text { background: transparent; color: var(--text-accent); padding-inline: 4px; min-height: 0; }
.rc-btn--text:hover { text-decoration: underline; text-underline-offset: 4px; }
.rc-btn:disabled, .rc-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: inset 0 0 0 1.5px var(--border-strong); background: transparent; color: var(--text-muted); transform: none; }
.rc-btn--sm { font-size: 14px; padding: 8px 16px; min-height: 36px; }
.rc-icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-pill); border: 0; background: transparent; color: var(--text); cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--border); transition: background-color .2s ease; }
.rc-icon-btn:hover { background: var(--tag-bg); }
.rc-icon-btn svg { width: 20px; height: 20px; }

/* ── Pastilles et filtres ── */
.rc-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; line-height: 1.4; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--tag-bg); color: var(--tag-text); }
.rc-tag--outline { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text-muted); }
.rc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-filters { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.rc-filter { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-size: 14px; font-weight: 500; padding: 8px 16px; min-height: 40px; border-radius: var(--radius-pill); border: 0; cursor: pointer; background: transparent; color: var(--text-muted); box-shadow: inset 0 0 0 1.5px var(--border); }
.rc-filter .rc-count { font-variant-numeric: tabular-nums; font-size: 12px; opacity: .8; }
.rc-filter[aria-pressed="true"] { background: var(--text); color: var(--surface); box-shadow: none; }
.rc-filter:hover:not([aria-pressed="true"]) { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border-strong); }

/* ── Icônes ── */
.rc-icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.rc-icon-badge { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--tag-bg); color: var(--text-accent); }

/* ── Cartes ── */
.rc-card { border-radius: var(--radius-md); background: var(--surface-raised); color: var(--text); border: 1px solid var(--border); padding: var(--space-5); min-width: 0; }
.rc-card--lift { box-shadow: var(--lift); }
.rc-card h3 { font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 6px; }
.rc-card p { margin: 0; font-size: 14px; color: var(--text-muted); }
.rc-kind { display: block; font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-accent); margin-bottom: 4px; }

.rc-project { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.rc-project__thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: linear-gradient(135deg, var(--brume), #E9E1F7); }
.rc-project__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-project__body { display: grid; gap: 8px; padding: 0 4px 4px; }
.rc-project__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

.rc-service { display: grid; gap: 14px; }
.rc-skill { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.rc-skill b { display: block; font-family: var(--font-display); font-size: 15px; }
.rc-skill span { font-size: 13px; color: var(--text-muted); }
.rc-skill .rc-level { margin-left: auto; display: flex; gap: 3px; }
.rc-skill .rc-level i { width: 8px; height: 8px; background: var(--border); }
.rc-skill .rc-level i.on { background: var(--text-accent); }

.rc-quote { display: grid; gap: 18px; padding: var(--space-6); }
.rc-quote blockquote { margin: 0; font-size: 17px; line-height: 1.6; color: var(--text); }
.rc-quote blockquote::before { content: "« "; font-family: var(--font-accent); font-style: italic; color: var(--text-accent); }
.rc-quote blockquote::after { content: " »"; font-family: var(--font-accent); font-style: italic; color: var(--text-accent); }
.rc-person { display: flex; align-items: center; gap: 12px; }
.rc-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--tag-bg); color: var(--text-accent); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 15px; flex: none; overflow: hidden; }
.rc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rc-person b { display: block; font-size: 15px; }
.rc-person span { font-size: 13px; color: var(--text-muted); }

.rc-fact { display: grid; gap: 10px; padding: var(--space-6); }
.rc-fact__num { font-family: var(--font-display); font-weight: 800; font-size: clamp(48px, 8vw, 80px); line-height: .95; letter-spacing: -0.03em; color: var(--text-accent); font-variant-numeric: tabular-nums; }
.rc-fact__num small { font-size: .32em; letter-spacing: 0; color: var(--text); margin-left: 6px; }

/* ── Fenêtre (style Mac, pour les projets et le Finder) ── */
.rc-window { border-radius: var(--radius-md); overflow: hidden; background: var(--surface-raised); border: 1px solid var(--border); box-shadow: var(--lift); min-width: 0; }
.rc-window__bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface-sunken); border-bottom: 1px solid var(--border); }
.rc-window__dots { display: flex; gap: 6px; }
.rc-window__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); opacity: .55; }
.rc-window__title { font-size: 12px; font-weight: 500; color: var(--text-muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-window__body { padding: var(--space-5); }

/* ── Navigation ── */
.rc-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: 14px max(16px, env(safe-area-inset-left, 0px)); background: var(--surface); }
.rc-header__logo { display: block; height: 22px; width: auto; }
.rc-nav { display: flex; gap: 4px; }
.rc-nav a { font-size: 14px; font-weight: 500; color: var(--text-muted); text-decoration: none; padding: 8px 14px; border-radius: var(--radius-pill); }
.rc-nav a:hover { color: var(--text); background: var(--tag-bg); }
.rc-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--text-accent); border-radius: 0; }
.rc-header .rc-icon-btn { display: none; }
@media (max-width: 720px) { .rc-nav { display: none; } .rc-header .rc-icon-btn { display: inline-grid; } }

.rc-footer { padding: var(--space-7) max(16px, env(safe-area-inset-left, 0px)) var(--space-6); background: var(--surface); color: var(--text); }
.rc-footer__grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.rc-footer h4 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-accent); }
.rc-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.rc-footer a { color: var(--text-muted); text-decoration: none; }
.rc-footer a:hover { color: var(--text); }
.rc-footer__sig { font-family: var(--font-accent); font-style: italic; font-weight: 500; font-size: 28px; color: var(--text-accent); }
.rc-footer__legal { max-width: 1100px; margin: var(--space-6) auto 0; padding-top: var(--space-4); border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 720px) { .rc-footer__grid { grid-template-columns: 1fr; } }

/* ── Hero ── */
.rc-hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--space-6); align-items: center; }
.rc-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.rc-hero__art { justify-self: center; width: min(320px, 100%); }
.rc-hero__art img, .rc-hero__art svg { width: 100%; height: auto; display: block; }
@media (max-width: 760px) { .rc-hero__grid { grid-template-columns: 1fr; } .rc-hero__art { width: min(220px, 70%); order: -1; } }

/* ── Parcours / timeline ── */
.rc-timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.rc-timeline li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 16px; }
.rc-timeline .rc-rail { position: relative; display: flex; justify-content: center; }
.rc-timeline .rc-rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: repeating-linear-gradient(var(--border-strong) 0 4px, transparent 4px 10px); opacity: .6; }
.rc-timeline li:last-child .rc-rail::before { bottom: auto; height: 14px; }
.rc-timeline .rc-dot { position: relative; margin-top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 3px var(--text-accent); }
.rc-timeline .rc-goal .rc-dot { background: var(--action); box-shadow: none; }
.rc-timeline .rc-body { padding-bottom: var(--space-5); }
.rc-timeline .rc-date { font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-number); }
.rc-timeline h5 { margin: 2px 0 4px; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.rc-timeline p { margin: 0; font-size: 14px; color: var(--text-muted); }

/* ── Formulaires ── */
.rc-field { display: grid; gap: 6px; }
.rc-field label { font-size: 14px; font-weight: 600; color: var(--text); }
.rc-field .rc-hint { font-size: 13px; color: var(--text-muted); }
.rc-input { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--surface-raised); border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); padding: 12px 14px; min-height: 48px; transition: border-color .2s ease, box-shadow .2s ease; }
.rc-input::placeholder { color: var(--text-muted); opacity: .8; }
.rc-input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
textarea.rc-input { min-height: 132px; resize: vertical; }
.rc-field--error .rc-input { border-color: #B3261E; }
.rc-field--error .rc-hint { color: #B3261E; }
[data-theme="nuit"] .rc-field--error .rc-input, [data-theme="nuit"] .rc-field--error .rc-hint { border-color: #FFB4AB; color: #FFB4AB; }
.rc-form { display: grid; gap: var(--space-4); }
.rc-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 600px) { .rc-form__row { grid-template-columns: 1fr; } }

/* ── Modale projet ── */
.rc-modal-backdrop { position: fixed; inset: 0; background: rgba(23, 21, 58, 0.72); display: grid; place-items: center; padding: 16px; z-index: 50; }
.rc-modal { position: relative; width: min(760px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: var(--radius-lg); background: var(--surface-raised); color: var(--text); box-shadow: var(--lift); }
.rc-modal__cover { aspect-ratio: 21 / 9; background: radial-gradient(circle at 50% 50%, rgba(107, 75, 163, 0.45), transparent 65%), linear-gradient(180deg, var(--nuit), var(--indigo)); }
.rc-modal__body { padding: var(--space-6); display: grid; gap: var(--space-4); }
.rc-modal__close { position: absolute; top: 14px; right: 14px; background: rgba(23, 21, 58, 0.55); color: var(--lune); box-shadow: none; }
.rc-modal__meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); padding: var(--space-4) 0; border-block: 1px solid var(--border); }
.rc-modal__meta dt { font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-accent); }
.rc-modal__meta dd { margin: 2px 0 0; font-size: 14px; }
@media (max-width: 600px) { .rc-modal__meta { grid-template-columns: 1fr; } }

/* ── Grilles utilitaires ── */
.rc-grid { display: grid; gap: var(--space-4); }
.rc-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rc-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .rc-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .rc-grid--2, .rc-grid--3 { grid-template-columns: 1fr; } }

.rc-pixel { image-rendering: pixelated; shape-rendering: crispEdges; }

@media (prefers-reduced-motion: reduce) {
  .rc-btn, .rc-icon-btn, .rc-input { transition: none; }
  .rc-btn--primary:hover { transform: none; }
}
