/* Liforo Plugin Styles */

/* Variables CSS */
:root {
    --liforo-primary: #3498db;
    --liforo-secondary: #2c3e50;
    --liforo-success: #2b27ae;
    --liforo-warning: #f39c12;
    --liforo-danger: #e74c3c;
    --liforo-light: #ecf0f1;
    --liforo-dark: #34495e;
    --liforo-border: #bdc3c7;
    --liforo-shadow: rgba(0, 0, 0, 0.1);
    --liforo-transition: all 0.3s ease;
}

/* Styles pour les sections de récurrence et dates multiples */
.form-section {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid var(--liforo-border);
    border-radius: 6px;
    background: #f8f9fa;
}

.form-section h4 {
    margin: 0 0 15px 0;
    color: var(--liforo-secondary);
    font-size: 1.1em;
    font-weight: 600;
}

.form-row {
    display: flex;
    gap: 15px;
    align-items: end;
}

.form-row .form-group {
    flex: 1;
}

/* Dates personnalisées */
.custom-date-item {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.custom-date-item input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.custom-date-item .remove-date-btn {
    background: var(--liforo-danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: var(--liforo-transition);
}

.custom-date-item .remove-date-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

#add-date-btn {
    margin-top: 10px;
    background: var(--liforo-success);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--liforo-transition);
}

#add-date-btn:hover {
    background: #27ae60;
    transform: translateY(-1px);
}

/* Options de récurrence */
#recurring-section .form-group {
    margin-bottom: 15px;
}

#recurring-section select,
#recurring-section input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

/* Amélioration des couleurs avec gradients */
.color-gradient-preview {
    width: 100%;
    height: 40px;
    border-radius: 4px;
    margin-top: 5px;
    border: 1px solid #ddd;
}

.color-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--liforo-transition);
}

.color-option:hover {
    transform: scale(1.1);
    border-color: var(--liforo-primary);
}

.color-option.selected {
    border-color: var(--liforo-secondary);
    box-shadow: 0 0 10px var(--liforo-shadow);
}

/* Container principal */
#liforo-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--liforo-shadow);
}

/* Écran de bienvenue */
.liforo-welcome {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--liforo-primary), var(--liforo-secondary));
    color: white;
    border-radius: 8px;
    margin-bottom: 20px;
}

.liforo-welcome h2 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: 300;
}

.liforo-welcome p {
    margin: 0 0 30px 0;
    font-size: 1.2em;
    opacity: 0.9;
}

/* Formulaire utilisateur */
.liforo-user-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    max-width: 400px;
    margin: 0 auto;
}

#liforo-container .liforo-user-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

#liforo-container .liforo-user-form .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: white;
}

#liforo-container .liforo-user-form .form-group input,
#liforo-container .liforo-user-form .form-group textarea,
#liforo-container .liforo-user-form .form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid transparent;
    border-radius: 6px;
    font-size: 16px;
    transition: var(--liforo-transition);
    background: white;
    box-sizing: border-box;
}

#liforo-container .liforo-user-form .form-group input:focus,
#liforo-container .liforo-user-form .form-group textarea:focus,
#liforo-container .liforo-user-form .form-group select:focus {
    outline: none;
    border-color: var(--liforo-primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

div.site-branding {
    display: none;
}

/* Boutons */
.liforo-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.liforo-btn:hover {
    background: var(--liforo-primary-dark);
    transform: translateY(-1px);
}

.liforo-btn-primary {
    background: var(--liforo-primary);
}

.liforo-btn-secondary {
    background: var(--liforo-secondary);
}

.liforo-btn-danger {
    background: #dc3545;
    color: white;
}

.liforo-btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Styles pour le sélecteur de norme de semaine */
#liforo-container .week-standard-selector {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

#liforo-container .standard-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#liforo-container .standard-info label {
    font-weight: 600;
    color: #495057;
    margin: 0;
}

#liforo-container .standard-select {
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    min-width: 150px;
}

