/* ====================================
   CSS MODERNE pour contact.php
   Compatible avec le style de la page d'accueil
   ==================================== */

/* 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);
    --contact-bg: #b8d2e9;
    --register-bg: #cdffcc;
}

/* 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;
    height: auto;
    min-height: 100px;
}

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

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 */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0.5rem 1rem 2rem 1rem; /* Encore moins d'espace */
}

section {
    max-width: 1000px;
    width: 100%;
    padding: 2rem;
}

/* Container pour les formulaires */
div#bloc {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Modernisation des boîtes de formulaire */
div#boite {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius);
    padding: 1.8rem 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeInUp 0.8s ease-out both;
    width: 100%;
    max-width: 380px;
    min-height: auto;
    height: auto;
    float: none;
    margin: 1rem;
    position: relative;
    overflow: hidden;
}

/* Formulaire de contact - fond bleu foncé */
/* Formulaire de contact - fond bleu foncé */
div#boite[style*="#b8d2e9"] {
    background: rgba(45, 85, 135, 0.92);
    color: black; /* Déjà en black, mais assurez-vous */
}

/* Formulaire d'inscription - fond vert foncé */
div#boite[style*="#cdffcc"] {
    background: rgba(39, 95, 60, 0.92);
    color: black; /* Déjà en black, mais assurez-vous */
}
/* Labels en noir pour les formulaires */
div#boite[style*="#b8d2e9"] label,
div#boite[style*="#cdffcc"] label {
    color: black;
}

/* Titres des formulaires en noir aussi si nécessaire */
div#boite[style*="#b8d2e9"] p:first-of-type,
div#boite[style*="#cdffcc"] p:first-of-type {
    color: black;
    /* Gardez les autres propriétés existantes */
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}


/* Couleurs spécifiques selon le type de formulaire */
div#boite[style*="#b8d2e9"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #5dade2, #3498db);
}

div#boite[style*="#cdffcc"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #58d68d, #2ecc71);
}

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

/* Titres des formulaires */
div#boite p:first-of-type {
    color: black;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

/* Modernisation des formulaires */
form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

label {
    color: black;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    display: block;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background: rgba(255,255,255,0.15);
    color: black;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: rgba(255,255,255,0.6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    background: rgba(255,255,255,0.25);
	color: #2c3e50; /* AJOUT: Couleur foncée pour le texte au focus */
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
textarea::placeholder {
    color: rgba(255,255,255,0.7);
}

textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.4;
}

/* Modernisation des boutons */
input[type="submit"],
input[type="reset"] {
    padding: 0.7rem 1.3rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.8rem;
}

input[type="submit"] {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(61, 153, 247, 0.3);
}

input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 153, 247, 0.4);
    background: linear-gradient(135deg, #2980b9, var(--primary-color));
}

input[type="reset"] {
    background: #95a5a6;
    color: white;
    margin-right: 1rem;
}

input[type="reset"]:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

/* Container pour les boutons */
div#boite form > input[type="reset"],
div#boite form > input[type="submit"] {
    display: inline-block;
    width: 325px;
    min-width: auto;
}

/* 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);
}

/* 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);
    }
}

/* Animation d'arrivée différée pour le second formulaire */
div#boite:nth-child(2) {
    animation-delay: 0.3s;
}

/* Responsive design */
@media (max-width: 1024px) {
    div#bloc {
        flex-direction: column;
        align-items: center;
    }
    
    div#boite {
        max-width: 500px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        height: auto;
    }
    
    #example {
        width: 100% !important;
        max-width: 200px;
        margin: 0 !important;
    }
    
    section {
        padding: 1rem;
    }
    
    div#boite {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
        max-width: none;
    }
    
    input[type="reset"] {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* 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);
    }
    
    div#boite p:first-of-type {
        color: var(--text-light);
    }
    
    label {
        color: var(--text-light);
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea {
        background: rgba(44, 62, 80, 0.8);
        color: var(--text-light);
        border-color: rgba(255,255,255,0.2);
    }
/*}*/

/* Améliorations pour l'accessibilité */
input:focus,
textarea:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

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