﻿/* ========================================================================= */
/*  PALETTE & BASE                                                           */
/* ========================================================================= */
:root {
    --accent-color: #FF8A33;
    --accent-gradient-start: #FF8A33;
    --accent-gradient-end: #FF9C4D;
}

body {
    background: #f8f9fa;
    font-family: 'Montserrat',sans-serif;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================================================= */
/*  NAVBAR                                                                   */
/* ========================================================================= */
.navbar {
    background: linear-gradient(90deg,var(--accent-gradient-start),var(--accent-gradient-end));
    position: relative;
    z-index: 2;
    border-bottom: none;
    box-shadow: 0 2px 5px rgba(0,0,0,.2);
    overflow: hidden; /* ← masque tout dépassement de la vague */
}

    .navbar::after {
        content: "";
        position: absolute;
        bottom: -5px; /* même alignement dans les deux thèmes  */
        left: 0;
        width: 100%;
        height: 30px;
        background: url("/images/claw-effect.svg") no-repeat center/cover;
        opacity: .55; /* la même “présence visuelle” partout   */
        z-index: 1;
    }

/* ---- Branding ----------------------------------------------------------- */
.navbar-brand {
    color: #fff !important;
    font-weight: 700;
    font-size: 1.5em;
    letter-spacing: 1px;
    text-shadow: 1px 1px 4px rgba(0,0,0,.3);
}

.navbar .nav-link {
    color: #fff !important;
    font-weight: 600;
    margin-right: 15px;
}

    .navbar .nav-link:hover {
        color: #f2f2f2 !important
    }

/* ========================================================================= */
/*  BOUTON thème clair / sombre                                              */
/* ========================================================================= */
#themeToggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,.85);
    border-radius: .5rem;
    background: rgba(255,255,255,.12);
    padding: 0;
    margin-right: 10px;
    transition: background .2s,border-color .2s,filter .2s;
}

    #themeToggle i {
        font-size: 1.25rem;
        line-height: 1;
        color: #212529; /* noir par défaut (mode clair)          */
        transition: color .2s ease;
    }

    #themeToggle:hover {
        filter: brightness(1.1);
        cursor: pointer
    }

/* ========================================================================= */
/*  YouTube lien (à droite)                                                  */
/* ========================================================================= */
.nav-link.d-flex {
    color: #333 !important;
    font-weight: 600;
    text-decoration: none
}

    .nav-link.d-flex i.bi-youtube {
        font-size: 1.25rem;
        margin-right: 6px
    }

    .nav-link.d-flex:hover {
        color: #555 !important
    }

        .nav-link.d-flex:hover i.bi-youtube {
            color: #555
        }

/* ========================================================================= */
/*  CONTENEUR PRINCIPAL                                                      */
/* ========================================================================= */
.container {
    flex: 1 0 auto;
    padding: 40px 0
}

h1 {
    color: #333;
    font-weight: 700;
    margin-bottom: 30px
}

h2 {
    color: var(--accent-color);
    font-weight: 700
}

/* ========================================================================= */
/*  CARTES & effets “lift”                                                   */
/* ========================================================================= */
.article-card, .article-item {
    background: #fff;
    border-radius: .5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    transition: transform .2s,box-shadow .2s;
    position: relative;
    overflow: hidden
}

.article-card {
    border: none
}

    .article-card:hover, .article-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 16px rgba(0,0,0,.1);
    }

.article-item {
    padding: 20px;
    margin-bottom: 20px
}

    .article-item h2 {
        margin-bottom: 10px
    }

    .article-item p {
        margin-bottom: 10px;
        font-size: .95em
    }

/* ========================================================================= */
/*  COLLAPSE “lire / réduire”                                                */
/* ========================================================================= */
.article-body.collapse {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height .4s,opacity .4s
}

    .article-body.collapse.show {
        max-height: 2000px;
        opacity: 1
    }

/* ========================================================================= */
/*  HOME : flèche + lien Lire la suite                                       */
/* ========================================================================= */
.home-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.25rem;
    height: 2.25rem;
    border: 2px solid #888;
    border-radius: 50%;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s,background-color .2s;
    cursor: pointer
}

    .home-toggle i {
        font-size: 1.2rem;
        color: #555;
        transition: transform .3s
    }

    .home-toggle[aria-expanded=true] {
        border-color: #555;
        background: #f0f0f0
    }

        .home-toggle[aria-expanded=true] i {
            transform: rotate(180deg)
        }

.home-read {
    position: absolute;
    bottom: .75rem;
    left: 1rem;
    font-size: .9rem;
    color: var(--accent-color);
    text-decoration: none;
    line-height: 1
}

    .home-read:hover {
        text-decoration: underline
    }

    .home-read.collapsed::after {
        content: "Lire la suite"
    }

    .home-read:not(.collapsed)::after {
        content: "Réduire"
    }

/* ========================================================================= */
/*  LIEN “Tous les articles →”                                               */
/* ========================================================================= */
.home-all-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500
}

    .home-all-link:hover {
        text-decoration: underline
    }

/* ========================================================================= */
/*  FINITIONS CARTES                                                         */
/* ========================================================================= */
.card, .article-card {
    border-radius: .75rem;
    transition: transform .1s,box-shadow .1s
}

    .card:hover, .article-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0,0,0,.08)
    }

/* ------------------------------------------------------------------ */
/*  DARK-MODE (via body.dark-mode)                                     */
/* ------------------------------------------------------------------ */
body.dark-mode {
    background: #121212;
    color: #e6e6e6
}

    body.dark-mode h1, body.dark-mode h2 {
        color: #e6e6e6
    }

    body.dark-mode .card,
    body.dark-mode .article-card {
        background: #1e1e1e;
        color: #e6e6e6
    }

    body.dark-mode .navbar,
    body.dark-mode .footer {
        background: #1e1e1e !important
    }

    body.dark-mode .navbar-brand,
    body.dark-mode .nav-link {
        color: #fff !important
    }

    body.dark-mode a,
    body.dark-mode .home-all-link {
        color: #4dabff
    }

        body.dark-mode a:hover {
            color: #8dc6ff
        }

    /* Soleil / Lune inversé */
    body.dark-mode #themeToggle {
        border-color: rgba(255,255,255,.6);
        background: rgba(255,255,255,.08)
    }

        body.dark-mode #themeToggle i {
            color: #fff
        }

/* YouTube : icône + libellé suivent le thème */
.navbar .bi-youtube {
    transition: color .2s
}

body:not(.dark-mode) .navbar .bi-youtube,
body:not(.dark-mode) .navbar .yt-label {
    color: #111
}

body.dark-mode .navbar .bi-youtube,
body.dark-mode .navbar .yt-label {
    color: #fff
}

/* ------------------------------------------------------------------ */
/*  FOOTER                                                            */
/* ------------------------------------------------------------------ */
.footer {
    background: #1b1b1b;
    border-top: 1px solid #2a2a2a;
    border-radius: 0 0 .75rem .75rem;
    box-shadow: 0 -2px 6px rgba(0,0,0,.25) inset;
    padding: 2.5rem 0 2rem;
    transition: background .3s ease;
}

body:not(.dark-mode) .footer {
    background: #f8f9fa;
    border-top: 1px solid #e7e7e7;
    box-shadow: none
}