#liforo-container .standard-select:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

#liforo-container .standard-description {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* Indicateur de norme active */
#liforo-container .standard-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

#liforo-container .standard-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

#liforo-container .standard-badge.eu {
    background-color: #007bff;
    color: white;
}

#liforo-container .standard-badge.us {
    background-color: #28a745;
    color: white;
}

#liforo-container .standard-name {
    font-size: 13px;
    color: #495057;
}

/* Notifications */
.liforo-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

.notification-info {
    background-color: #2196F3;
}

.notification-success {
    background-color: #4CAF50;
}

.notification-warning {
    background-color: #FF9800;
}

.notification-error {
    background-color: #F44336;
}

/* Modals */
.liforo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.liforo-modal {
    background: white;
    border-radius: 8px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.liforo-modal .modal-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.liforo-modal .modal-header h3 {
    margin: 0;
    color: #495057;
}

.liforo-modal .close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.liforo-modal .close-modal:hover {
    color: #495057;
}

.liforo-modal .modal-body {
    padding: 20px;
}

.liforo-modal .modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Formulaires dans les modals */
.liforo-modal .form-group,
#liforo-container .form-group {
    margin-bottom: 15px;
}

.liforo-modal .form-group label,
#liforo-container .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.liforo-modal .form-group input,
.liforo-modal .form-group textarea,
.liforo-modal .form-group select,
#liforo-container .form-group input,
#liforo-container .form-group textarea,
#liforo-container .form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.liforo-modal .form-group input:focus,
.liforo-modal .form-group textarea:focus,
.liforo-modal .form-group select:focus,
#liforo-container .form-group input:focus,
#liforo-container .form-group textarea:focus,
#liforo-container .form-group select:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.liforo-modal .form-group textarea,
#liforo-container .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.liforo-modal .form-actions,
#liforo-container .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    clear: both;
}

/* Styles pour les détails de semaine */
#liforo-container .week-details-row {
    background: #f8f9fa;
}

#liforo-container .week-details-cell {
    padding: 0 !important;
    border: none !important;
}

#liforo-container .week-details {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 10px;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: calc(100% - 20px);
    overflow: hidden;
}

#liforo-container .week-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    position: relative;
}

#liforo-container .week-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.4em;
    font-weight: 600;
}

#liforo-container .week-range {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95em;
}

.close-week-details {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.close-week-details:hover {
    background-color: rgba(255,255,255,0.2);
}

#liforo-container .week-content {
    padding: 20px;
}

#liforo-container .week-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin: 15px 0;
}

#liforo-container .day-cell {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 80px;
    display: flex;
    flex-direction: column;
}

#liforo-container .day-cell:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

#liforo-container .day-cell.selected {
    background: #e3f2fd;
    border-color: #2196F3;
}

#liforo-container .day-header {
    font-weight: 600;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
}

#liforo-container .day-number {
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    margin-bottom: 8px;
}

#liforo-container .day-events {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#liforo-container .event-item {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    color: white;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

#liforo-container .event-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#liforo-container .event-emoji {
    font-size: 12px;
    margin-left: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .standard-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .week-days {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .liforo-modal {
        width: 95%;
        margin: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* Header de la grille */
.liforo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--liforo-light);
    border-radius: 8px;
}

.liforo-header h2 {
    margin: 0;
    color: var(--liforo-secondary);
}

.liforo-controls {
    display: flex;
    gap: 10px;
}

/* Grille principale */
.liforo-grid {
    overflow: visible;
    border: 2px solid var(--liforo-border);
    border-radius: 8px;
    background: white;
    position: relative;
    width: 100%;
}

/* Styles pour la grille générée en JS */
.year-row {
    display: flex;
    border-bottom: 1px solid var(--liforo-border);
}

.year-row:hover {
    background: rgba(52, 152, 219, 0.05);
}

