/* ====================================
   CSS MODERNE pour votre site PHP existant
   ==================================== */

/* Variables CSS modernes */
:root {
    --primary-color: #3d99f7;
    --secondary-color: #fecc03;
    --text-dark: #2c3e50;
    --text-light: #ecf0f1;
    --bg-light: #f8f9fa;
    --shadow: 0 4px 20px rgba(0,0,0,0.1);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reset moderne et structure flexbox pour sticky footer */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header moderne avec glassmorphism */
header {
    background: rgba(61, 153, 247, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header img {
    transition: var(--transition);
    border-radius: 8px;
}

header img:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Modernisation du widget de stats (#example) */
#example {
    background: rgba(255,255,255,0.15) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: slideInRight 0.8s ease-out;
}

#example:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.2) !important;
}

#example ul {
    list-style: none !important;
}

#example li {
    margin: 0.3rem 0 !important;
    font-size: 0.9rem !important;
    color: white !important;
    font-weight: 500;
}

/* Section principale - prend l'espace restant */
section {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    width: 100%;
}

/* Modernisation de la boîte principale */
div#boite {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeInUp 0.8s ease-out 0.2s both;
    margin: 2rem auto;
    max-width: 600px;
}

div#boite:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

section p {
    color: var(--text-dark);
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
}

/* Modernisation des images */
section img {
    border-radius: var(--radius);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

section a img:hover {
    transform: scale(1.05) rotate(-1deg);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

/* Footer moderne sticky */
footer {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: auto;
    border-top: 3px solid var(--secondary-color);
    flex-shrink: 0;
}

footer p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

footer a:hover {
    color: white;
    text-decoration: underline;
    transform: translateY(-1px);
}

footer img {
    transition: var(--transition);
    border-radius: 4px;
}

footer img:hover {
    transform: scale(1.1);
}

/* Déconnexion modernisée */
header p#deconnexion {
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 0.8rem 1.2rem !important;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.2);
}

header p#deconnexion:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

header p#deconnexion a {
    color: white !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    #example {
        width: 100% !important;
        margin-right: 0 !important;
    }
    
    section {
        padding: 2rem 1rem;
    }
    
    div#boite {
        padding: 2rem 1rem;
        margin: 1rem;
        width: calc(100% - 2rem);
    }
}

/* Mode sombre (bonus) */
/*@media (prefers-color-scheme: dark) {*/
    :root {
        --text-dark: #ecf0f1;
        --bg-light: #2c3e50;
    }
    
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }
    
    div#boite {
        background: rgba(52, 73, 94, 0.95);
        color: var(--text-dark);
    }
    
    section p {
        color: var(--text-dark);
    }
/*}*/

/* Améliorations supplémentaires pour la performance */
img {
    max-width: 100%;
    height: auto;
}

/* Scroll-bar personnalisée (Webkit) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}





