/* CSS pour les formulaires du Programme Jeune & Entrepreneur
   Styles cohérents avec le design moderne du site
   Auteur: Sconnect Plus
   Date: Août 2025
*/

/* Variables */
:root {
    --primary-color: #00AAE4;
    --primary-dark: #0088b3;
    --primary-light: #66c7ee;
    --secondary-color: #FF6B35;
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e9ecef;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* Container principal */
.form-page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero section */
.form-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 60px 30px;
    border-radius: var(--radius-md);
    margin: 30px auto;
    text-align: center;
    box-shadow: var(--shadow-md);
    max-width: 800px;
    width: 100%;
}

.form-hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.form-hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Container du formulaire */
.form-container {
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 40px;
    margin: 0 auto 50px;
    max-width: 800px;
    width: 100%;
}

.form-intro {
    text-align: center;
    margin-bottom: 40px;
}

.form-intro h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.form-intro p {
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Sections du formulaire */
.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    max-width: 100%;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
    display: inline-block;
}

.form-section h3 i {
    margin-right: 8px;
}

/* Groupes de champs */
.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Labels */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Champs de formulaire */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--text-color);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 170, 228, 0.2);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
    padding-right: 40px;
}

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

/* Upload de fichiers */
.form-group input[type="file"] {
    padding: 10px 0;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
}

.checkbox-group label a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.checkbox-group label a:hover {
    text-decoration: underline;
}

/* Boutons d'action */
.form-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.submit-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.submit-button:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.cancel-button {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 14px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.cancel-button:hover {
    background: var(--bg-light);
    border-color: var(--text-light);
}

/* Validation et erreurs */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 5px;
}

.form-group.success input,
.form-group.success select,
.form-group.success textarea {
    border-color: #28a745;
}

/* Responsive design */
@media (max-width: 768px) {
    .form-container {
        padding: 30px 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-hero-content h1 {
        font-size: 2rem;
    }
    
    .form-hero-content p {
        font-size: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .submit-button, .cancel-button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 20px 15px;
    }
    
    .form-hero {
        padding: 40px 20px;
        margin: 20px 0;
    }
    
    .form-hero-content h1 {
        font-size: 1.8rem;
    }
    
    .form-section h3 {
        font-size: 1.2rem;
    }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* Focus states pour accessibilité */
.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible,
.submit-button:focus-visible,
.cancel-button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.flash-notification {
    position: fixed;
    top: 90px;
    right: 10px !important;
    left: 10px !important;
    /* transform: translateX(-50%); */
    z-index: 1000;
    /* min-width: 300px; */
    max-width: 600px;
    padding: 15px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.5s ease forwards;
}

.flash-notification.success {
    background-color: #d4edda;
    border-left: 5px solid #28a745;
    color: #155724;
}

.flash-notification.error {
    background-color: #f8d7da;
    border-left: 5px solid #dc3545;
    color: #721c24;
}

.flash-notification.info {
    background-color: #d1ecf1;
    border-left: 5px solid #17a2b8;
    color: #0c5460;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-content i {
    font-size: 1.5rem;
}

.notification-content p {
    margin: 0;
    font-weight: 500;
}

.close-notification {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.close-notification:hover {
    opacity: 1;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -20px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.fade-out {
    animation: fadeOut 0.3s ease forwards;
}