.year-label {
    padding: 8px 5px;
    text-align: center;
    font-weight: bold;
    background: var(--liforo-light);
    border-right: 1px solid var(--liforo-border);
    width: 40px;
}

.age-label {
    background: var(--liforo-secondary);
    color: white;
}

.calendar-year-label {
    background: var(--liforo-light);
    color: var(--liforo-secondary);
}

.week-cell {
    width: calc((100% - 80px) / 52);
    height: 25px;
    border-right: 1px solid var(--liforo-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.liforo-grid-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

/* En-têtes de la grille */
.liforo-grid-header {
    background: var(--liforo-secondary);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.liforo-grid-header th {
    padding: 8px 2px;
    font-size: 10px;
    font-weight: 500;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    width: calc((100% - 90px) / 52);
}

.liforo-grid-header th:nth-child(1) {
    width: 60px; /* Colonne Année */
}

.liforo-grid-header th:nth-child(2) {
    width: 35px; /* Colonne Âge */
}

.liforo-grid-header th:first-child {
    width: 60px;
    background: var(--liforo-dark);
    position: sticky;
    left: 0;
    z-index: 11;
}

/* Lignes de la grille */
.liforo-grid-row {
    border-bottom: 1px solid var(--liforo-border);
}

.liforo-grid-row:hover {
    background: rgba(52, 152, 219, 0.05);
}

/* Cellules de la grille */
.liforo-year-cell {
    background: var(--liforo-light);
    font-weight: bold;
    text-align: center;
    padding: 8px;
    border-right: 2px solid var(--liforo-border);
    position: sticky;
    left: 0;
    z-index: 5;
}

.liforo-year-cell:nth-child(1) {
    width: 60px; /* Colonne Année */
}

.liforo-year-cell:nth-child(2) {
    width: 30px; /* Colonne Âge */
    left: 60px; /* Position après la première colonne */
}

.liforo-week-cell {
    width: calc((100% - 90px) / 52);
    height: 30px;
    border-right: 1px solid var(--liforo-border);
    cursor: pointer;
    transition: var(--liforo-transition);
    position: relative;
    background: #fafafa;
}

.liforo-week-cell:hover {
    background: rgba(52, 152, 219, 0.1);
    transform: scale(1.1);
    z-index: 2;
    box-shadow: 0 2px 8px var(--liforo-shadow);
}

.liforo-week-cell.has-events {
    background: var(--liforo-primary);
}

.liforo-week-cell.has-events::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background: var(--liforo-warning);
    border-radius: 50%;
}

.liforo-week-cell.selected {
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.3);
    border: 2px solid var(--liforo-primary);
}

.liforo-week-cell.past {
    background: hsl(0deg 0.76% 73.82% / 31%) !important;
}

/* Animation pulse pour la semaine actuelle */
.liforo-week-cell.current-week {
    position: relative;
    z-index: 10;
    animation: pulse-animation 1.7s infinite;
    overflow: visible;
}

.liforo-week-cell.current-week::before {
    content: '';
    background: rgba(228, 183, 179, 0.8);
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    border-radius: 4px;
    z-index: -1;
    animation: pulse-shadow 1.7s infinite;
    pointer-events: none;
}

@keyframes pulse-shadow {
    0% {
        box-shadow: 0 0 0 0px rgba(231, 76, 60, 0.8);
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        box-shadow: 0 0 0 5px rgba(231, 76, 60, 0);
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes pulse-animation {
    0% {
        box-shadow: 0 0 0 0px rgba(231, 76, 60, 0.7);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
}

/* Détails de la semaine dans le tableau */
.liforo-week-details-cell {
    padding: 0 !important;
    border: none !important;
}

.liforo-week-details-content {
    padding: 20px;
    background: var(--liforo-light);
    border-radius: 8px;
    animation: slideDown 0.3s ease;
    margin: 10px;
    position: relative;
}

.liforo-week-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.liforo-week-header h3 {
    margin: 0;
    color: var(--liforo-secondary);
}

.liforo-close-week {
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: var(--liforo-secondary);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--liforo-transition);
    flex-shrink: 0;
    position: relative;
    line-height: 1;
}

.liforo-close-week:hover {
    background: #95a5a6;
    color: white;
    transform: none;
}

/* Détails de la semaine (ancienne version - à garder pour compatibilité) */
.liforo-week-details {
    margin-top: 20px;
    padding: 20px;
    background: var(--liforo-light);
    border-radius: 8px;
    animation: slideDown 0.3s ease;
}

.liforo-week-details h3 {
    margin: 0 0 15px 0;
    color: var(--liforo-secondary);
}

.liforo-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.liforo-day-cell {
    padding: 15px 10px;
    background: white;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: var(--liforo-transition);
    border: 2px solid transparent;
}

.liforo-day-cell:hover {
    border-color: var(--liforo-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--liforo-shadow);
}

.liforo-day-cell.has-events {
    background: rgba(52, 152, 219, 0.1);
    border-color: var(--liforo-primary);
}

.liforo-day-cell .day-number {
    font-weight: bold;
    font-size: 18px;
    color: var(--liforo-secondary);
}

.liforo-day-cell .day-name {
    font-size: 12px;
    color: var(--liforo-dark);
    margin-top: 5px;
}

.liforo-day-cell .events-count {
    font-size: 10px;
    color: var(--liforo-primary);
    margin-top: 5px;
}

/* Détails du jour dans le tableau */
.liforo-day-details-cell {
    padding: 0 !important;
    border: none !important;
}

.liforo-day-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--liforo-shadow);
    margin: 10px;
    animation: slideDown 0.3s ease;
}

.liforo-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--liforo-light);
    margin-bottom: 20px;
}

