/* =========================================================
   APP.CSS - Style global OpenTrackCals 2025
   ========================================================= */

/* 🌿 Thème général */
body {
    background: linear-gradient(180deg, #DEE8FF 0%, #C7D8FF 100%);
    background-attachment: fixed;
    animation: bgFlow 20s ease-in-out infinite alternate;
    padding-bottom: 60px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    color: #212529;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: #243C92;
}

.btn, .nav-link {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
}

/* Animation douce du fond */
@keyframes bgFlow {
    0% { background-position: 0% 0%; background-size: 100% 100%; }
    50% { background-position: 100% 100%; background-size: 105% 105%; }
    100% { background-position: 0% 50%; background-size: 100% 100%; }
}

/* 🧊 Cartes et blocs */
.card {
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

/* 🪶 Boutons */
.btn {
    border-radius: 0.7rem !important;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.btn-primary {
    background: linear-gradient(90deg, #6283E8, #7BA6F2);
    border: none;
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #516AD1, #6B96E5);
    box-shadow: 0 4px 20px rgba(98, 131, 232, 0.3);
    transform: scale(1.03);
}

/* 🧮 Tableaux et alertes */
.table {
    font-size: 0.9rem;
    border-radius: 0.6rem;
    overflow: hidden;
}

.alert {
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(200, 210, 255, 0.4);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* 🧭 Navigation principale */
.navbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.navbar-nav .nav-link {
    font-size: 1rem;
    padding: 0.6rem 1rem;
    color: #3b4b8c !important;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 0.5rem;
}

/* 🔹 Nouveau style des liens actifs dans la navbar */
.navbar-nav .nav-link {
    position: relative;
    color: #3b4b8c !important;
    transition: all 0.25s ease;
}

.navbar-nav .nav-link:hover {
    color: #2f42b2 !important;
}

/* Élément actif plus raffiné */
.navbar-nav .nav-link.active {
    color: #2f42b2 !important;
    font-weight: 600;
}

.navbar-nav .nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 3px;
    left: 10%;
    width: 80%;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #5F7DEB, #7BA6F2);
    opacity: 0.9;
    transition: all 0.3s ease;
}

/* Hover avec effet souligné progressif */
.navbar-nav .nav-link:hover::after {
    content: "";
    position: absolute;
    bottom: 3px;
    left: 20%;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, #7BA6F2, #A1BCFF);
    border-radius: 3px;
    opacity: 0.5;
    transition: all 0.3s ease;
}


.navbar-brand {
    font-weight: 700;
    color: #334E9E !important;
    letter-spacing: 0.3px;
}

/* =============================================
   📱 ADAPTATION MOBILE GLOBALE
   ============================================= */
@media (max-width: 576px) {
    .card {
        border-radius: 0.75rem;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .btn {
        font-size: 0.95rem;
        padding: 0.4rem 0.75rem;
    }

    h1, h2, h3 {
        font-size: 1.25rem;
    }
}

/* =============================================
   ✨ PETITES TOUCHES VISUELLES
   ============================================= */

/* Images produits */
.product-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 0.75rem 0.75rem 0 0;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Pagination */
.pagination .page-item.active .page-link {
    background-color: #6283E8;
    border-color: #6283E8;
    box-shadow: 0 0 10px rgba(98, 131, 232, 0.3);
}

/* Focus & transitions */
a, button, input {
    transition: all 0.25s ease;
}

a:focus, button:focus, input:focus, select:focus {
    outline: 2px solid rgba(98, 131, 232, 0.3);
    outline-offset: 2px;
}

/* Animation légère pour les boutons validés */
.btn-success.added {
    background-color: #198754 !important;
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* ✅ Fin du fichier */
