/* ============================================================
   SwapPanini — Feuille de styles principale
   Couleurs : Navy #0A1628 · Rouge #C8102E · Or #C9A84C
   Fond général : #EAECEF
   ============================================================ */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Base */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #EAECEF;
    color: #0A1628;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* empêche le scroll horizontal global */
}

a { text-decoration: none; color: inherit; }

main { flex: 1; }

/* ── HEADER ── */
.header {
    background: #0A1628;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-icon {
    width: 36px; height: 36px;
    background: #C8102E;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff;
}
.logo-text { color: #fff; font-size: 17px; font-weight: 600; }
.logo-text span { color: #C9A84C; }

.nav { display: flex; align-items: center; gap: 24px; }
.nav a {
    color: rgba(255,255,255,.72);
    font-size: 14px;
    transition: color .2s;
}
.nav a:hover, .nav a.active { color: #fff; }

.nav-badge {
    background: #C9A84C;
    color: #0A1628;
    font-size: 11px; font-weight: 600;
    padding: 1px 7px;
    border-radius: 20px;
    margin-left: 4px;
    vertical-align: middle;
}

.btn-member {
    background: #C8102E;
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    box-shadow: 0 0 0 3px rgba(200,16,46,.28);
    transition: background .2s;
}
.btn-member:hover { background: #a50d25; }

/* ── HERO ── */
.hero {
    background: #0A1628;
    padding: 3.5rem 2rem 4.5rem;
    text-align: center;
}
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(201,168,76,.15);
    border: 1px solid rgba(201,168,76,.4);
    color: #C9A84C;
    font-size: 12px; font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 1.5rem;
}
.hero h1 {
    color: #fff;
    font-size: 36px; font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1rem;
}
.hero h1 em { color: #C9A84C; font-style: normal; }
.hero p {
    color: rgba(255,255,255,.62);
    font-size: 16px;
    max-width: 480px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}
.hero-ctas { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }

.btn-primary {
    background: #C8102E; color: #fff;
    border: none; padding: 12px 28px;
    border-radius: 8px; font-size: 15px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
    transition: background .2s;
}
.btn-primary:hover { background: #a50d25; }

.btn-outline {
    background: transparent; color: #fff;
    border: 1px solid rgba(255,255,255,.35);
    padding: 12px 28px; border-radius: 8px; font-size: 15px;
    cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
    transition: border-color .2s, color .2s;
}
.btn-outline:hover { border-color: #fff; }

.hero-stats { display: flex; justify-content: center; gap: 2.5rem; margin-top: 3rem; }
.hero-stat { text-align: center; }
.hero-stat-num { color: #C9A84C; font-size: 26px; font-weight: 700; }
.hero-stat-lbl { color: rgba(255,255,255,.5); font-size: 12px; margin-top: 2px; }
.hero-divider { width: 1px; background: rgba(255,255,255,.12); height: 40px; align-self: center; }

/* ── BANDE DÉFILANTE ── */
.sticker-strip {
    background: #C8102E;
    padding: 10px 0;
    display: flex; align-items: center;
    overflow: hidden;
}
.strip-inner { display: flex; gap: 32px; align-items: center; white-space: nowrap; }
.strip-item {
    color: rgba(255,255,255,.85);
    font-size: 13px; font-weight: 500;
    display: flex; align-items: center; gap: 8px;
    padding: 0 16px;
}
.strip-dot {
    width: 5px; height: 5px;
    background: #C9A84C; border-radius: 50%; flex-shrink: 0;
}

/* ── SECTIONS ── */
.section { padding: 3rem 2rem; }
.section-title { font-size: 22px; font-weight: 600; color: #0A1628; margin-bottom: .4rem; }
.section-sub { color: #888; font-size: 15px; margin-bottom: 2rem; }

/* ── ÉTAPES ── */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 16px; }
.step-card {
    background: #fff; border-radius: 12px;
    border: 1px solid rgba(0,0,0,.07);
    padding: 1.25rem; display: flex; flex-direction: column; gap: 12px;
}
.step-num {
    width: 32px; height: 32px;
    background: #C8102E; color: #fff;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700;
}
.step-title { font-size: 15px; font-weight: 600; color: #0A1628; }
.step-desc { font-size: 13px; color: #888; line-height: 1.6; }

/* ── FEATURES ── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 16px; }
.feature-card {
    background: #fff; border-radius: 12px;
    border: 1px solid rgba(0,0,0,.07); padding: 1.25rem;
}
.feature-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px; font-size: 22px;
}
.feature-title { font-size: 15px; font-weight: 600; color: #0A1628; margin-bottom: 6px; }
.feature-desc { font-size: 13px; color: #888; line-height: 1.6; }

/* ── ESPACE MEMBRES (section accueil) ── */
.member-section { background: #0A1628; padding: 3rem 2rem; }
.member-inner {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 2rem; max-width: 700px; margin: 0 auto;
}
.member-panel {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px; padding: 1.5rem;
}
.member-panel-title {
    color: #C9A84C; font-size: 16px; font-weight: 600;
    margin-bottom: 1.25rem; display: flex; align-items: center; gap: 8px;
}

/* ── FORMULAIRES AUTH ── */
.auth-page {
    min-height: 80vh;
    display: flex; align-items: center; justify-content: center;
    padding: 2rem;
}
.auth-card {
    background: #0A1628;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%; max-width: 420px;
}
.auth-card h2 {
    color: #fff; font-size: 22px; font-weight: 700;
    margin-bottom: .4rem;
}
.auth-card .auth-sub {
    color: rgba(255,255,255,.45); font-size: 14px; margin-bottom: 2rem;
}
.form-group { margin-bottom: 16px; }
.form-label { display: block; color: rgba(255,255,255,.55); font-size: 12px; margin-bottom: 5px; }
.form-input {
    width: 100%;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px; padding: 10px 14px;
    color: #fff; font-size: 14px; font-family: inherit;
    outline: none; transition: border-color .2s;
}
.form-input::placeholder { color: rgba(255,255,255,.3); }
.form-input:focus { border-color: #C9A84C; }
/* Les <option> sont rendues par l'OS — il faut forcer fond+texte */
.form-input option {
    background: #0d1f3c;
    color: #fff;
}

.btn-red-full {
    width: 100%; background: #C8102E; color: #fff;
    border: none; padding: 12px;
    border-radius: 8px; font-size: 15px; font-weight: 600;
    cursor: pointer; margin-top: 6px; transition: background .2s;
}
.btn-red-full:hover { background: #a50d25; }

.auth-link { text-align: center; margin-top: 1.25rem; }
.auth-link a { color: #C9A84C; font-size: 13px; }
.auth-link a:hover { text-decoration: underline; }

/* Alertes */
.alert {
    padding: 10px 14px; border-radius: 8px;
    font-size: 13px; margin-bottom: 1rem;
}
.alert-error   { background: rgba(200,16,46,.15); color: #ff6b6b; border: 1px solid rgba(200,16,46,.3); }
.alert-warning { background: rgba(251,191,36,.15); color: #f59e0b; border: 1px solid rgba(251,191,36,.3); }
.alert-success { background: rgba(30,180,100,.15); color: #4ade80; border: 1px solid rgba(30,180,100,.3); }

/* ── FOOTER ── */
.footer {
    background: #0A1628;
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 1.5rem 2rem;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
}
.footer-left { color: rgba(255,255,255,.4); font-size: 13px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,.4); font-size: 13px; transition: color .2s; }
.footer-links a:hover { color: rgba(255,255,255,.75); }
.gold-star { color: #C9A84C; }

/* ── HEADER MOBILE ─────────────────────────────────────────── */
.header-user-desktop { display: flex; align-items: center; gap: 12px; }

/* Bouton hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    padding: 7px 8px;
    border-radius: 7px;
    line-height: 1;
    transition: background .15s;
    -webkit-tap-highlight-color: transparent;
}
.hamburger:hover  { background: rgba(255,255,255,.1); }
.hamburger:active { background: rgba(255,255,255,.18); }

/* Panneau menu mobile */
.mobile-menu {
    position: fixed;
    top: 62px; left: 0; right: 0;
    z-index: 99;
    background: #0A1628;
    border-top: 1px solid rgba(255,255,255,.08);
    max-height: calc(100vh - 62px);
    overflow-y: auto;
    /* Animation slide-down */
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform .22s ease, opacity .22s ease, visibility 0s linear .22s;
    box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform .22s ease, opacity .22s ease, visibility 0s linear 0s;
}

/* Liens de navigation dans le menu */
.mobile-nav { padding: 6px 0; }
.mobile-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255,255,255,.72);
    font-size: 15px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.05);
    transition: background .15s, color .15s;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover,
.mobile-nav a.active { background: rgba(255,255,255,.06); color: #fff; }
.mobile-nav a i { font-size: 19px; width: 24px; flex-shrink: 0; }

/* Zone utilisateur en bas du menu */
.mobile-menu-user {
    padding: 14px 16px 24px;
    border-top: 1px solid rgba(255,255,255,.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mobile-menu-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 4px 12px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.07);
    margin-bottom: 4px;
}
.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 4px;
    color: rgba(255,255,255,.7);
    font-size: 14px;
    text-decoration: none;
    border-radius: 6px;
    transition: color .15s;
}
.mobile-menu-link i { font-size: 17px; }
.mobile-menu-link:hover,
.mobile-menu-link.active { color: #fff; }
.mobile-menu-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(200,16,46,.14);
    color: #ff8080;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
    transition: background .15s;
}
.mobile-menu-logout:hover { background: rgba(200,16,46,.26); color: #fff; }
.mobile-menu-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #C8102E;
    color: #fff;
    padding: 13px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background .15s;
}
.mobile-menu-cta:hover { background: #a50d25; }
.mobile-menu-cta-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.22);
    color: rgba(255,255,255,.78);
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: background .15s;
}
.mobile-menu-cta-outline:hover { background: rgba(255,255,255,.07); color: #fff; }

/* Backdrop semi-transparent */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 62px; left: 0; right: 0; bottom: 0;
    z-index: 98;
    background: rgba(0,0,0,.4);
    -webkit-tap-highlight-color: transparent;
}
.mobile-overlay.open { display: block; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    /* Header */
    .nav                  { display: none; }
    .header-user-desktop  { display: none; }
    .hamburger            { display: flex; align-items: center; justify-content: center; }
    .header               { padding: 0 1rem; }

    /* Hero */
    .hero                 { padding: 2rem 1rem 3rem; }
    .hero h1              { font-size: 24px; }
    .hero p               { font-size: 14px; }
    .hero-stats           { gap: 1rem; flex-wrap: wrap; justify-content: center; }
    .hero-stat-num        { font-size: 20px; }
    .hero-divider         { display: none; }

    /* Sections index */
    .section              { padding: 2rem 1rem; }
    .steps-grid           { grid-template-columns: 1fr; }
    .features-grid        { grid-template-columns: 1fr; }
    .member-inner         { grid-template-columns: 1fr; }
    .member-section       { padding: 2rem 1rem; }

    /* Auth pages */
    .auth-page            { padding: 1rem; }
    .auth-card            { padding: 1.5rem 1.25rem; }

    /* Footer */
    .footer               { flex-direction: column; text-align: center; padding: 1.25rem 1rem; }
    .footer-links         { flex-wrap: wrap; justify-content: center; gap: 12px; }
}

@media (max-width: 600px) {
    /* Wraps génériques */
    .amis-wrap,
    .defis-wrap,
    .membre-wrap  { padding: 0 12px 60px; margin-top: 24px; }

    /* Grilles */
    .ami-grid     { grid-template-columns: 1fr; }
    .defis-grid   { grid-template-columns: 1fr; }

    /* Cartes de demandes */
    .request-card { flex-wrap: wrap; gap: 10px; }
    .request-actions { margin-left: 0; width: 100%; justify-content: flex-end; }

    /* Stats membre */
    .membre-stats { grid-template-columns: repeat(2, 1fr); }

    /* Actions membre */
    .membre-actions { flex-direction: column; }
    .membre-actions a,
    .membre-actions button { width: 100%; justify-content: center; }

    /* Profil sidebar → colonne unique */
    .profil-layout { grid-template-columns: 1fr !important; }

    /* Dashboard */
    .db-main      { grid-template-columns: 1fr !important; padding: 0 12px 24px !important; }
    .db-kpis      { grid-template-columns: repeat(2, 1fr) !important; }

    /* Admin */
    .admin-wrap   { padding: 0 12px 40px !important; }
    .data-table   { font-size: 12px; }
    .data-table th,
    .data-table td { padding: 8px 6px; }

    /* Chat fab */
    #chat-fab     { right: 12px; bottom: 12px; }
    #chat-panel   { width: calc(100vw - 16px); right: 8px; bottom: 76px; height: 72vh; }

    /* Partenaire */
    .partner-card { flex-direction: column; text-align: center; }
}
