﻿/* ========================================================================= */
/*  PALETTE & BASE                                                           */
/* ========================================================================= */
:root {
    --accent-color: #FF8A33;
    --accent-gradient-start: #FF8A33;
    --accent-gradient-end: #ff9c4d;
    --card-bg-dark: #1e1e1e;
}

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;
        left: 0;
        width: 100%;
        height: 30px;
        background: url("/images/claw-effect.svg") no-repeat center/cover;
        opacity: .55;
        z-index: 1;
    }

.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;
        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;
    padding: 0; /* annule tout padding global */
}

    .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);
    }

    /* ========================================================================= */
    /*  Corps de carte : padding interne uniforme                                */
    /* ========================================================================= */
    .card .card-body {
        padding: 1rem; /* 16 px comme avant, colle le texte à la case */
    }

/* ------------------------------------------------------------------ */
/*  DARK-MODE (via body.dark-mode)                                     */
/* ------------------------------------------------------------------ */
body.dark-mode {
    background: #121212;
    color: #e6e6e6;
}

    body.dark-mode h1, body.dark-mode h2 {
        color: #fff;
    }

    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;
        }

    body.dark-mode #themeToggle {
        border-color: rgba(255,255,255,.6);
        background: rgba(255,255,255,.08);
    }

        body.dark-mode #themeToggle i {
            color: #fff;
        }

.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;
}

/* ------------------------------------------------------------------ */
/*  GRID, boutons, etc.                                               */
/* ------------------------------------------------------------------ */
.pulse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-auto-flow: row dense;
    gap: 1rem;
}

.btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
}
.card-price {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 160px;
    padding: 0.8rem;
}

.card-price h2 {
    margin: 0;
}

.card-price .change {
    font-size: .9rem;
}


.card-fng {
    border: none;
    overflow: hidden;
}

.card-fng img {
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
    border-radius:inherit;
    border:0;
}

.dark-mode .card-fng {
    background: var(--card-bg-dark);
}

.dark-mode .card-fng img {
    filter: hue-rotate(180deg) saturate(120%);
}


/* Pulse v1 additions */
.card-book {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    padding: .8rem;
}
.toast-success {
    background-color: #198754 !important;
    color: #fff !important;
}
.toast-danger {
    background-color: #dc3545 !important;
    color: #fff !important;
}
