/* PatPlanning - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background: linear-gradient(90deg, #4361ee 0%, #7209b7 60%, #f72585 100%);	
	background: white;
	background: url('fond.png') repeat;
	background: #eef6ff;
    min-height: 100vh;
    padding-top: calc(64px + 20px); /* navbar height + spacing */
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
}

/* ===================================================
   NAVBAR PRINCIPALE
   =================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(90deg, #4361ee 0%, #7209b7 60%, #f72585 100%);
    box-shadow: 0 3px 15px rgba(0,0,0,0.25);
    height: 64px;
}

.main-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 20px;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    flex-shrink: 0;
}

.brand-icon {
    font-size: 1.7em;
    line-height: 1;
}

.brand-text {
    font-size: 1.2em;
    font-weight: 800;
    color: white;
    line-height: 1.1;
    display: flex;
    flex-direction: column;
}

.brand-school {
    font-size: 0.6em;
    font-weight: 600;
    opacity: 0.85;
    letter-spacing: 0.02em;
}

/* Nav list */
.topnav {
    margin-left: auto;
}

.topnav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 4px;
}

.topnav-list > li > a,
.topnav-list > li > .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 13px;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.92em;
    font-weight: 600;
    transition: background 0.18s, color 0.18s;
    cursor: pointer;
    border: none;
    background: transparent;
    white-space: nowrap;
}

.topnav-list > li > a:hover,
.topnav-list > li > .dropdown-toggle:hover,
.topnav-list > li.open > a,
.topnav-list > li.open > .dropdown-toggle {
    background: rgba(255,255,255,0.18);
    color: white;
}

.topnav-list > li.active > a,
.topnav-list > li.active > .dropdown-toggle {
    background: rgba(255,255,255,0.25);
    color: white;
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    list-style: none;
    min-width: 220px;
    padding: 6px 0;
    z-index: 500;
    border: 1px solid rgba(0,0,0,0.07);
}

.dropdown-right {
    left: auto;
    right: 0;
}

.has-dropdown.open > .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 9px 16px;
    color: #333;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    transition: background 0.15s;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background: #f0f3ff;
    color: #4361ee;
}

.dropdown-header {
    padding: 8px 16px 4px;
    font-size: 0.78em;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.dropdown-divider {
    border-top: 1px solid #eee;
    margin: 4px 0;
}

/* User button */
.user-btn {
    gap: 8px !important;
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    font-weight: 800;
    font-size: 0.85em;
    color: white;
    flex-shrink: 0;
}

/* Burger (mobile) */
.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
    z-index: 1001; /* Above mobile topnav */
}

.nav-burger span {
    display: block;
    width: 26px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: transform 0.2s;
}

/* ===================================================
   FOOTER
   =================================================== */
.main-footer {
    text-align: center;
    padding: 16px 24px;
    color: #2563eb; /* Bleu bien visible */
    font-size: 0.82em;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-top: 20px;
}

/* ===================================================
   RESPONSIVE NAV
   =================================================== */
@media (max-width: 768px) {
    .nav-burger { display: flex; }

    .topnav {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, #4361ee, #7209b7);
        padding: 12px 0;
        box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    }

    .topnav.open { display: block; }

    .topnav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .topnav-list > li > a,
    .topnav-list > li > .dropdown-toggle {
        border-radius: 0;
        padding: 12px 20px;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: rgba(0,0,0,0.15);
        padding: 0;
    }

    .dropdown-menu li a {
        color: rgba(255,255,255,0.85);
        padding-left: 36px;
    }

    .dropdown-menu li a:hover {
        background: rgba(255,255,255,0.1);
        color: white;
    }

    .has-dropdown.open > .dropdown-menu { display: block; }
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
	background: url('fond1.png') repeat;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 30px;
}

h1, h2, h3 {
    color: #333;
    margin-bottom: 20px;
}

h1 {
    font-size: 2em;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 10px;
}

.header h1 {
    margin-bottom: 0;
}

.user-info {
    font-size: 0.9em;
    color: #666;
}