.liforo-day-header h3 {
    margin: 0;
    color: var(--liforo-secondary);
}

.liforo-close-day {
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: var(--liforo-secondary);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--liforo-transition);
    flex-shrink: 0;
    position: relative;
    line-height: 1;
}

.liforo-close-day:hover {
    background: #95a5a6;
    color: white;
    transform: none;
}

.liforo-day-main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Détails du jour (ancienne version - à garder pour compatibilité) */
.liforo-day-details {
    margin-top: 20px;
    animation: slideDown 0.3s ease;
}

/* Liste des événements */
.liforo-events-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 20px;
}

.liforo-events-list::-webkit-scrollbar {
    width: 8px;
}

.liforo-events-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.liforo-events-list::-webkit-scrollbar-thumb {
    background: var(--liforo-primary);
    border-radius: 4px;
}

.liforo-events-list::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

.liforo-events-list h4,
.liforo-event-form h4 {
    margin: 0 0 20px 0;
    color: var(--liforo-secondary);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--liforo-light);
}

.liforo-event-item {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    background: var(--liforo-light);
    border-left: 4px solid var(--liforo-primary);
    position: relative;
}

.liforo-event-item .event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.liforo-event-item .event-indicators {
    display: flex;
    align-items: center;
    gap: 5px;
}

.liforo-event-item.multi-day-event {
    background: linear-gradient(135deg, var(--liforo-light) 0%, #f8f9ff 100%);
    border-left-width: 6px;
}

.multi-day-indicator {
    font-size: 16px;
    opacity: 0.8;
    cursor: help;
}

.liforo-event-item .event-title {
    font-weight: bold;
    color: var(--liforo-secondary);
    margin: 0;
}

.liforo-event-item .event-emoji {
    font-size: 20px;
    margin-left: 10px;
}

.liforo-event-item .event-description {
    color: var(--liforo-dark);
    margin: 10px 0;
    line-height: 1.4;
}

.liforo-event-item .event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 10px 0;
}

