/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* En-tête */
.form-header {
    background: linear-gradient(135deg, #e63946 0%, #f77f00 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
}

.admin-link {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.admin-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.logo-placeholder {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-info h1 {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 600;
}

.header-info p {
    font-size: 14px;
    margin: 5px 0;
    opacity: 0.95;
}

.header-info a {
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    transition: border-color 0.3s;
}

.header-info a:hover {
    border-bottom-color: white;
}

/* Titre du formulaire */
.form-title {
    background: #2d3748;
    color: white;
    padding: 20px 30px;
    text-align: center;
}

.form-title h2 {
    font-size: 28px;
    font-weight: 600;
}

/* Formulaire */
form {
    padding: 40px 30px;
}

/* Sections */
.form-section {
    margin-bottom: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e63946;
}

.form-section h3 {
    color: #e63946;
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 600;
}

.section-subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    font-style: italic;
}

/* Groupes de formulaires */
.form-group {
    margin-bottom: 20px;
}

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

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

.required {
    color: #e63946;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="date"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

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

/* Upload de fichiers */
.file-upload-section {
    margin-top: 20px;
}

.file-group {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s;
}

.file-group:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.file-group label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
}

.checkbox-piece {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.file-group input[type="file"] {
    display: block;
    width: 100%;
    padding: 10px;
    border: 2px dashed #cbd5e0;
    border-radius: 6px;
    background: #f7fafc;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.file-group input[type="file"]:hover {
    border-color: #e63946;
    background: #fff5f5;
}

.help-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #718096;
    font-style: italic;
}

.info-text {
    color: #4a5568;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Signature */
.signature-info {
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 2px solid #e2e8f0;
}

/* Boutons */
.form-actions {
    margin-top: 40px;
    text-align: center;
}

.btn-submit {
    background: linear-gradient(135deg, #e63946 0%, #f77f00 100%);
    color: white;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Footer */
.form-footer {
    background: #2d3748;
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 14px;
}

/* Messages de validation */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: #fc8181;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: #68d391;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 0;
    }

    form {
        padding: 20px 15px;
    }

    .form-section {
        padding: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .header-info h1 {
        font-size: 18px;
    }

    .form-title h2 {
        font-size: 22px;
    }

    .logo-section {
        flex-direction: column;
    }
}

/* Animation de chargement */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    animation: fadeIn 0.5s ease-out;
}

/* Style pour les checkboxes */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #e63946;
}

