* {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
}

body.loading {
    cursor: wait !important; /* ou progress, ou un curseur personnalisé */
}

/* FOOTER */
body::after {
    content: "© tendance-finance.fr – 2025";
    display: block;
    margin-top: 50px;
    text-align: center;
    font-size: 13px;
    color: #888;
}



/* ------------------------------- */
/* NAVBAR - Barre de navigation   */
/* ------------------------------- */

.navbar {
    display: flex;
    flex-direction: row;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(to right, #003063, #0452a5);
    z-index: 100;
    position: sticky;
    top: 0;
    display: flex;
}

.navbar-menu {
    /*flex: 1 1 0;*/
    padding: 0.25rem 1rem;
    color: #fff;
    font-size: 14px;
    
    display: flex;
    gap: 10px;
}

.navbar-button {
    display: flex;
    flex: 0 1 auto;
    align-items: center;  
    background-color: transparent;
    border: 1px solid transparent;
    color: #f1f1f1;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}
.navbar-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #f1f1f1;
}
.navbar-button.selected {
    background-color: #ffffff22;
    color: #ffffff;
    border: 1px solid #ffffff99;
}

.navbar-button-compte {
    display: flex;
    flex: 0 1 auto;
    align-items: center;  
    background-color: transparent;
    border: 1px solid transparent;
    color: #f1f1f1;
    /*margin: 8px 12px;*/
    border-radius: 6px;
    cursor: pointer;
}

.navbar-button-partage {
    position: relative;
    display: flex;
    flex: 0 1 auto;
    align-items: center;  
    background-color: transparent;
    border: 1px solid transparent;
    color: #f1f1f1;
    border-radius: 6px;
    cursor: pointer;
}

.connexion {
    flex: 0 1 auto;
    display: flex;
    gap: 10px;
    color: #fff;
    font-size: 14px;
    margin-right: 10px;
    align-items: center;
}

.navbar-toggle {
    display: none;
}

/* Image profil 
.connexion img {
    max-width: 28px;
    height: auto;
    border-radius: 50%;
    border: 1px solid #fff;
}*/

/* Dropdown menu (mon compte) */
.dropdown-account-menu {
    display: none;
    position: absolute;
    right: 0.5rem;
    top: 100%;
    background-color: #ffffff;
    min-width: 150px;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.2);
    border-radius: 6px;
    z-index: 999;
    overflow: hidden;
}

.dropdown-account-menu a {
    color: #003063;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-weight: 500;
}

.dropdown-account-menu a:hover {
    background-color: #f2f2f2;
}

.dropdown-account-menu hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 6px;
}
  
/* Dropdown menu (partage) */
.menu-partage-container {
    position: relative;
    display: flex;
    margin-right: auto;
}

.dropdown-partage-menu {
    --padd: 8px;
    display: none;
    position: absolute;
    left: calc(-1 * var(--padd));;
    padding: var(--padd);
    top: calc(100% + 5px);    /* sous le bouton, avec petit espace */
    background-color: #ffffff;
    border: 1px solid #018FFA;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 999;
    overflow: hidden;
}

/* État visible */
.dropdown-partage-menu.show {
    display: block;
}

/* Grille d’icônes 2x2 (ou 1x4 selon préférence) */
.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-items: center;
}

/* Icônes */
.share-icon {
    width: 28px;
    height: 28px;
    border: 1px solid #018FFA;
    display: block;
    border-radius: 6px;            /* cohérent avec ta charte */
    transition: transform 0.15s ease, filter 0.15s ease;
}

/* Effet au survol */
.share-buttons a:hover .share-icon,
.share-buttons a:focus .share-icon {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Accessibilité focus */
.share-buttons a {
    outline: none;
}
.share-buttons a:focus {
    box-shadow: 0 0 0 2px rgba(1,143,250,0.35);
    border-radius: 8px;
}

/* (tes règles existantes peuvent rester) */
.dropdown-partage-menu a {
    color: #003063;
    text-decoration: none;
    display: inline-block; /* pour entourer juste l'icône */
    padding: 0;            /* pas de padding, géré par la grille */
    font-weight: 500;
}
.dropdown-partage-menu a:hover { background: transparent; }


/* --------------------------------------- */
/* Fenêtre modale de connexion             */
/* --------------------------------------- */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background-color: #ffffff;
    color: #333;
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: #003063;
}

/* Bouton Google */
.google-login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #fff;
    color: #555;
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.google-login-button img {
    width: 22px;
    height: 22px;
}

.google-login-button:hover {
    background-color: #f8f8f8;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Séparateur */
.separator {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 1rem 0;
}

.separator span {
    background: #fff;
    padding: 0 1rem;
    color: #888;
    font-size: 0.9rem;
    position: relative;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ddd;
}

.separator::before {
    margin-right: 10px;
}
.separator::after {
    margin-left: 10px;
}

/* Form */
.modal-content form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.modal-content label {
    font-size: 0.9rem;
    text-align: left;
    color: #444;
    margin-bottom: 4px;
}

.modal-content input {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
    transition: border 0.3s ease;
}

.modal-content input:focus {
    border-color: #018FFA;
    outline: none;
}

.extra-margin {
    margin-bottom: 30px;
}

.remember-me {
    text-align: left;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 1rem;
}

.forgot-password {
    text-align: right;
}

.forgot-password a {
    font-size: 0.75rem;
    color: #007bff;
    text-decoration: none;
}

.forgot-password a:hover {
    text-decoration: underline;
}

/* Bouton submit */
.submit-button {
    padding: 12px;
    background-color: #018FFA;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: #0075d1;
}


.login-error-message {
    color: #d10000;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}




/* === MESSAGES FLASH ===*/

.flash-container {
    margin-bottom: 20px;
}

.flash-message {
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.flash-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-message.warning {
    background-color: #f8edd7;
    color: #e29135;
    border: 1px solid #f5e6c6;
}

.flash-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* === FIN DE MESSAGES FLASH ===*/




/* --- Navbar responsive mobile --- */

.navbar-toggle {
    display: none; /* visible uniquement sur mobile */
    font-size: 22px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
}

/* Cacher le menu en mobile par défaut */
@media screen and (max-width: 768px) {

    .navbar {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        position: sticky;
    }

    .navbar-toggle {
        display: block;
    }

    .navbar-menu {
        display: none;
        flex-direction: column;
        /* width: 100%; */
        background-color: #003063;
        padding: 1rem;
        margin-right: 10px;
        animation: fadeIn 0.3s ease-in-out;
    }

    .navbar-menu.show {
        display: flex;
    }


    .navbar-button {
        /*width: 100%;*/
        justify-content: flex-start;
    }

    .connexion {
        margin-left: auto;
        /* width: 100%; */
        justify-content: space-between;
        /*padding: 0.5rem 1rem;*/
    }

    .dropdown-content {
        position: static;
        width: 100%;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        margin-top: 0.5rem;
    }

    .dropdown-content a {
        padding: 10px 0;
        border-top: 1px solid #eee;
    }
}