.liforo-event-tag {
    background: var(--liforo-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

.liforo-event-item .event-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.liforo-event-actions .liforo-btn {
    padding: 6px 12px;
    font-size: 12px;
    margin: 0;
}

/* Formulaire d'événement */
.liforo-event-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.liforo-event-form h4 {
    margin: 0 0 20px 0;
    color: var(--liforo-secondary);
    font-size: 18px;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

#liforo-container .form-group {
    margin-bottom: 15px;
}

#liforo-container .form-group-half {
    margin-bottom: 0;
}

.liforo-event-form label {
    display: block;
    margin-bottom: 5px;
    color: var(--liforo-secondary);
    font-weight: 500;
    font-size: 14px;
}

.liforo-event-form input,
.liforo-event-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: var(--liforo-transition);
    box-sizing: border-box;
}

.liforo-event-form input:focus,
.liforo-event-form textarea:focus {
    outline: none;
    border-color: var(--liforo-primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Sélecteur de couleurs interactif */
.color-selector {
    margin-bottom: 10px;
}

.color-selector label {
    display: block;
    margin-bottom: 8px;
    color: var(--liforo-secondary);
    font-weight: 500;
    font-size: 14px;
}

.container-items {
    display: flex;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
}

.item-color {
    position: relative;
    flex: 1;
    min-width: 40px;
    height: 40px;
    border: none;
    outline: none;
    transition: 500ms cubic-bezier(0.175, 0.885, 0.32, 1.1);
    cursor: pointer;
    background: transparent;
}

.item-color::after {
    position: absolute;
    content: "";
    inset: 0;
    width: 40px;
    height: 40px;
    background-color: var(--color);
    border-radius: 6px;
    transform: scale(1.2);
    pointer-events: none;
    transition: 500ms cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.item-color::before {
    position: absolute;
    content: attr(aria-color);
    left: 65%;
    bottom: 52px;
    font-size: 8px;
    line-height: 12px;
    transform: translateX(-50%);
    padding: 2px 0.25rem;
    background-color: #ffffff;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: 500ms cubic-bezier(0.175, 0.885, 0.32, 1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 10000;
}

.item-color:hover {
    transform: scale(1.5);
    z-index: 99999;
}

.item-color:hover::before {
    opacity: 1;
    visibility: visible;
}

.item-color:active::after {
    transform: scale(1.1);
}

.item-color.selected::after {
    border: 3px solid var(--liforo-primary);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--liforo-primary);
}

.item-color:hover + .item-color {
    transform: scale(1.3);
    z-index: 9999;
}

.item-color:hover + .item-color + .item-color {
    transform: scale(1.15);
    z-index: 999;
}

.item-color:has(+ .item-color:hover) {
    transform: scale(1.3);
    z-index: 9999;
}

.item-color:has(+ .item-color + .item-color:hover) {
    transform: scale(1.15);
    z-index: 999;
}

/* Masquer le champ couleur natif */
input[type="color"] {
    display: none;
}

/* Styles pour l'authentification */
.liforo-auth-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.liforo-auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #f1f3f4;
}

.liforo-tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: var(--liforo-transition);
    border-bottom: 2px solid transparent;
}

.liforo-tab-btn.active {
    color: var(--liforo-primary);
    border-bottom-color: var(--liforo-primary);
}

.liforo-tab-btn:hover {
    color: var(--liforo-primary);
}

.liforo-tab-content {
    display: none;
}

.liforo-tab-content.active {
    display: block;
}

.liforo-auth-form {
    margin-top: 20px;
}

.liforo-auth-form h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--liforo-secondary);
    font-size: 24px;
}

.liforo-error {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #fcc;
    text-align: center;
}

.liforo-user-info {
    text-align: center;
    margin-bottom: 30px;
}

.liforo-logout {
    display: inline-block;
    margin-top: 10px;
    color: var(--liforo-primary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--liforo-transition);
}

.liforo-logout:hover {
    text-decoration: underline;
}

.liforo-event-form textarea {
    resize: vertical;
    min-height: 80px;
}

#liforo-container .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

/* Couleurs des cases semaine */
.liforo-week-cell {
    position: relative;
}

