/**
 * AN SAV - Contact Form Styles
 */

/* Layout principal - 2 colonnes */
.an-contact-page {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 20px 0;
}

/* Colonne gauche - Infos magasin */
.an-contact-info {
    flex: 0 0 300px;
    max-width: 300px;
}

.an-contact-info-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    border: 1px solid #e9ecef;
}

.an-contact-info-card h3 {
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--an-primary-color, #2fb5d2);
    font-size: 1.25rem;
    color: #212529;
}

.an-contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.an-contact-info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.an-contact-info-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    background: var(--an-primary-color, #2fb5d2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.an-contact-info-icon i {
    color: #fff;
    font-size: 16px;
}

.an-contact-info-content {
    flex: 1;
}

.an-contact-info-content strong {
    display: block;
    margin-bottom: 3px;
    color: #212529;
    font-size: 0.9rem;
}

.an-contact-info-content span,
.an-contact-info-content a {
    color: #6c757d;
    font-size: 0.9rem;
    word-break: break-word;
}

.an-contact-info-content a:hover {
    color: var(--an-primary-color, #2fb5d2);
    text-decoration: none;
}

/* Colonne droite - Formulaire */
.an-contact-form-wrapper {
    flex: 1;
    min-width: 0;
}

/* Encart Attention */
.an-attention-box {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    border: 1px solid #ffc107;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 25px;
}

.an-attention-box-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.an-attention-box-header i {
    color: #856404;
    font-size: 20px;
    margin-right: 10px;
}

.an-attention-box-header strong {
    color: #856404;
    font-size: 1.1rem;
}

.an-attention-box-content {
    color: #856404;
    line-height: 1.5;
}

.an-attention-box-content p {
    margin: 0;
}

/* Formulaire */
.an-contact-form-container {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    border: 1px solid #e9ecef;
}

.an-contact-form .form-group {
    margin-bottom: 1.5rem;
}

.an-contact-form label.required::after {
    content: " *";
    color: #dc3545;
}

.an-contact-form .form-control {
    border-radius: 4px;
    border: 1px solid #ced4da;
    padding: 10px 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.an-contact-form .form-control:focus {
    border-color: var(--an-primary-color, #2fb5d2);
    box-shadow: 0 0 0 3px rgba(47, 181, 210, 0.15);
    outline: none;
}

/* États de validation */
.an-contact-form .form-control.is-valid {
    border-color: #28a745;
}

.an-contact-form .form-control.is-invalid {
    border-color: #dc3545;
}

.an-field-error {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 5px;
    display: none;
}

.an-contact-form .form-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
}

.an-contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.an-contact-form .btn-primary {
    background-color: var(--an-primary-color, #2fb5d2);
    border-color: var(--an-primary-color, #2fb5d2);
    min-width: 150px;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.an-contact-form .btn-primary:hover {
    background-color: var(--an-primary-color-dark, #269abc);
    border-color: var(--an-primary-color-dark, #269abc);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.an-contact-form .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.an-contact-form .btn-primary i {
    vertical-align: middle;
    margin-right: 5px;
    font-size: 18px;
}

/* Spinner de chargement */
.an-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: an-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes an-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Honeypot - champ caché pour les bots */
.an-contact-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* Messages de succès et d'erreur */
.an-contact-form-container .alert {
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.an-contact-form-container .alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #28a745;
    border-left: 4px solid #28a745;
    color: #155724;
}

.an-contact-form-container .alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 1px solid #dc3545;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.an-contact-form-container .alert-danger ul {
    margin: 0;
    padding-left: 20px;
}

/* Message de confirmation après envoi */
.an-success-message {
    text-align: center;
    padding: 40px 20px;
}

.an-success-icon {
    width: 80px;
    height: 80px;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: an-scale-in 0.3s ease-out;
}

.an-success-icon i {
    color: #fff;
    font-size: 40px;
}

@keyframes an-scale-in {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.an-success-message h3 {
    color: #28a745;
    margin-bottom: 10px;
}

.an-success-message p {
    color: #6c757d;
    margin-bottom: 20px;
}

/* Zone d'upload de fichiers */
.an-file-upload-wrapper {
    position: relative;
    margin-top: 10px;
}

.an-file-input-hidden {
    position: absolute;
    left: -9999px;
    opacity: 0;
    width: 0;
    height: 0;
}

.an-file-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: 2px dashed #ced4da;
    border-radius: 4px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s;
    color: #495057;
    font-size: 0.9rem;
}

.an-file-add-btn:hover {
    border-color: var(--an-primary-color, #2fb5d2);
    background: #fff;
    color: var(--an-primary-color, #2fb5d2);
}

.an-file-add-btn i {
    font-size: 20px;
}

.an-file-list {
    margin-bottom: 5px;
}

.an-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.an-file-item-name {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    min-width: 0;
    flex: 1;
}

.an-file-item-name i {
    color: var(--an-primary-color, #2fb5d2);
    font-size: 20px;
    flex-shrink: 0;
}

.an-file-item-name span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.an-file-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: 15px;
}

.an-file-item-size {
    color: #6c757d;
    font-size: 0.8rem;
}

.an-file-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s;
}

.an-file-remove-btn:hover {
    background: #dc3545;
    color: #fff;
}

.an-file-remove-btn i {
    font-size: 16px;
}

/* Responsive */
@media (max-width: 991px) {
    .an-contact-page {
        flex-direction: column;
    }

    .an-contact-info {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .an-contact-form .col-form-label {
        text-align: left;
        padding-bottom: 0.5rem;
    }

    .an-contact-form .offset-md-3 {
        margin-left: 0;
    }

    .an-contact-form-container {
        padding: 15px;
    }

    .an-contact-info-card {
        padding: 15px;
    }
}
