 :root {
            --primary-color: #2c5f2d;
            --primary-dark: #1e4420;
            --primary-light: #e8f5e9;
            --accent-color: #ffc107;
            --text-color: #333333;
            --text-light: #666666;
            --bg-color: #f0f2f5;
            --card-bg: #ffffff;
            --border-color: #ccc;
            --input-bg: #fcfcfc;
            --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
            --radius-md: 4px;
            --radius-sm: 2px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', Arial, sans-serif;
            background-color: var(--bg-color);
            color: var(--text-color);
            line-height: 1.3;
            padding: 10px;
            font-size: 13px;
        }

        .container {
            max-width: 900px;
            margin: 0 auto;
            background: var(--card-bg);
            padding: 20px;
            border-radius: var(--radius-md);
            box-shadow: var(--shadow-sm);
            position: relative; 
        }

        /* --- HEADER --- */
        .header {
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 15px;
            margin-bottom: 20px;
        }

        .header-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            gap: 20px;
        }

        .header-logo {
            max-height: 80px;
            width: auto;
            object-fit: contain;
        }

        .header h1 {
            color: #808080;
            font-size: 24px;
            font-weight: 700;
            text-align: right;
            margin: 0;
            padding: 0;
            background: none;
            border: none;
            letter-spacing: -0.5px;
            line-height: 1.2;
            flex: 1;
        }

        .company-info {
            font-size: 11px;
            color: #808080;
            line-height: 1.4;
            text-align: center;
            width: 100%;
            margin-top: 10px;
            padding: 0;
            background: none;
            border: none;
        }
        
        .company-info p {
            margin: 0;
        }

        /* --- SECTIONS --- */
        .section {
            margin-bottom: 15px;
            padding: 15px;
            background: #ffffff;
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            position: relative;
        }

        .section::before {
            content: '';
            position: absolute;
            left: 0;
            top: 10px;
            bottom: 10px;
            width: 3px;
            background-color: var(--primary-color);
        }

        .section-title {
            font-size: 15px;
            font-weight: 700;
            color: var(--primary-color);
            margin-bottom: 10px;
            text-transform: uppercase;
            border-bottom: 1px solid #eee;
            padding-bottom: 5px;
        }

        /* --- STYLES DES TITRES COLORÉS --- */
        .section-title.title-highlight {
            background-color: #1BB157; 
            color: white !important;
            text-align: center;
            padding: 8px;
            border-radius: var(--radius-sm);
            border-bottom: none; 
            margin-bottom: 15px;
        }

        .section-title.title-highlight-blue {
            background-color: #2778A5;
            color: white !important;
            text-align: center;
            padding: 8px;
            border-radius: var(--radius-sm);
            border-bottom: none;
            margin-bottom: 15px;
        }

        .section-title.title-highlight-orange {
            background-color: #F26628;
            color: white !important;
            text-align: center;
            padding: 8px;
            border-radius: var(--radius-sm);
            border-bottom: none;
            margin-bottom: 15px;
        }

        .form-group {
            margin-bottom: 10px;
        }

        .form-group label {
            display: block;
            font-weight: 600;
            font-size: 12px;
            margin-bottom: 4px;
            color: var(--text-color);
        }

        .form-group input[type="text"],
        .form-group input[type="email"],
        .form-group input[type="tel"],
        .form-group input[type="number"],
        .form-group textarea,
        .form-group select,
        input[name="date_etude"] {
            width: 100%;
            padding: 6px 10px;
            border: 1px solid var(--border-color);
            background-color: var(--input-bg);
            border-radius: var(--radius-sm);
            font-size: 13px;
            font-family: inherit;
            height: auto;
        }

        .form-group input:focus, 
        .form-group textarea:focus {
            outline: none;
            border-color: var(--primary-color);
            background-color: #fff;
            box-shadow: 0 0 0 2px rgba(44, 95, 45, 0.1);
        }

        .form-group textarea {
            resize: vertical;
            min-height: 60px;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
        }

        .form-row-3 {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 10px;
        }

        .checkbox-group, .radio-group {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 5px;
        }

        .checkbox-group label, .radio-group label {
            display: inline-flex;
            align-items: center;
            font-weight: 500;
            cursor: pointer;
            padding: 4px 8px;
            background: #f0f0f0;
            border-radius: 4px;
            font-size: 12px;
            border: 1px solid #ddd;
        }

        .checkbox-group label:hover, .radio-group label:hover {
            background: #e0e0e0;
        }

        .checkbox-group input, .radio-group input {
            margin-right: 6px;
            accent-color: var(--primary-color);
        }

        .photo-box {
            border: 2px dashed #ccc;
            padding: 15px;
            text-align: center;
            background: #fafafa;
            border-radius: var(--radius-md);
            margin: 10px 0;
        }

        .photo-box p {
            color: var(--text-light);
            font-size: 12px;
            margin: 2px 0;
        }
        
        /* STYLE BOUTONS PHOTOS (Pilule, Contour Vert #1BB157, Pas de fond) */
        .photo-box button[type="button"] {
            margin-top: 10px; 
            padding: 8px 20px !important; 
            background: white !important; 
            color: #1BB157 !important; 
            border: 1px solid #1BB157 !important; 
            border-radius: 50px !important; 
            cursor: pointer; 
            font-size: 12px !important;
            font-weight: 600 !important;
            transition: all 0.3s ease;
        }
        
        /* EFFET HOVER : Inversion des couleurs */
        .photo-box button[type="button"]:hover {
            background-color: #1BB157 !important;
            color: white !important;
            box-shadow: 0 2px 5px rgba(27, 177, 87, 0.2);
        }

        .note {
            background-color: #F26628;
            color: white;
            text-align: center;
            padding: 10px;
            margin: 15px 0;
            font-size: 12px;
            border-radius: var(--radius-sm);
            border: none;
        }
        
        .note strong {
            color: white;
            display: inline;
            margin-bottom: 0;
            margin-right: 5px;
            text-transform: uppercase;
        }
        
        /* --- BOUTON DE SOUMISSION MODIFIÉ --- */
        button[onclick="handleSubmit(event)"] {
            background-color: #1BB157 !important; /* Vert demandé */
            color: white !important;
            padding: 15px 40px !important;
            font-size: 16px !important;
            font-weight: 700 !important;
            border: none !important;
            border-radius: 50px !important; /* Bords complètement arrondis */
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(27, 177, 87, 0.3) !important;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        
        button[onclick="handleSubmit(event)"]:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(27, 177, 87, 0.4) !important;
        }
        
      }

        @media (max-width: 768px) {
            .container { padding: 10px; }
            .header-top { flex-direction: column; align-items: center; text-align: center; }
            .header h1 { text-align: center; font-size: 20px; }
            .form-row, .form-row-3 {
                grid-template-columns: 1fr;
                gap: 10px;
            }
            .section { padding: 10px; }
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        /* Style pour le voile de chargement */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none; /* Caché par défaut */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
    font-family: sans-serif;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2c5f2d; /* Votre couleur verte */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