.liforo-week-cell .week-colors {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    opacity: 0.7;
    pointer-events: none;
}

.liforo-week-cell .week-content {
    position: relative;
    z-index: 2;
}

/* Couleurs des bordures jours */
.liforo-day-cell.has-colors {
    border-top: 3px solid;
}

/* Animation pulse pour le jour actuel */
.liforo-day-cell.current-day {
    position: relative;
    z-index: 10;
    animation: pulse-day-animation 2s infinite;
    overflow: visible;
}

.liforo-day-cell.current-day::before {
    content: '';
    
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    
    border-radius: 6px;
    z-index: -1;
    animation: pulse-day-shadow 3s infinite;
    pointer-events: none;
}


@keyframes pulse-day-animation {
    0% {
        box-shadow: 0 0 0 0px rgba(231, 76, 60, 0.7);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive */
@media (max-width: 768px) {
    #liforo-container {
        padding: 10px;
    }
    
    .liforo-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .liforo-day-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .liforo-day-main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .liforo-days-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .liforo-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .liforo-week-cell {
        height: 25px;
    }
    
    .liforo-grid-header th {
        font-size: 8px;
        padding: 4px 1px;
    }
}

@media (max-width: 480px) {
    .liforo-welcome {
        padding: 20px 10px;
    }
    
    .liforo-welcome h2 {
        font-size: 2em;
    }
    
    .liforo-user-form {
        padding: 20px;
    }
    
    .liforo-days-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* États de chargement */
.liforo-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.liforo-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--liforo-light);
    border-top: 4px solid var(--liforo-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages d'état */
.liforo-message {
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    font-weight: 500;
}

.liforo-message.success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--liforo-success);
    border: 1px solid var(--liforo-success);
}

.liforo-message.error {
    background: rgba(231, 76, 60, 0.1);
    color: var(--liforo-danger);
    border: 1px solid var(--liforo-danger);
}

.liforo-message.info {
    background: rgba(52, 152, 219, 0.1);
    color: var(--liforo-primary);
    border: 1px solid var(--liforo-primary);
}

/* ========================================
   GRILLE HORAIRE 24H - STYLE GOOGLE CALENDAR
   ======================================== */

.liforo-hourly-grid {
    width: 100%;
    margin-top: 20px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    font-family: 'Google Sans', 'Roboto', Arial, sans-serif;
}

/* En-tête de la grille horaire */
.hourly-grid-header {
    display: table;
    width: 100%;
    background: white;
    border-bottom: 1px solid #dadce0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.hourly-grid-header > div {
    display: table-cell;
    vertical-align: middle;
}

.time-column-header {
    width: 60px;
    padding: 16px 8px;
    font-size: 11px;
    font-weight: 500;
    color: #70757a;
    text-align: center;
    border-right: 1px solid #dadce0;
    background: white;
}

#liforo-container .day-column-header {
    padding: 8px;
    text-align: center;
    border-right: 1px solid #dadce0;
    background: white;
    cursor: pointer;
    transition: background-color 0.1s;
}

#liforo-container .day-column-header:hover {
    background: #f8f9fa;
}

#liforo-container .day-name {
    font-size: 11px;
    font-weight: 500;
    color: #70757a;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 0.8px;
}

#liforo-container .day-date {
    font-size: 26px;
    font-weight: 400;
    color: #3c4043;
    line-height: 1;
}

