/* ===========================================================================
   RECHARGE CHECKOUT — main.css
   Design system + header + footer + base
   =========================================================================== */

/* ---------- Design tokens ---------- */
:root {
    /* Couleurs de marque */
    --rc-brand-purple: #5B21E0;
    --rc-brand-magenta: #D946EF;
    --rc-brand-gradient: linear-gradient(90deg, #5B21E0 0%, #D946EF 100%);
    --rc-brand-gradient-hover: linear-gradient(90deg, #4A18C7 0%, #C035DC 100%);

    /* Couleurs neutres */
    --rc-black: #0A0A0A;
    --rc-text: #111827;
    --rc-text-muted: #6B7280;
    --rc-text-subtle: #9CA3AF;
    --rc-border: #E5E7EB;
    --rc-border-strong: #D1D5DB;
    --rc-border-soft: #F3F4F6;
    --rc-bg: #FFFFFF;
    --rc-bg-soft: #F9FAFB;
    --rc-bg-card: #FFFFFF;

    /* États */
    --rc-success: #10B981;
    --rc-error: #EF4444;
    --rc-warning: #F59E0B;
    --rc-info: #3B82F6;

    /* Rayons */
    --rc-radius-sm: 8px;
    --rc-radius-md: 12px;
    --rc-radius-lg: 16px;
    --rc-radius-xl: 20px;
    --rc-radius-pill: 999px;

    /* Espacements */
    --rc-space-1: 4px;
    --rc-space-2: 8px;
    --rc-space-3: 12px;
    --rc-space-4: 16px;
    --rc-space-5: 20px;
    --rc-space-6: 24px;
    --rc-space-8: 32px;
    --rc-space-10: 40px;
    --rc-space-12: 48px;
    --rc-space-16: 64px;

    /* Ombres */
    --rc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --rc-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --rc-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
    --rc-shadow-brand: 0 8px 20px rgba(91, 33, 224, 0.25);

    /* Typo */
    --rc-font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Layout */
    --rc-container-max: 1280px;
    --rc-container-narrow: 760px;
    --rc-header-height: 76px;

    /* Transitions */
    --rc-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body.rc-body {
    margin: 0;
    font-family: var(--rc-font-sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--rc-text);
    background: var(--rc-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv11', 'ss03';
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; transition: color var(--rc-transition); }
a:focus-visible {
    outline: 2px solid var(--rc-brand-purple);
    outline-offset: 2px;
    border-radius: 2px;
}

button { font-family: inherit; cursor: pointer; }

/* ---------- Skip link accessibilité ---------- */
.rc-skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: var(--rc-black);
    color: #fff;
    opacity: 0;
}
.rc-skip-link:focus {
    left: 1em;
    top: 1em;
    opacity: 1;
}

/* ---------- Container ---------- */
.rc-container {
    width: 100%;
    max-width: var(--rc-container-max);
    margin: 0 auto;
    padding: 0 24px;
}
.rc-container--narrow { max-width: var(--rc-container-narrow); }

@media (max-width: 640px) {
    .rc-container { padding: 0 16px; }
}

/* ============================================================================
   HEADER
   ============================================================================ */
.rc-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--rc-border-soft);
}

.rc-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--rc-header-height);
    gap: var(--rc-space-6);
}

/* Variante minimale : logo seul centré (utilisée sur le checkout) */
.rc-header--minimal .rc-header__inner {
    justify-content: center;
}

/* Logo */
.rc-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: var(--rc-text);
}
.rc-logo__mark { display: flex; }
.rc-logo__text {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.02em;
    line-height: 1;
    background: var(--rc-brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.rc-logo img { max-height: 44px; width: auto; }

/* Nav */
.rc-nav { display: flex; flex: 1; justify-content: center; }
.rc-nav__list {
    display: flex;
    align-items: center;
    gap: var(--rc-space-6);
    list-style: none;
    margin: 0;
    padding: 0;
}
.rc-nav__link {
    font-size: 15px;
    font-weight: 500;
    color: var(--rc-text);
    padding: 8px 0;
    position: relative;
    transition: color var(--rc-transition);
}
.rc-nav__link:hover { color: var(--rc-brand-purple); }
.rc-nav__item--promos .rc-nav__link {
    color: var(--rc-brand-magenta);
    font-weight: 600;
}

/* Header actions */
.rc-header__actions {
    display: flex;
    align-items: center;
    gap: var(--rc-space-4);
    flex-shrink: 0;
}
.rc-header__action {
    position: relative;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--rc-radius-pill);
    color: var(--rc-text);
    transition: background-color var(--rc-transition), color var(--rc-transition);
}
.rc-header__action:hover { background: var(--rc-bg-soft); color: var(--rc-brand-purple); }

.rc-header__cart-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--rc-radius-pill);
    background: var(--rc-brand-gradient);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

/* Header responsive */
@media (max-width: 980px) {
    .rc-nav { display: none; }
    .rc-header__inner { gap: var(--rc-space-3); }
}
@media (max-width: 480px) {
    .rc-logo__text { font-size: 18px; }
    :root { --rc-header-height: 64px; }
}

/* ============================================================================
   MAIN
   ============================================================================ */
.rc-main {
    min-height: calc(100vh - var(--rc-header-height) - 80px);
    padding: var(--rc-space-12) 0 var(--rc-space-16);
}

.rc-page-title {
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.02;
    color: var(--rc-black);
    margin: 0 0 var(--rc-space-8);
    position: relative;
}
.rc-page-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin-top: var(--rc-space-4);
    background: var(--rc-brand-gradient);
    border-radius: var(--rc-radius-pill);
}

/* ---------- Boutons ---------- */
.rc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--rc-radius-md);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--rc-transition);
    text-decoration: none;
    white-space: nowrap;
}
.rc-btn--primary {
    background: var(--rc-brand-gradient);
    color: #fff;
    box-shadow: var(--rc-shadow-brand);
}
.rc-btn--primary:hover {
    background: var(--rc-brand-gradient-hover);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(91, 33, 224, 0.35);
}
.rc-btn--secondary {
    background: #fff;
    color: var(--rc-text);
    border-color: var(--rc-border);
}
.rc-btn--secondary:hover {
    border-color: var(--rc-text);
}

/* ============================================================================
   FOOTER
   ============================================================================ */
.rc-footer {
    border-top: 1px solid var(--rc-border-soft);
    padding: var(--rc-space-6) 0;
    background: var(--rc-bg);
}
.rc-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rc-space-6);
    flex-wrap: wrap;
}
.rc-footer__legal {
    display: flex;
    align-items: center;
    gap: var(--rc-space-2);
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--rc-text-muted);
}
.rc-footer__sep { color: var(--rc-text-subtle); }
.rc-footer__link {
    color: var(--rc-text-muted);
    transition: color var(--rc-transition);
}
.rc-footer__link:hover { color: var(--rc-text); }
.rc-footer__trust {
    display: flex;
    align-items: center;
    gap: var(--rc-space-4);
    font-size: 13px;
    color: var(--rc-text-muted);
}
.rc-footer__trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.rc-footer__trust-item svg { color: var(--rc-success); }

@media (max-width: 640px) {
    .rc-footer__inner { flex-direction: column; align-items: flex-start; }
}
