/* style.css - Version Plus Claire (Stone 800) */

body {
    font-family: 'Nunito', sans-serif;
}

/* --- FOND GLOBAL --- */
/* Modification ici : On passe du #1c1917 (Très noir) au #292524 (Gris chaud) */
html.dark body, [data-theme="dark"] body {
    background-color: #292524 !important; /* Stone 800 */
    color: #f5f5f4 !important;            /* Stone 100 */
}

/* --- ELEMENTS SUR FOND GRIS --- */
/* Comme le fond est plus clair, on doit éclaircir aussi les inputs pour qu'ils ressortent */
.dark input, 
.dark select, 
.dark textarea,
[data-theme="dark"] input, 
[data-theme="dark"] select, 
[data-theme="dark"] textarea {
    background-color: #44403c !important; /* Stone 700 (Plus clair que le fond) */
    border-color: #78716c !important;     /* Stone 500 */
    color: #fafaf9 !important;
}


/* --- FORMULAIRES (Light Mode) --- */
input[type="text"], 
input[type="email"], 
input[type="tel"], 
input[type="number"], 
input[type="date"], 
input[type="password"], 
input[type="color"],
select, 
textarea {
    display: block;
    width: 100%;
    border-radius: 0.375rem;
    border: 1px solid #d6d3d1; /* Stone-300 */
    background-color: #ffffff;
    color: #1c1917;            /* Stone-900 */
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    transition: all 0.15s ease-in-out;
}

/* Focus (Light) - Vert Emerald */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* --- FORMULAIRES (Dark Mode - Stone) --- */
.dark input, 
.dark select, 
.dark textarea,
[data-theme="dark"] input, 
[data-theme="dark"] select, 
[data-theme="dark"] textarea {
    background-color: #292524 !important; /* Stone 800 */
    border-color: #57534e !important;     /* Stone 600 */
    color: #fafaf9 !important;            /* Stone 50 */
}

/* Focus (Dark) */
.dark input:focus, 
.dark select:focus, 
.dark textarea:focus {
    border-color: #34d399 !important; /* Emerald-400 */
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25) !important;
    background-color: #292524 !important;
}

/* Flèche Select Custom (Dark) */
.dark select, [data-theme="dark"] select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23a8a29e' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

/* --- TABLES DARK MODE FIX --- */
.dark table input {
    background-color: transparent !important;
    border: 1px solid transparent !important;
    color: white !important;
    box-shadow: none !important;
}
.dark table input:focus {
    background-color: #292524 !important; /* Stone-800 */
    border: 1px solid #10b981 !important;
}

/* --- HELPERS --- */
.btn-action {
    cursor: pointer;
    transition: transform 0.1s;
}
.btn-action:active {
    transform: scale(0.95);
}

/* --- PRINT --- */
@media print {
    nav, #settings-panel, .btn-action, .no-print, #break-actions, #save-panel { display: none !important; }
    body { background-color: white !important; color: black !important; }
    .shadow-lg, .shadow-xl, .shadow-sm, .shadow { box-shadow: none !important; }
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}