/* * KORRIGEO UI FRAMEWORK - v1.1
 * Design System Complet : Couleurs, Typographie, Formulaires, Responsive
 */

/* --- 1. TYPOGRAPHIE --- */
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat/Montserrat-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* --- 2. VARIABLES DE DESIGN --- */
:root {
    /* Couleurs de Marque */
    --primary: #0F5A63;
    --secondary: #2F6EA6;
    --text: #002B30;
    --bg-app: #F7FAFB;
    
    /* Palette Étendue */
    --deep: #0F5A63;
    --kelp: #2F6EA6;
    --sand: #E6DCCF;
    --seafoam: #7FCED6;

    /* États & Feedback */
    --success: #2F7D6C;
    --info: #2C8E9B;
    --warning: #E8B351;
    --danger: #C84B4B;

    /* Ombres (Box Concepts) */
    --shadow-flat: 0 2px 4px rgba(0, 43, 48, 0.05);
    --shadow-raised: 0 10px 20px rgba(0, 43, 48, 0.08);
    --shadow-overlay: 0 15px 35px rgba(0, 43, 48, 0.12);

    /* Dimensions */
    --sidebar-width: 280px;
    --header-height: 64px;
    --radius: 12px;
}

/* --- 3. BASE & RESET --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-app);
    color: var(--text);
    overflow: hidden;
}

/* --- 4. LAYOUT APPLICATIF --- */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid rgba(0, 43, 48, 0.08);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    flex-shrink: 0;
    z-index: 1000;
}

.sidebar-logo {
    width: 100%;
    margin-bottom: 3rem;
    text-align: center;
}

.sidebar-logo img {
    max-width: 180px;
    height: auto;
}

/* Contenu Principal */
.main-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Header Mobile */
.mobile-header {
    display: none;
    height: var(--header-height);
    background: white;
    padding: 0 1.5rem;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 43, 48, 0.08);
    flex-shrink: 0;
}

/* --- 5. COMPOSANTS UI --- */

/* Navigation */
.nav-link {
    text-decoration: none;
    color: var(--text);
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: 0.2s ease;
}
.nav-link:hover, .nav-link.active {
    background: #F0F4F5;
    color: var(--primary);
}

/* Cartes */
.card { background: white; border-radius: var(--radius); padding: 1.5rem; }
.card-flat { border: 1px solid #EEF2F3; box-shadow: var(--shadow-flat); }
.card-raised { box-shadow: var(--shadow-raised); }
.card-overlay { box-shadow: var(--shadow-overlay); }

/* Boutons */
.btn {
    padding: 0.8rem 1.6rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-primary { background: var(--primary); color: white; text-decoration: none;}
.btn-secondary { background: var(--secondary); color: white; }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(0.98); }

/* --- 6. FORMULAIRES --- */
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-weight: 600; margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--deep); }

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: inherit;
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    outline: none;
    transition: 0.2s;
}
.form-control:focus {
    border-color: var(--seafoam);
    box-shadow: 0 0 0 3px rgba(127, 206, 214, 0.2);
}

/* Switch */
.form-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    cursor: pointer;
}
.form-switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    inset: 0;
    background-color: #CBD5E0;
    transition: .3s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(22px); }

/* Radio */
.form-radio {
    appearance: none;
    width: 20px; height: 20px;
    border: 2px solid #E2E8F0;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
}
.form-radio:checked { border-color: var(--primary); }
.form-radio:checked::after {
    content: ""; position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 10px; height: 10px; background: var(--primary); border-radius: 50%;
}

/* --- 7. PROGRESSION & INDICATEURS --- */
.progress-container {
    width: 100%; background: #EDF2F7; border-radius: 100px; height: 10px;
    overflow: hidden; margin-top: 10px;
}
.progress-bar {
    height: 100%; background: linear-gradient(90deg, var(--primary), var(--seafoam));
    border-radius: 100px; transition: width 0.4s ease;
}

.dot {
    height: 10px; width: 10px; border-radius: 50%;
    display: inline-block; position: relative; margin-right: 10px;
}
.dot-pulse::after {
    content: ""; position: absolute; inset: 0;
    background: inherit; border-radius: 50%;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 0.7; }
    70% { transform: scale(2.8); opacity: 0; }
    100% { transform: scale(0.95); opacity: 0; }
}

/* Couleurs Utility */
.bg-success { background: var(--success); }
.bg-danger { background: var(--danger); }
.bg-warning { background: var(--warning); }
.bg-info { background: var(--info); }
.bg-primary { background: var(--primary); }

/* --- 8. RESPONSIVE --- */
@media (max-width: 992px) {
    .app-container { flex-direction: column; }
    .mobile-header { display: flex; }
    .sidebar {
        position: fixed; left: -100%; top: 0; bottom: 0;
        transition: 0.3s; box-shadow: var(--shadow-overlay); width: 280px;
    }
    .sidebar.active { left: 0; }
    .main-content { padding: 1.5rem; }
    .overlay {
        display: none; position: fixed; inset: 0;
        background: rgba(0, 43, 48, 0.3); z-index: 999;
    }
    .overlay.active { display: block; }
}