/* Corps de la grille horaire */
.hourly-grid-body {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

/* Table de la grille horaire */
.hourly-grid-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.time-row {
    height: 48px;
    border-bottom: 1px solid #dadce0;
}

.time-row:hover .time-slot {
    background: #f8f9fa;
}

/* Étiquettes des heures - Style Google Calendar */
.time-label {
    width: 60px;
    padding: 8px;
    font-size: 10px;
    color: #70757a;
    border-right: 1px solid #dadce0;
    text-align: right;
    background: white;
    vertical-align: top;
    font-weight: 400;
    position: relative;
}

.time-slot-label.full-hour {
    font-weight: 600;
    color: #202124;
    border-top: 1px solid #dadce0;
}

.time-slot-label.half-hour {
    font-weight: 400;
    color: #9aa0a6;
    font-size: 11px;
}

/* Créneaux horaires cliquables - Style Google Calendar */
.time-slot {
    border-right: 1px solid #dadce0;
    cursor: pointer;
    transition: background-color 0.1s ease;
    position: relative;
    background: white;
    height: 48px;
    vertical-align: top;
    padding: 0;
}

.time-slot:hover {
    background: #f1f3f4;
}

.time-slot:active {
    background: #d2e3fc;
}

/* Créneaux avec événements */
.time-slot.has-event {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: white;
    cursor: pointer;
}

.time-slot.has-event:hover {
    background: linear-gradient(135deg, #3367d6 0%, #2d8f47 100%);
    transform: scale(1.02);
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Indicateur d'heure actuelle */
.current-time-indicator {
    position: absolute;
    left: 80px;
    right: 0;
    height: 2px;
    background: #ea4335;
    z-index: 15;
    pointer-events: none;
}

.current-time-indicator::before {
    content: '';
    position: absolute;
    left: -6px;
    top: -4px;
    width: 10px;
    height: 10px;
    background: #ea4335;
    border-radius: 50%;
}

/* Jour actuel dans l'en-tête */
#liforo-container .day-column-header.current-day {
    background: #e8f0fe;
    border-color: #4285f4;
}

#liforo-container .day-column-header.current-day .day-name {
    color: #4285f4;
}

#liforo-container .day-column-header.current-day .day-number {
    color: #4285f4;
    background: #4285f4;
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .hourly-grid-header,
    .hourly-grid-row {
        grid-template-columns: 60px repeat(7, 1fr);
    }
    
    .time-column-header,
    .time-slot-label {
        padding: 8px 4px;
        font-size: 10px;
    }
    
    .day-column-header {
        padding: 10px 5px;
    }
    
    .day-column-header .day-name {
        font-size: 12px;
    }
    
    .day-column-header .day-number {
        font-size: 16px;
    }
    
    .time-slot {
        min-height: 40px;
    }
}

/* Animation pour les nouveaux événements */
@keyframes eventAppear {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.time-slot.new-event {
    animation: eventAppear 0.3s ease-out;
}

/* Scrollbar personnalisée pour la grille */
.hourly-grid-body::-webkit-scrollbar {
    width: 8px;
}

.hourly-grid-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.hourly-grid-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.hourly-grid-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Événements dans la grille horaire */
.hourly-event {
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: 4px;
    padding: 4px 6px;
    color: white;
    font-size: 11px;
    line-height: 1.2;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hourly-event:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.hourly-event .event-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.hourly-event .event-emoji {
    font-size: 12px;
    flex-shrink: 0;
}

.hourly-event .event-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.hourly-event .event-time {
    font-size: 10px;
    opacity: 0.9;
    margin-bottom: 2px;
}

.hourly-event .event-guests {
    font-size: 10px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Créneaux avec événements */
.time-slot.has-event {
    position: relative;
}

/* Créneaux avec continuation d'événement */
.time-slot.event-continuation {
    background: rgba(66, 133, 244, 0.1);
    border-left: 3px solid #4285f4;
}

/* Styles pour différents types d'événements */
.hourly-event[data-type="Task"] {
    border-left: 4px solid #34a853;
}

.hourly-event[data-type="Planning"] {
    border-left: 4px solid #fbbc04;
}

.hourly-event[data-type="Event"] {
    border-left: 4px solid #4285f4;
}

/* Responsive pour les événements */
@media (max-width: 768px) {
    .hourly-event {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    .hourly-event .event-emoji {
        font-size: 10px;
    }
    
    .hourly-event .event-time,
    .hourly-event .event-guests {
        font-size: 9px;
    }
}
