/* =================================================================
   CONTACT.CSS - VERSION SÉCURISÉE (CONSERVE VOTRE DESIGN ORIGINAL)
   ================================================================= */

*{
    padding: 0;
    margin: 0;
    font-family: 'Segoe UI';
    box-sizing: border-box;
}
li{
    list-style-type: none;
    text-decoration: none;
}

body{
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    width: 100%;
    overflow-x: hidden;
}

/* Menu de navigation */
nav{
    background-color: #01257D;
    display: flex;
    height: 90px;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    font-size: calc(0.7rem + 1.2vw);
}
h3{
    color: white;
}
.lg{
    text-decoration: none;
    color: white;
    transition: all .3s;
}
.lg:hover{
    color:#003;
}

/* Fin Menu de navigation */

.reveal{
    opacity: 0;
    transform: translateY(30px);
}

.reveal-visible{
    opacity: 1;
    transform: translateY(0);
    transition: 1s cubic-bezier(.5, 0, 0, 1);
}

/* =================================================================
   FORMULAIRE PRINCIPAL (VOTRE DESIGN CONSERVÉ)
   ================================================================= */

#formCon{
    display: flex;
    flex-direction: column;
    width: 65%;
    position: relative;
    left: 50px;
    top: 30px;
    row-gap: 6px;
    transition: all .3s;
}

.formbas{
    top: 60px;
}
.formhaut{
    top: 0px;
}

#formCon input{
    height: 40px;
    font-size: calc(0.7rem + .8vw);
    background-color: rgba(0, 0, 0, 0.722);
    color: white;
    border: none;
    border-radius: 5px;
    /* Ajouts pour la sécurité */
    transition: border 0.2s ease, box-shadow 0.2s ease;
    padding: 0 12px;
}

#formCon label{
    font-size: calc(0.7rem + .8vw);
    color: rgba(255, 255, 255, 0.856);
}

#formCon textarea{
    font-size: calc(0.7rem + .8vw);
    background-color: rgba(0, 0, 0, 0.722);
    color: white;
    border: none;
    border-radius: 5px;
    height: 175px;
    /* Ajouts pour la sécurité */
    transition: border 0.2s ease, box-shadow 0.2s ease;
    padding: 12px;
    resize: vertical;
}

#formCon input[type='submit']{
    width: 40%;
    background-color:#01257D;
    color:#00FFFF;
    transition: all .3s;
    font-weight: bold;
    cursor: pointer;
}

#formCon input[type='submit']:hover{
    transform: scale(.97);
    background-color: #01247dd8;
    cursor: pointer;
}

/* États de soumission pour la sécurité */
#formCon input[type='submit']:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#formCon.loading {
    pointer-events: none;
    opacity: 0.8;
}

/* =================================================================
   NOTIFICATIONS (VOTRE STYLE CONSERVÉ + AMÉLIORATIONS SÉCURITÉ)
   ================================================================= */

.notif{
    position: relative;
    left: 30%;
    top: 500px;
    padding: 10px;
    font-weight: bold;
    font-size: calc(0.5rem + .9vw);
    border-radius: 5px;
    background-color: white;
    text-align: center;
    width: 300px;
    opacity: 0;
    transition: all 0.8s;
    color: white;
    /* Amélioration pour la lisibilité */
    z-index: 9999;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.notif.validate{
    background-color: rgb(24, 190, 24);
    opacity: 1;
    top: 20px;
}

.notif.error{
    background-color: red;
    opacity: 1;
    top: 20px;
}

/* Nouvelle notification de chargement (respecte votre style) */
.notif.loading{
    background-color: #01257D;
    color: #00FFFF;
    opacity: 1;
    top: 20px;
}

/* =================================================================
   VALIDATIONS EN TEMPS RÉEL (AJOUTS SÉCURITÉ)
   ================================================================= */

/* Validation des champs - subtile pour ne pas casser votre design */
#formCon input.field-valid,
#formCon textarea.field-valid {
    border: 2px solid rgba(24, 190, 24, 0.5);
}

#formCon input.field-invalid,
#formCon textarea.field-invalid {
    border: 2px solid rgba(255, 0, 0, 0.5);
}

#formCon input.field-warning,
#formCon textarea.field-warning {
    border: 2px solid rgba(255, 152, 0, 0.5);
}

/* Focus amélioré pour l'accessibilité */
#formCon input:focus,
#formCon textarea:focus {
    outline: none;
    border: 2px solid #00FFFF;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

/* =================================================================
   COMPTEUR DE CARACTÈRES (STYLE HARMONISÉ)
   ================================================================= */

.char-counter {
    font-size: calc(0.5rem + 0.3vw);
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
    margin-top: 2px;
    font-family: 'Segoe UI', monospace;
    transition: color 0.2s ease;
}

