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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

/* ================================
   PALETTE PAR DÉFAUT (DARK MODE)
   ================================ */
:root {
    --bg: #0f172a;
    --bg-card: #1e293b;
    --text: #e5e7eb;
    --text-light: #cbd5e1;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-soft: #7dd3fc;
    --shadow: rgba(56, 189, 248, 0.25);
}

/* ================================
   MODE CLAIR AUTOMATIQUE
   ================================ */
@media (prefers-color-scheme: light) {
    :root {
        --bg: #f5f7fb;
        --bg-card: #ffffff;
        --text: #1f2937;
        --text-light: #374151;
        --text-muted: #6b7280;
        --accent: #2563eb;
        --accent-soft: #3b82f6;
        --shadow: rgba(37, 99, 235, 0.25);
    }
}

/* ================================
   MODE FORCÉ (via JS)
   ================================ */
:root[data-theme="light"] {
    --bg: #f5f7fb;
    --bg-card: #ffffff;
    --text: #1f2937;
    --text-light: #374151;
    --text-muted: #6b7280;
    --accent: #2563eb;
    --accent-soft: #3b82f6;
    --shadow: rgba(37, 99, 235, 0.25);
}

:root[data-theme="dark"] {
    --bg: #0f172a;
    --bg-card: #1e293b;
    --text: #e5e7eb;
    --text-light: #cbd5e1;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-soft: #7dd3fc;
    --shadow: rgba(56, 189, 248, 0.25);
}

/* ================================
   BODY + ANIMATION D’ENTRÉE
   ================================ */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    padding: 2rem 1rem;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;

    animation: fadeSlideIn 1s ease-out;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(25px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ================================
   CENTRAGE DES SECTIONS
   ================================ */
main {
    max-width: 900px;
    margin: 0 auto;
}

/* ================================
   BOUTON LIGHT/DARK
   ================================ */
#theme-toggle {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    margin-top: 1rem;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
}

#theme-toggle:hover {
    background: var(--accent-soft);
    transform: scale(1.05);
}

/* ================================
   HEADER
   ================================ */
header {
    margin-bottom: 2rem;
    animation: headerPop 0.9s ease-out;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;

}

.logo {
    height: 48px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

@keyframes headerPop {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    animation: pulseTitle 2.5s ease-in-out infinite;
}

@keyframes pulseTitle {
    0%, 100% { text-shadow: 0 0 0px var(--accent); }
    50%      { text-shadow: 0 0 12px var(--accent); }
}

header p {
    color: var(--text-muted);
}

/* ================================
   BOUTON ACCUEIL DANS LE HEADER
   ================================ */

.header-buttons {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.home-btn {
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.home-btn:hover {
    background: var(--accent);
    color: #fff;
}

.home-btn::after {
    bottom: -8px; /* par exemple */
    height: 2px; /* plus épais */
    transition: width 0.12s cubic-bezier(0.4, 0, 0.2, 1);

}


/* ================================
   NAVBAR
   ================================ */
.navbar {
    margin-top: 25px;
}



/* ================================
   SECTIONS (cartes)
   ================================ */
section {
    background: var(--bg-card);
    border-radius: 0.75rem;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.2);

    opacity: 0;
    transform: translateY(20px) scale(0.98);
    animation: cardRise 0.7s ease-out forwards;
    transition: background 0.4s ease, color 0.4s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

section:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 15px 35px var(--shadow);
}

@keyframes cardRise {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ================================
   LISTES & LIENS
   ================================ */
ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    list-style-type: none;
    padding-left: 1.25rem;
    position: relative;
    color: var(--text-light);
}

ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
}

a {
    color: var(--accent);
    text-decoration: none;
    position: relative;
}

a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 1px;
    background: var(--accent);
    transition: width 0.15s ease;
}

a:hover::after {
    width: 100%;
}

/* ================================
   FOOTER
   ================================ */
footer {
    text-align: center;
    color: var(--text-muted);
    margin-top: 2rem;
}


/* ================================
   LOGO HEADER
   ================================ */

.logo {
    height: 100px;
    width: auto;
    margin-right: 0.8rem;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}
