/* Styles pour les formulaires */
.form-section {
    padding: 40px 0 60px;
    background: #f5f5f5;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.ad-form {
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.form-section-title {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.form-section-title h2 {
    color: #00587C;
    font-size: 24px;
    margin: 0;
}

.form-section-title i {
    margin-right: 10px;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group .required {
    color: #00587C;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #009FDA;
    box-shadow: 0 0 0 3px rgba(0, 159, 218, 0.1);
}

.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23333' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
    appearance: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* File Input */
.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.file-label:hover {
    background: #e9ecef;
    border-color: #009FDA;
}

.file-label i {
    font-size: 24px;
    color: #00587C;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.form-actions .btn {
    padding: 12px 30px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Alerts */
.alert {
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.alert h4 {
    margin: 0 0 10px 0;
}

.alert ul {
    margin: 0;
    padding-left: 25px;
}

.alert-danger {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.alert-success {
    background: #efe;
    border: 1px solid #cfc;
    color: #363;
}

/* Form Info Box */
.form-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 30px;
    border-left: 4px solid #00587C;
}

.form-info h3 {
    color: #00587C;
    margin-bottom: 15px;
}

.form-info ul {
    list-style: none;
    padding: 0;
}

.form-info li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.form-info li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #7AC142;
    font-weight: bold;
}

/* Prévisualisation des images */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.preview-item {
    position: relative;
    width: 140px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 5px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.preview-item:hover {
    border-color: #009FDA;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

.preview-item:hover .preview-actions {
    opacity: 1;
}

.preview-actions button {
    background: rgba(255,255,255,0.9);
    border: 1px solid #ddd;
    border-radius: 3px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.preview-actions button:hover:not([disabled]) {
    background: #fff;
    border-color: #009FDA;
    color: #009FDA;
}

.preview-actions button[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.preview-actions button i {
    font-size: 10px;
}

.btn-remove {
    background: rgba(0, 88, 124, 0.9) !important;
    color: white;
    border-color: #00587C !important;
}

.btn-remove:hover {
    background: #00587C !important;
}

.preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 5px;
    display: block;
}

.preview-name {
    display: block;
    font-size: 11px;
    color: #666;
    text-align: center;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 5px;
}

.preview-order {
    display: block;
    font-size: 10px;
    color: #009FDA;
    text-align: center;
    font-weight: 600;
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .form-container {
        padding: 0 15px;
    }
    
    .ad-form {
        padding: 25px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}