/* Navigation */
.nav {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.nav a {
    display: inline-block;
    padding: 10px 20px;
    margin-right: 10px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav a:hover {
    background: #5568d3;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
}

input[type="file"] {
    padding: 10px 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
}

.btn:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
	background: linear-gradient(90deg, #4361ee 0%, #7209b7 60%, #f72585 100%);	
	background: #ffc107; color: #333;
	
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9em;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

tr:hover {
    background: #f8f9fa;
}

/* Calendar/Planning Grid */
.week-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    /*background: #f8f9fa;*/
	background: transparent;	
    border-radius: 8px;
}

.week-info {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;	
}

.planning-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
	/*background: url('fond1.png') repeat;*/
	background: transparent;
}

.day-column {
    /*background: #f8f9fa;*/
	background: transparent;
    border-radius: 8px;
    padding: 15px;
    min-height: 400px;
}

.day-header {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    color: #333;
	text-align: center;
}

.activity-item {
    background: #f8f8ff;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 5px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.activity-name {
    font-weight: 800;
    color: #667eea;
    margin-bottom: 5px;
	text-align: center;	
}

.lesson-code {
    font-size: 0.85em;
    color: #666;
    font-family: 'Courier New', monospace;
}

.lesson-title {
    color: #333;
    margin-top: 5px;
}

/* Color coding by subject */
.matiere-francais { border-left-color: #667eea; }
.matiere-mathematiques { border-left-color: #f093fb; }
.matiere-histoire { border-left-color: #4facfe; }
.matiere-geographie { border-left-color: #43e97b; }
.matiere-sciences { border-left-color: #fa709a; }

/* Messages */
.message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 100px auto;
}

/* Responsive */
@media (max-width: 768px) {
    .planning-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav a {
        display: block;
        margin-bottom: 10px;
    }
}

/* Impression globale */
@media print {
    .main-header,
    .main-footer,
    .nav-burger {
        display: none !important;
    }
    body {
        padding-top: 0 !important;
        background: white !important;
    }
}

/* ===================================================
   UTILITAIRES
   =================================================== */
.form-inline { display: inline; }
.hidden-form { display: none; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 15px; }
.mt-3 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; }
.ml-auto { margin-left: auto; }
.td-center { text-align: center; }
.text-muted-light { color: #bbb; }
.text-warning-label { color: #856404; font-weight: 600; }
/* .no-print : visible en écran, masqué à l'impression via @media print */
.required-star { color: red; }
.detail-footer { max-width: 680px; margin: 20px auto 0; text-align: right; }
.detail-footer small { color: #999; }

/* Bouton warning jaune */
.btn-warning {
    background: #ffc107;
    color: #333;
}
.btn-warning:hover {
    background: #e0a800;
    color: #333;
}

/* ===================================================
   BOUTONS ICÔNE (partagés entre pages admin)
   =================================================== */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.2s, transform 0.1s;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
}
.btn-icon:hover { transform: scale(1.1); }
.btn-icon.move:hover  { background: #d1ecf1; color: #0c5460; }
.btn-icon.edit:hover  { background: #d1ecf1; color: #0c5460; }
.btn-icon.bilan:hover { background: #d4edda; color: #155724; }
.btn-icon.delete:hover { background: #f8d7da; color: #721c24; }
.btn-icon.insert:hover { background: #fff3cd; color: #856404; }
.btn-icon.detail:hover { background: #d1ecf1; color: #0c5460; }
.btn-icon.success { background: #28a745; color: white; }
.btn-icon.success:hover { background: #218838; }
.btn-icon.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

/* ===================================================
   FILTRES / SÉLECTEURS (admin-activites, admin-lecons)
   =================================================== */
.filters {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: transparent;
    border-radius: 8px;
}
.filter-group {
    display: flex;
    align-items: center;
    flex-direction: row;
}
.filter-group label {
    margin-right: 10px;
    white-space: nowrap;
}
.filter-group select {
    flex: 1;
    padding: 8px 12px;
}

/* ===================================================
   TABLES ADMIN (base commune)
   =================================================== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}
.admin-table th {
    background: #667eea;
    color: white;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
}
.admin-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.admin-table tr:hover { background: #f0f3ff; }
.admin-table .col-order {
    width: 40px;
    text-align: center;
    color: #999;
    font-size: 0.85em;
}
.admin-table .col-num {
    width: 40px;
    text-align: center;
    color: #999;
    font-size: 0.85em;
}
.admin-table .col-actions {
    width: 180px;
    text-align: right;
    white-space: nowrap;
}
.admin-table .col-actions-sm {
    width: 90px;
    text-align: right;
    white-space: nowrap;
}

/* Colonnes spécifiques activités */
.admin-table .col-name  { min-width: 180px; }
.admin-table .col-days  { min-width: 150px; color: #555; font-size: 0.9em; }
.admin-table .col-rev   { width: 80px; text-align: center; }
.admin-table .col-matiere { min-width: 120px; color: #555; font-size: 0.9em; }

/* Colonnes spécifiques leçons */
.admin-table .col-date  { width: 100px; color: #666; font-size: 0.9em; }
.admin-table .col-code  { width: 180px; font-family: 'Courier New', monospace; font-size: 0.9em; color: #555; }

/* ===================================================
   BADGES
   =================================================== */
.rev-badge {
    display: inline-block;
    background: #e2e3ff;
    color: #4a4acf;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: 600;
}
.role-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 0.82em;
    font-weight: 600;
}
.role-admin { background: #fff3cd; color: #856404; }
.role-user  { background: #e2e3e5; color: #495057; }
.me-badge   { font-size: 0.8em; color: #888; font-style: italic; }
.activity-count, .lesson-count, .user-count {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

/* ===================================================
   FORMULAIRES INLINE / ÉDITION
   =================================================== */
/* .display-mode : pas de styles spécifiques, visible par défaut */
.edit-form { display: none; }
.edit-form input[type="text"],
.edit-form input[type="date"] {
    padding: 4px 7px;
    border: 2px solid #667eea;
    border-radius: 4px;
    font-size: 0.9em;
    width: 100%;
    box-sizing: border-box;
}
.edit-form select {
    padding: 5px 8px;
    border: 2px solid #667eea;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Ligne d'ajout (fond jaune clair) */
.add-row { display: none; background: #fffce6; }
.add-row td { padding: 10px 12px; }
.add-row input[type="text"],
.add-row input[type="date"] {
    padding: 5px 8px;
    border: 2px solid #ffc107;
    border-radius: 4px;
    font-size: 0.9em;
    width: 100%;
    box-sizing: border-box;
}
.add-row input[type="checkbox"] { transform: scale(1.3); }

/* Ligne d'insertion leçons */
.insert-row { display: none; background: #fffce6; }
.insert-row td { padding: 10px 12px; }
.insert-form {
    display: flex;
    align-items: center;
    gap: 10px;
}
.insert-form input {
    padding: 6px 10px;
    border: 2px solid #ffc107;
    border-radius: 4px;
    font-size: 0.9em;
}
.insert-form input.insert-code { width: 160px; font-family: 'Courier New', monospace; }
.insert-form input.insert-title { flex: 1; min-width: 200px; }
.insert-label { color: #856404; font-weight: 600; }

/* Champ jours (largeur fixe) */
.input-days { width: 80px; }
.checkbox-lg { transform: scale(1.3); }

/* Barre d'outils leçons */
.toolbar-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

/* Édition titre leçon */
.title-display { cursor: default; }
.title-edit-form {
    display: none;
    align-items: center;
    gap: 8px;
}
.title-edit-form input {
    padding: 5px 8px;
    border: 2px solid #667eea;
    border-radius: 4px;
    font-size: 0.95em;
    width: 100%;
}
.title-edit-form .btn-icon { flex-shrink: 0; }

/* section-add-btn */
.section-add-btn { margin-top: 12px; }

/* header-section : séparateur de section dans les éditeurs */
.header-section {
    margin-top: 40px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* .user-info sans marge basse */
.user-info-inline { margin-bottom: 0; }

/* Barre de classe (user-planning) */
.class-bar {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}
.class-bar-label {
    display: flex;
    align-items: center;
    flex: 1;
}
.class-bar-label label {
    margin-right: 10px;
    white-space: nowrap;
}
.class-bar-label select { flex: 1; }
.class-bar-single { margin-bottom: 20px; display: flex; align-items: center; width: 100%; }
.class-bar-single strong { margin-right: 10px; white-space: nowrap; }

/* Planning : jour sans activité / exception */
.day-notice-vacation {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ffeeba;
}
.day-notice-empty { color: #999; font-style: italic; padding: 10px; }
.exception-item {
    border-left: 3px solid #dc3545 !important;
    background-color: #fff8f8;
}
.lesson-exception { font-size: 0.9em; color: #555; }
.rev-label { color: #d63384; font-weight: bold; font-size: 0.9em; margin-bottom: 4px; }

/* h1 sans bordure basse */
.h1-no-border { border-bottom: none; margin-bottom: 0; }

/* ===================================================
   PROFIL & DÉTAIL UTILISATEUR
   =================================================== */
.profile-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 640px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.profile-avatar-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}
.profile-avatar-big {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4361ee, #f72585);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}
.profile-title-info { flex: 1; }
.profile-title-info h2 { margin: 0 0 4px; font-size: 1.3em; border: none; padding: 0; }
.profile-title-info .role-chip {
    display: inline-block;
    background: #f0f3ff;
    color: #4361ee;
    border-radius: 20px;
    padding: 2px 12px;
    font-size: 0.82em;
    font-weight: 700;
}
.section-title {
    font-size: 0.88em;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 24px 0 12px;
}
.form-row-2 { display: flex; gap: 16px; }
.form-row-2 .form-group { flex: 1; min-width: 0; }
.separator { border: none; border-top: 1px solid #eee; margin: 24px 0; }
.pwd-hint { font-size: 0.8em; color: #aaa; margin-top: 3px; }
.action-bar { display: flex; gap: 12px; align-items: center; margin-top: 26px; }

/* Détail utilisateur */
.detail-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    max-width: 680px;
    margin: 0 auto;
}
.detail-card h2 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 1.3em;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}
.detail-card input[type="email"],
.detail-card input[type="tel"] {
    width: 100%;
    box-sizing: border-box;
}
.pwd-hint { font-size: 0.82em; color: #888; margin-top: 3px; }

/* ===================================================
   BILANS & OBJECTIFS (pages print)
   =================================================== */
.bilan-wrapper  { position: relative; }
.bilan-wrapper.removed { display: none; }
.bilan-block { margin-bottom: 10px; padding: 15px 20px; }
.bilan-block h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    font-size: 1.2em;
    margin-bottom: 10px;
    border-bottom: none;
}
.bilan-content { line-height: 1.6; color: #333; }
.bilan-content table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.bilan-content table td,
.bilan-content table th { border: 1px solid #999; padding: 6px 10px; }
.bilan-content table th { background-color: #f0f0f0; font-weight: bold; }

.btn-remove-bilan {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2em;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.btn-remove-bilan:hover { background: #f8d7da; }

.bilan-separator { border: none; border-top: 2px solid #667eea; margin: 20px 0; }

.print-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.print-header h1 { font-size: 1.5em; border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.btn-print {
    display: inline-block;
    padding: 10px 25px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
}
.btn-print:hover { background: #218838; }

.print-running-header,
.print-running-footer { display: none; }

.bilan-controls { text-align: right; margin-bottom: 5px; }

/* Objectifs (même structure que bilans) */
.objectif-wrapper  { position: relative; }
.objectif-wrapper.removed { display: none; }
.objectif-block { margin-bottom: 10px; padding: 15px 20px; }
.objectif-block h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    font-size: 1.2em;
    margin-bottom: 10px;
    border-bottom: none;
}
.objectif-content { line-height: 1.6; color: #333; }
.objectif-content table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.objectif-content table td,
.objectif-content table th { border: 1px solid #999; padding: 6px 10px; }
.objectif-content table th { background-color: #f0f0f0; font-weight: bold; }

.btn-remove-objectif {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2em;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.btn-remove-objectif:hover { background: #f8d7da; }
.objectif-separator { border: none; border-top: 2px solid #28a745; margin: 20px 0; }

/* ===================================================
   IMPRESSION PAGES BILANS / OBJECTIFS
   =================================================== */
@media print {
    .no-print { display: none !important; }
    .print-header h1 { font-size: 1.3em; color: #000; }
    .container {
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 10px !important;
        max-width: 100% !important;
    }
    .bilan-block,
    .objectif-block {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .bilan-separator { border-top: 1px solid #000; margin: 15px 0; }
    .objectif-separator { border-top: 1px solid #000; margin: 15px 0; }
    .bilan-content table td,
    .bilan-content table th,
    .objectif-content table td,
    .objectif-content table th { border: 1px solid #000; }
}

/* ===================================================
   ÉDITEURS (Bilan, Objectif, Leçon)
   =================================================== */
.editor-container {
    background: white;
    border-radius: 5px;
    margin-bottom: 20px;
}

#editor-tinymce-wrapper {
    border: 1px solid #ddd;
    border-radius: 5px;
    min-height: 550px;
}

#editor-quill {
    min-height: 500px;
    font-size: 14pt;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.ql-toolbar.ql-snow {
    border-radius: 5px 5px 0 0;
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 12px;
}

.ql-container.ql-snow {
    border-radius: 0 0 5px 5px;
    border: 1px solid #ddd;
    border-top: none;
}

.ql-editor {
    min-height: 500px;
    font-size: 14pt;
    line-height: 1.6;
}

.ql-editor p { margin-bottom: 10px; }
.ql-editor table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.ql-editor table td, .ql-editor table th { border: 1px solid #ddd; padding: 8px; }
.ql-editor table th { background-color: #f0f0f0; font-weight: bold; }

.btn-save {
    margin-top: 20px;
    padding: 12px 30px;
    font-size: 1.1em;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.editor-badge {
    display: inline-block;
    font-size: 0.75em;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e8f4f8;
    color: #2980b9;
    margin-left: 10px;
    vertical-align: middle;
    font-weight: normal;
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

#loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 15px;
    font-family: 'Segoe UI', sans-serif;
    color: #667eea;
    font-weight: bold;
}

/* Styles spécifiques Leçon editor */
.lesson-details {
    background: transparent;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.read-only-field {
    background: #f8f9fa;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
}

.bilan-preview {
    background: white;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-top: 10px;
    min-height: 100px;
}

.bilan-empty {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Utilities */
.flex-row {
    display: flex;
    gap: 10px;
}

.align-center {
    align-items: center;
}

.inline-form {
    display: inline;
}

.pos-relative {
    position: relative;
}

.float-right {
    float: right;
}

.btn-day-postpone {
    position: absolute;
    right: 5px;
    top: 10px;
}
