/***************************************************************************
*
*   ████████╗ ██████╗ ███╗   ███╗'  ███████╗
*   ╚══██╔══╝██╔═══██╗████╗ ████║   ██╔════╝
*      ██║   ██║   ██║██╔████╔██║   ███████╗
*      ██║   ██║   ██║██║╚██╔╝██║   ╚════██║
*      ██║   ╚██████╔╝██║ ╚═╝ ██║   ███████║
*      ╚═╝    ╚═════╝ ╚═╝     ╚═╝   ╚══════╝
*
*        ========= Tom's =========
*
*  Project   : samu-gprp.fr
*  File      : assets/css/main.css
*  Author    : Tom's
*  Created   : 21/04/2026
*  Updated   : 21/04/2026
*  Version   : 1.0.0
*
*  Description :
*  --------------------------------------------------
*  Styles globaux : reset, variables, typographie,
*  header, footer, boutons, formulaires, alertes,
*  hero, services, popup fictif.
*
***************************************************************************/

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
    --c-bg:         #0b1016;
    --c-surface:    #111827;
    --c-surface2:   #1f2937;
    --c-border:     #1f2937;
    --c-text:       #e5e7eb;
    --c-muted:      #9ca3af;
    --c-primary:    #38bdf8;
    --c-primary-dk: #0284c7;
    --c-green:      #22c55e;
    --c-red:        #ef4444;
    --c-red-dk:     #c62828;
    --c-discord:    #5865f2;
    --c-discord-dk: #4752c4;
    --c-yellow:     #fbbf24;

    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 16px;

    --shadow:    0 4px 16px rgba(0,0,0,.45);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.65);

    --transition: .15s ease;

    --header-h: 64px;
    --font: 'Inter', system-ui, Arial, sans-serif;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background:  var(--c-bg);
    color:       var(--c-text);
    line-height: 1.6;
    min-height:  100vh;
    display:     flex;
    flex-direction: column;
}

main { flex: 1; }

img, svg { display: block; max-width: 100%; }

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

ul { list-style: none; }

input, select, textarea, button {
    font-family: inherit;
    font-size:   inherit;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
    max-width: 1200px;
    margin:    0 auto;
    padding:   0 20px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position:   sticky;
    top:        0;
    z-index:    100;
    background: var(--c-surface);
    border-bottom: 2px solid var(--c-red-dk);
    height:     var(--header-h);
}

.header-inner {
    max-width:   1200px;
    margin:      0 auto;
    padding:     0 20px;
    height:      100%;
    display:     flex;
    align-items: center;
    gap:         24px;
}

.header-logo {
    font-size:   20px;
    font-weight: 800;
    color:       #fff;
    letter-spacing: 1px;
    white-space: nowrap;
}
.header-logo span { color: var(--c-red-dk); }
.header-logo:hover { text-decoration: none; }

/* Nav */
.header-nav { flex: 1; }

.nav-list {
    display:     flex;
    align-items: center;
    gap:         4px;
    flex-wrap:   wrap;
}