.char-counter.warning {
    color: #ffaa00;
}

.char-counter.error {
    color: #ff4444;
}

.char-counter.success {
    color: #00FFFF;
}

/* =================================================================
   TEXTES D'AIDE (STYLE HARMONISÉ)
   ================================================================= */

small {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: calc(0.5rem + 0.2vw);
    margin-top: 2px;
    margin-bottom: 10px;
}

/* Champs obligatoires */
label span {
    color: #00FFFF;
    font-weight: bold;
    margin-left: 2px;
}

/* =================================================================
   INDICATEUR DE SÉCURITÉ (DISCRET)
   ================================================================= */

.security-info {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    background: rgba(1, 37, 125, 0.8);
    border-radius: 5px;
    font-size: calc(0.5rem + 0.3vw);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

/* =================================================================
   MESSAGES D'ERREUR INLINE (STYLE HARMONISÉ)
   ================================================================= */

.field-error {
    color: #ff6666;
    font-size: calc(0.5rem + 0.2vw);
    margin-top: 3px;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.field-error.show {
    display: block;
    opacity: 1;
}

.field-success {
    color: #00FFFF;
    font-size: calc(0.5rem + 0.2vw);
    margin-top: 3px;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.field-success.show {
    display: block;
    opacity: 1;
}

.field-success::before {
    content: '✓ ';
    font-weight: bold;
}

/* =================================================================
   ANIMATION DE CHARGEMENT POUR BOUTON
   ================================================================= */

.button-loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #00FFFF;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animation shake pour erreurs (respecte votre style) */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.shake {
    animation: shake 0.3s ease-in-out;
}

/* =================================================================
   RESPONSIVE DESIGN (VOTRE CODE ORIGINAL CONSERVÉ + AMÉLIORATIONS)
   ================================================================= */

@media (max-width:950px){
    footer{
        flex-direction: column;
        row-gap: 10px;
        height: 180px;
    }
    footer a img{
        height: 30px;
    }  
    footer div {
        padding: 10px;
    }
    #formes-items{
        width: 260px;
        height: 260px;
    }
}

@media (max-width:800px){
    #icons{
        display: block;
    }
    #icons::before{
         content: " \2630";  
    }
    .active #icons::before{
        content: "\2715";
    }
    nav ul{
        position: absolute;
        left: -100%;
        flex-direction: column;
        top: 8%;
        background-color:#01257D;
        width: 100%;
        height: 280px;
        text-align: center;
        justify-content: center;
        row-gap: 10px;
        transition: .8s;
        text-transform: uppercase;
        padding-bottom: 20px;
        padding-bottom: 20px;
        padding-top: 20px;
        z-index: 2;
    }
    nav li{
        padding: 10px 0;
    }
    nav .anav{
        font-size: calc(.8rem + 1.2vw);
    }
    nav.active ul{
        left: 0;
    }
}

@media (max-width: 600px){
    .notif{
        left: 20%;
        width: 280px;
    }
    
    #formCon {
        width: 80%;
        left: 30px;
        top: 30px;
    }
    #formCon input{
        height: 35px;
        border-radius: 5px;
    }
    
    /* Ajustements pour les fonctionnalités de sécurité */
    .security-info {
        padding: 8px;
        font-size: calc(0.4rem + 0.3vw);
    }
}

@media (max-width: 480px){
    .notif{
        left: 15%;
        top: 200px;
        width: 250px;
    }
    
    #formCon input[type='submit'] {
        width: 60%;
    }
}

@media (max-width: 350px){
    .notif{
        left: 10%;
        width: 220px;
    }
    
    #formCon input[type='submit'] {
        width: 80%;
    }
}

/* =================================================================
   AMÉLIORATIONS D'ACCESSIBILITÉ (DISCRÈTES)
   ================================================================= */

/* Amélioration du contraste en mode haut contraste */
@media (prefers-contrast: high) {
    #formCon input,
    #formCon textarea {
        border: 2px solid rgba(255, 255, 255, 0.5);
    }
    
    .notif {
        border: 2px solid white;
    }
}

/* Réduction de mouvement si demandée */
@media (prefers-reduced-motion: reduce) {
    .notif,
    #formCon input,
    #formCon textarea,
    #formCon input[type='submit'] {
        transition: none;
        animation: none;
    }
    
    .shake {
        animation: none;
        border: 2px solid #ff4444;
    }
}

/* =================================================================
   PLACEHOLDER CUSTOM (HARMONISÉ AVEC VOTRE THÈME)
   ================================================================= */

#formCon input::placeholder,
#formCon textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

#formCon input::-webkit-input-placeholder,
#formCon textarea::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#formCon input::-moz-placeholder,
#formCon textarea::-moz-placeholder {
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}