/**
 * CSS pour l'interface de vérification des codes promo
 */

/* Styles pour le conteneur principal */
.codes-promo-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
}

/* Styles pour le formulaire */
.codes-promo-form {
    background-color: #f5f5f5;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

.form-submit {
    margin-top: 20px;
}

/* Le bouton utilise les styles de Divi pour être cohérent avec le thème */

/* Styles pour les résultats */
.resultats-code-container {
    margin-top: 30px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.resultat-success {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.resultat-error {
    background-color: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #c62828;
    margin-top: 20px;
}

.entreprise-info {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #e8f5e9;
    border-radius: 6px;
}

.achats-liste {
    margin-top: 20px;
}

/* Styles pour le tableau des achats */
.achats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.achats-table th,
.achats-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.achats-table th {
    background-color: #f2f2f2;
    font-weight: 600;
    color: #333;
}

.achats-table tr:hover {
    background-color: #f5f5f5;
}

/* Styles responsifs */
@media screen and (max-width: 768px) {
    .codes-promo-form {
        padding: 15px;
    }
    
    .achats-table {
        display: block;
        overflow-x: auto;
    }
    
    .achats-table th,
    .achats-table td {
        padding: 8px 10px;
    }
}

/**
 * CSS pour inclure les styles des graphiques
 */

/* Styles pour les graphiques */
.statistiques-titre {
    margin-top: 40px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    color: #333;
}

.statistiques-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.graphique-container {
    width: 100%;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin-bottom: 20px;
}

.graphique-container h4 {
    text-align: center;
    margin-bottom: 15px;
    color: #444;
    font-size: 16px;
}

canvas {
    width: 100% !important;
    height: 250px !important;
}

/* Styles responsifs pour les graphiques */
@media screen and (max-width: 768px) {
    .statistiques-container {
        flex-direction: column;
    }
    
    .graphique-container {
        width: 100%;
    }
    
    canvas {
        height: 200px !important;
    }
}


/**
 * Styles pour le formulaire de connexion personnalisé
 */

/* Message de connexion requise */
.login-required-message {
    background-color: #f8f9fa;
    border-left: 4px solid #0073aa;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 4px;
}

.login-required-message h3 {
    margin-top: 0;
    color: #0073aa;
}

/* Styles pour le formulaire de connexion personnalisé */
#connexion_code_promo_form {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#connexion_code_promo_form p {
    margin-bottom: 15px;
}

#connexion_code_promo_form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

#user_login,
#user_pass {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#user_login:focus,
#user_pass:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

#connexion_code_promo_submit {
    background-color: #0073aa;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s;
    width: 100%;
}

#connexion_code_promo_submit:hover {
    background-color: #005d87;
}

/* Liens sous le formulaire */
.login-links {
    text-align: center;
    margin-top: 15px;
}

.login-links a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.3s;
}

.login-links a:hover {
    color: #005d87;
    text-decoration: underline;
}

/* Styles pour les messages d'erreur de connexion */
.login-error {
    background-color: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #c62828;
    margin-bottom: 20px;
}