.nav-link {
    color:         var(--c-muted);
    font-size:     14px;
    font-weight:   600;
    padding:       6px 10px;
    border-radius: var(--radius-sm);
    transition:    color var(--transition), background var(--transition);
    white-space:   nowrap;
}
.nav-link:hover { color: #fff; background: var(--c-surface2); text-decoration: none; }
.nav-link.nav-active { color: var(--c-primary); }

/* Zone utilisateur */
.header-user {
    display:     flex;
    align-items: center;
    gap:         12px;
    margin-left: auto;
    flex-shrink: 0;
}

.user-info {
    display:     flex;
    align-items: center;
    gap:         8px;
}

.user-avatar {
    width:         32px;
    height:        32px;
    border-radius: 50%;
    object-fit:    cover;
    border:        2px solid var(--c-border);
}

.user-avatar-placeholder {
    display:         flex;
    align-items:     center;
    justify-content: center;
    background:      var(--c-surface2);
    color:           var(--c-primary);
    font-weight:     700;
    font-size:       14px;
}

.user-name {
    font-size:   14px;
    font-weight: 600;
    color:       var(--c-text);
    max-width:   140px;
    overflow:    hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Burger mobile */
.burger {
    display:    none;
    flex-direction: column;
    gap:        5px;
    background: none;
    border:     none;
    cursor:     pointer;
    padding:    4px;
    margin-left: auto;
}
.burger span {
    display:       block;
    width:         22px;
    height:        2px;
    background:    var(--c-text);
    border-radius: 2px;
    transition:    var(--transition);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background:    var(--c-surface);
    border-top:    1px solid var(--c-border);
    padding:       48px 20px 0;
    margin-top:    auto;
}

.footer-inner {
    max-width:  1200px;
    margin:     0 auto;
    display:    grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap:        32px;
    padding-bottom: 32px;
}

.footer-logo {
    font-size:   22px;
    font-weight: 800;
    color:       #fff;
    margin-bottom: 10px;
}
.footer-logo span { color: var(--c-red-dk); }

.footer-heading {
    font-size:     13px;
    font-weight:   700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color:         var(--c-muted);
    margin-bottom: 12px;
}

.footer-links li { margin-bottom: 8px; }
.footer-links a  { color: var(--c-muted); font-size: 14px; }
.footer-links a:hover { color: var(--c-text); }

.footer-desc {
    color:     var(--c-muted);
    font-size: 13px;
    line-height: 1.6;
}

.footer-bottom {
    border-top:  1px solid var(--c-border);
    padding:     16px 0;
    display:     flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap:   wrap;
    gap:         8px;
    font-size:   13px;
    color:       var(--c-muted);
    max-width:   1200px;
    margin:      0 auto;
}

.footer-badge {
    background:    var(--c-surface2);
    padding:       4px 10px;
    border-radius: 999px;
    font-size:     12px;
}

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
    display:       inline-flex;
    align-items:   center;
    gap:           8px;
    padding:       9px 18px;
    border-radius: 999px;
    border:        none;
    cursor:        pointer;
    font-size:     14px;
    font-weight:   700;
    transition:    transform var(--transition), box-shadow var(--transition),
                   background var(--transition), opacity var(--transition);
    white-space:   nowrap;
    text-decoration: none;
}
.btn:hover { transform: translateY(-1px); opacity: .95; }
.btn:active { transform: translateY(0); }

.btn-primary {
    background:  var(--c-primary);
    color:       #000;
    box-shadow:  0 8px 20px rgba(56,189,248,.3);
}
.btn-primary:hover { box-shadow: 0 12px 28px rgba(56,189,248,.45); }

.btn-green {
    background: var(--c-green);
    color:      #022c22;
    box-shadow: 0 8px 20px rgba(34,197,94,.3);
}

.btn-red {
    background: var(--c-red-dk);
    color:      #fff;
    box-shadow: 0 8px 20px rgba(198,40,40,.3);
}

.btn-discord {
    background: linear-gradient(135deg, var(--c-discord), var(--c-discord-dk));
    color:      #fff;
    box-shadow: 0 8px 20px rgba(88,101,242,.35);
}
.btn-discord:hover { box-shadow: 0 12px 30px rgba(88,101,242,.5); }

.btn-logout {
    background:    var(--c-surface2);
    color:         var(--c-muted);
    border:        1px solid var(--c-border);
    padding:       6px 14px;
    border-radius: 999px;
    font-size:     13px;
    font-weight:   600;
}
.btn-logout:hover { color: var(--c-text); }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

/* ============================================================
   FORMULAIRES
   ============================================================ */
.form-card {
    max-width:     540px;
    margin:        40px auto;
    padding:       32px;
    background:    var(--c-surface);
    border:        1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow:    var(--shadow-lg);
}

.form-title {
    font-size:     22px;
    font-weight:   800;
    margin-bottom: 6px;
}

.form-subtitle {
    color:         var(--c-muted);
    font-size:     14px;
    margin-bottom: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group--full { grid-column: 1 / -1; }

.form-group label {
    font-size:   13px;
    font-weight: 600;
    color:       var(--c-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    background:    var(--c-bg);
    border:        1px solid var(--c-border);
    border-radius: var(--radius-sm);
    color:         var(--c-text);
    padding:       9px 12px;
    font-size:     14px;
    transition:    border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline:      none;
    border-color: var(--c-primary);
    box-shadow:   0 0 0 3px rgba(56,189,248,.15);
}

.required { color: var(--c-red); }

/* ============================================================
   ALERTES
   ============================================================ */
.alert {
    padding:       12px 16px;
    border-radius: var(--radius);
    font-size:     14px;
    margin-bottom: 20px;
}
.alert ul { padding-left: 16px; list-style: disc; }
.alert ul li { margin-bottom: 4px; }

.alert-error {
    background: rgba(239,68,68,.1);
    border:     1px solid rgba(239,68,68,.3);
    color:      #fca5a5;
}

.alert-success {
    background: rgba(34,197,94,.1);
    border:     1px solid rgba(34,197,94,.3);
    color:      #86efac;
}

/* ============================================================
   PAGE CENTRÉE
   ============================================================ */
.page-centered {
    display:         flex;
    justify-content: center;
    align-items:     flex-start;
    padding:         40px 20px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    padding:   100px 20px;
    text-align: center;
}

.hero-inner { max-width: 680px; margin: 0 auto; }

.hero-badge {
    display:       inline-block;
    background:    var(--c-surface2);
    border:        1px solid var(--c-border);
    padding:       6px 14px;
    border-radius: 999px;
    font-size:     13px;
    color:         var(--c-muted);
    margin-bottom: 24px;
}

.hero-title {
    font-size:     48px;
    font-weight:   800;
    line-height:   1.1;
    margin-bottom: 16px;
}
.hero-title span { color: var(--c-red-dk); }

.hero-subtitle {
    color:         var(--c-muted);
    font-size:     17px;
    margin-bottom: 32px;
    line-height:   1.7;
}

.hero-actions {
    display:         flex;
    justify-content: center;
    gap:             12px;
    flex-wrap:       wrap;
}

.hero-note {
    margin-top: 16px;
    font-size:  13px;
    color:      var(--c-muted);
    line-height: 1.6;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services { padding: 60px 20px; }

.section-title {
    text-align:    center;
    font-size:     28px;
    font-weight:   800;
    margin-bottom: 36px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.service-card {
    background:    var(--c-surface);
    border:        1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding:       28px 24px;
    text-align:    center;
    transition:    border-color var(--transition), transform var(--transition);
}
.service-card:hover {
    border-color: var(--c-primary);
    transform:    translateY(-2px);
}

.service-icon { font-size: 36px; margin-bottom: 12px; }
.service-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.service-card p  { color: var(--c-muted); font-size: 14px; }

/* ============================================================
   POPUP FICTIF
   ============================================================ */
.popup-overlay {
    display:         none;
    position:        fixed;
    inset:           0;
    background:      rgba(0,0,0,.7);
    backdrop-filter: blur(4px);
    align-items:     center;
    justify-content: center;
    z-index:         9999;
    padding:         20px;
}

.popup-box {
    background:    var(--c-surface);
    border:        1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding:       28px;
    max-width:     520px;
    width:         100%;
    box-shadow:    var(--shadow-lg);
    position:      relative;
    animation:     popupIn .25s ease;
}

@keyframes popupIn {
    from { opacity: 0; transform: translateY(-12px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)     scale(1);   }
}

.popup-close {
    position:   absolute;
    top:        12px;
    right:      14px;
    background: none;
    border:     none;
    color:      var(--c-muted);
    font-size:  22px;
    cursor:     pointer;
    line-height: 1;
}
.popup-close:hover { color: var(--c-text); }

.popup-header {
    display:       flex;
    align-items:   center;
    gap:           14px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--c-border);
}

.popup-logo {
    width:         48px;
    height:        48px;
    border-radius: 50%;
    background:    var(--c-surface2);
    display:       flex;
    align-items:   center;
    justify-content: center;
    font-weight:   800;
    font-size:     16px;
    flex-shrink:   0;
}

.popup-header h2 { font-size: 18px; margin-bottom: 2px; }
.popup-header small { color: var(--c-muted); font-size: 12px; }

.popup-alert {
    background:    rgba(56,189,248,.08);
    border-left:   4px solid var(--c-primary);
    border-radius: var(--radius-sm);
    padding:       10px 14px;
    font-size:     13px;
    color:         var(--c-primary);
    margin-bottom: 16px;
}

.popup-box p {
    font-size:     14px;
    color:         var(--c-muted);
    margin-bottom: 10px;
    line-height:   1.6;
}

.popup-footer {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    margin-top:      20px;
    padding-top:     14px;
    border-top:      1px solid var(--c-border);
}

.badge-rp {
    background:    var(--c-surface2);
    color:         var(--c-yellow);
    border:        1px solid rgba(251,191,36,.3);
    padding:       4px 10px;
    border-radius: 999px;
    font-size:     12px;
    font-weight:   700;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .hero-title { font-size: 32px; }

    .header-nav {
        display:    none;
        position:   absolute;
        top:        var(--header-h);
        left:       0;
        right:      0;
        background: var(--c-surface);
        border-bottom: 1px solid var(--c-border);
        padding:    16px 20px;
        z-index:    99;
    }
    .header-nav.nav-open { display: block; }

    .nav-list { flex-direction: column; align-items: flex-start; gap: 4px; }
    .nav-link  { display: block; width: 100%; padding: 10px 12px; }

    .burger { display: flex; }

    .header-user .user-name { display: none; }

    .form-grid { grid-template-columns: 1fr; }

    .footer-inner { grid-template-columns: 1fr 1fr; }

    .hero { padding: 60px 20px; }
}

@media (max-width: 480px) {
    .footer-inner { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .popup-box { padding: 20px 16px; }
}