/* ==========================================
   GLOBAL.CSS – Styles communs à toutes les pages
   ECT Sécurité
========================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* --- Variables CSS --- */
:root {
    --gold:       #c8a951;
    --gold-dark:  #b09243;
    --bg-dark:    #0e0e0e;
    --bg-card:    #1a1a1a;
    --bg-header:  #111;
    --text-light: #f5f5f5;
    --text-muted: #aaa;
    --radius:     8px;
    --transition: 0.3s;
}

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

/* --- Base --- */
body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg-dark) url('../images/bg-pattern.jpg') repeat;
    color: var(--text-light);
    line-height: 1.6;
}

/* ==========================================
   HEADER
========================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-header);
    padding: 15px 50px;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .logo img {
    height: 60px;
}

header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

header nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

header nav a:hover {
    color: var(--gold);
}

/* Zone utilisateur dans le header */
#user-area {
    font-weight: 600;
    color: var(--text-light);
    font-size: 1rem;
}

#user-area a {
    color: var(--gold);
    text-decoration: none;
    transition: var(--transition);
}

#user-area a:hover {
    color: #fff;
}

/* Toggle thème */
.theme-toggle {
    cursor: pointer;
    font-size: 28px;
    color: #fff;
    transition: color var(--transition);
}

/* ==========================================
   FOOTER
========================================== */
footer {
    background: var(--bg-header);
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 2px solid var(--gold);
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--gold);
    text-decoration: none;
    margin: 0 8px;
    transition: color var(--transition), text-shadow var(--transition);
}

.footer-links a:hover {
    color: #fff;
    text-shadow: 0px 0px 6px var(--gold);
}

footer p {
    margin-top: 10px;
    color: #777;
    font-size: 0.85rem;
}

/* ==========================================
   BOUTON COMMUN
========================================== */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background: var(--gold);
    color: #111;
    font-weight: bold;
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn:hover {
    background: var(--gold-dark);
    transform: scale(1.05);
}

/* ==========================================
   SECTIONS COMMUNES
========================================== */
section {
    padding: 70px 50px;
    text-align: center;
}

h2 {
    color: var(--gold);
    margin-bottom: 40px;
    font-size: 2rem;
    transition: var(--transition);
}

h2:hover {
    color: #fff;
    transform: scale(1.05);
}

/* ==========================================
   MODE CLAIR
========================================== */
.light-mode {
    background: #f2f2f2 url('../images/bg-pattern-light.jpg') repeat;
    color: #222;
}

.light-mode header {
    background: #fff;
}

.light-mode header nav a {
    color: #222;
}

.light-mode header nav a:hover {
    color: var(--gold);
}

.light-mode .theme-toggle {
    color: #111;
}

.light-mode h2 {
    color: var(--gold);
}

.light-mode .btn {
    background: var(--gold);
    color: #111;
}

.light-mode .btn:hover {
    background: var(--gold-dark);
}

.light-mode footer {
    background: #f2f2f2;
    border-top: 2px solid var(--gold);
    color: #333;
}

.light-mode .footer-links a {
    color: var(--gold);
}

.light-mode .footer-links a:hover {
    color: #111;
    text-shadow: none;
}

/* ==========================================
   RESPONSIVE DE BASE
========================================== */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 10px;
        padding: 15px 20px;
    }

    header nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    section {
        padding: 50px 20px;
    }
}
