/* ================================================
   CALENDRIER POPUP - STYLES
   ================================================ */

/* Variables pour les thèmes jour/nuit */
:root {
    --calendar-bg: #fff;
    --calendar-text: #2c3e50;
    --calendar-text-secondary: #7f8c8d;
    --calendar-day-bg: #f8f9fa;
    --calendar-day-disabled: #bdc3c7;
    --calendar-header-bg: rgba(255, 255, 255, 0.5);
    --event-details-bg: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --event-info-bg: rgba(255, 255, 255, 0.5);
    --event-description-bg: rgba(255, 255, 255, 0.5);
}

/* Overlay du popup */
.calendar-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh; /* Dynamic viewport height pour iOS */
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    overflow: hidden;
    overscroll-behavior: contain;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Container du calendrier */
.calendar-popup-container {
    position: relative;
    background-color: var(--calendar-bg);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    max-width: 1200px;
    width: 95%;
    max-height: 95vh;
    overflow-y: auto;
    overflow-x: hidden;
    animation: slideIn 0.3s ease;
}

/* Adapter le container sur grands écrans si le contenu tient */
@media (min-width: 1400px) and (min-height: 900px) {
    .calendar-popup-container {
        max-width: 1300px;
        max-height: 90vh;
    }
}

/* Wrapper pour disposition côte à côte */
.calendar-wrapper {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 40px;
    align-items: center;
}

/* Colonne de gauche (calendrier + boutons modération) */
.calendar-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-self: center;
    align-items: center;
    width: 100%;
}

@keyframes slideIn {
    from { 
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to { 
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Bouton de fermeture */
.calendar-close-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    z-index: 10003;
}

.calendar-close-btn:hover {
    background: #ee5a6f;
    transform: rotate(90deg);
}

/* Calendrier principal */
.calendar {
    width: 100%;
    max-width: 450px;
    background-color: var(--calendar-bg);
    font-family: "Montserrat", "Varela Round", sans-serif;
    font-weight: 600;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Header avec navigation */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 20px;
}

/* Boutons de navigation */
.calendar-nav-btn {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.calendar-nav-btn:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.calendar-nav-btn:active {
    transform: scale(0.95);
}

/* Titre mois/année */
.calendar-year {
    font-size: 28px;
    font-weight: 700;
    color: var(--calendar-text);
    text-align: center;
    text-transform: capitalize;
    flex: 1;
    user-select: none;
    min-width: 200px;
}

/* Grille du calendrier */
.calendar-content {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

/* Jours de la semaine */
.calendar-content > span {
    font-size: 14px;
    font-weight: 700;
    color: var(--calendar-text-secondary);
    text-align: center;
    padding: 10px 0;
}

/* Jours du mois */
.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background-color: var(--calendar-day-bg);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--calendar-text);
    user-select: none;
    min-height: 45px;
}

.calendar-day:not(.disabled):hover {
    background-color: #3498db;
    color: white;
    transform: scale(1.05);
}

.calendar-day.disabled {
    color: var(--calendar-day-disabled);
    cursor: default;
    opacity: 0.5;
}

.calendar-day.disabled:hover {
    background-color: var(--calendar-day-bg);
    transform: none;
}

.calendar-day.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.calendar-day.current:hover {
    transform: scale(1.05);
}

.calendar-day.today {
    border: 2px solid #e74c3c;
    font-weight: 700;
}

.calendar-day.has-events {
    position: relative;
    font-weight: 700;
}

.calendar-day.has-events::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: #3498db;
    border-radius: 50%;
}

.calendar-day.has-events.current::after {
    background-color: white;
}

/* Animation de changement de mois */
@keyframes slideLeft {
    from { 
        transform: translateX(100%);
        opacity: 0;
    }
    to { 
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideRight {
    from { 
        transform: translateX(-100%);
        opacity: 0;
    }
    to { 
        transform: translateX(0);
        opacity: 1;
    }
}

.calendar-content.slide-left {
    animation: slideLeft 0.3s ease;
}

.calendar-content.slide-right {
    animation: slideRight 0.3s ease;
}

/* ================================================
   DÉTAILS DE L'ÉVÉNEMENT (PANNEAU DROIT)
   ================================================ */

.event-details {
    background: var(--event-details-bg);
    border-radius: 15px;
    padding: 0 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 500px;
}

/* Affichage de la date */
.event-date-display {
    text-align: center;
    position: relative;
    margin-bottom: 20px;
}

.event-day-number {
    font-size: 120px;
    font-weight: 700;
    color: rgba(52, 152, 219, 0.3);
    line-height: 1;
    letter-spacing: -5px;
}

.event-month-name {
    font-size: 36px;
    font-weight: 700;
    color: var(--calendar-text);
    text-transform: capitalize;
    position: relative;
    margin-top: -35px;
    z-index: 1;
}

/* En-tête de l'événement avec icône d'édition */
.event-header-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
}

/* Titre de l'événement */
.event-title {
    font-size: 42px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    line-height: 1.2;
    flex: 1;
}

/* Icône d'édition (positionnée dans event-date-display) */
.event-edit-icon {
    position: absolute;
    top: 30px;
    right: 0;
    background: #667eea;
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    z-index: 10;
}

.event-edit-icon:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.event-edit-icon:active {
    transform: translateY(0);
}

.event-edit-icon svg {
    color: white;
    display: block;
}

/* Informations de l'événement */
.event-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.event-info-item {
    background: var(--event-info-bg);
    padding: 12px 10px;
    border-radius: 8px;
    font-size: 14px;
}

.event-info-item strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--calendar-text-secondary);
    margin-bottom: 5px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

.event-info-item span {
    color: var(--calendar-text);
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

/* Description de l'événement */
.event-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--calendar-text);
    text-align: justify;
    flex: 1;
    background: var(--event-description-bg);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.event-description p {
    margin: 0;
}

/* Centrage pour le message "Aucun événement" */
.event-description.no-event {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    text-align: center;
}

.event-description.no-event p {
    text-align: center;
}

.event-description ul {
    margin: 10px 0;
    padding-left: 20px;
}

/* Bouton d'inscription */
.event-registration {
    text-align: center;
}

.event-register-btn {
    padding: 16px 40px;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Montserrat", "Varela Round", sans-serif;
    width: 100%;
    max-width: 400px;
}

.event-register-btn.register {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.event-register-btn.register:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(46, 204, 113, 0.4);
}

.event-register-btn.unregister {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.event-register-btn.unregister:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.4);
}

.event-register-btn.full {
    background: #95a5a6;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

.event-register-btn:active:not(.full) {
    transform: translateY(0);
}

.event-register-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Bouton de visibilité (Admin) */
.event-visibility-btn {
    padding: 12px 30px;
    border: 2px solid #3498db;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Montserrat", "Varela Round", sans-serif;
    width: 100%;
    max-width: 400px;
    margin-top: 10px;
}

.event-visibility-btn.public {
    background: white;
    color: #3498db;
}

.event-visibility-btn.public:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.event-visibility-btn.staff-only {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
    border-color: #e67e22;
}

.event-visibility-btn.staff-only:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.4);
}

.event-visibility-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Zone de modération (sous le calendrier à gauche) */
.event-moderation {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    border: 2px dashed rgba(52, 152, 219, 0.3);
    width: 100%;
    max-width: 450px;
}

/* Bouton de visibilité (Admin) - version modération */
.event-moderation .event-visibility-btn {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* Bouton de suppression (Admin) */
.event-delete-btn {
    padding: 12px 30px;
    border: 2px solid #e74c3c;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Montserrat", "Varela Round", sans-serif;
    width: 100%;
    background: white;
    color: #e74c3c;
}

.event-delete-btn:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.event-delete-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Boutons d'action */
.event-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.event-btn {
    padding: 14px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Montserrat", "Varela Round", sans-serif;
    display: none; /* Masqué par défaut */
}

.event-btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.event-btn-secondary:hover {
    background-color: #7f8c8d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(127, 140, 141, 0.3);
}

.event-btn-primary {
    background-color: #3498db;
    color: white;
}

.event-btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.event-btn:active {
    transform: translateY(0);
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 1024px) {
    .calendar-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .event-details {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .calendar-popup-container {
        padding: 0;
        max-height: 100vh;
        max-height: 100dvh; /* Dynamic viewport height pour iOS */
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height pour iOS */
        border-radius: 0;
        width: 100%;
        max-width: 100%;
        overflow: hidden; /* Empêche tout scroll dans le container */
        display: flex; /* Important pour que le wrapper prenne toute la place */
        flex-direction: column;
        position: fixed; /* Fix iOS viewport issues */
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    /* Wrapper devient un slider horizontal */
    .calendar-wrapper {
        display: flex !important;
        flex-shrink: 0; /* Empêche le wrapper de rétrécir */
        height: 100%; /* Prend toute la hauteur du container */
        width: 200vw; /* 2x la largeur de l'écran pour 2 panels */
        flex: 1; /* Prend tout l'espace disponible */
        grid-template-columns: unset !important;
        gap: 0 !important;
        align-items: stretch !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: transform;
        overflow: hidden; /* Pas de scroll dans le wrapper */
        position: relative; /* Nécessaire pour le transform */
    }
    
    /* Quand on affiche l'event, on slide vers la gauche */
    .calendar-wrapper.show-event {
        transform: translateX(-50%);
        transform: translateX(-100vw); /* Plus précis que -50% */
    }
    
    /* Chaque colonne prend 50% de la largeur du wrapper (= 100vw) */
    .calendar-column {
        display: flex !important;
        flex-direction: column !important;
        flex: 0 0 100vw; /* Largeur fixe = 100% de l'écran */
        min-width: 100vw; /* Force la largeur */
        max-width: 100vw; /* Empêche le dépassement */
        height: 100%;
        overflow-y: auto; /* Scroll vertical si nécessaire */
        overflow-x: hidden; /* Pas de scroll horizontal */
        padding: 80px 15px 30px 15px;
        box-sizing: border-box;
        -webkit-overflow-scrolling: touch;
        gap: 20px;
        align-self: stretch !important;
        align-items: center;
        position: relative; /* Fix pour Safari iOS */
    }
    
    .event-details {
        display: flex !important;
        flex-direction: column !important;
        flex: 0 0 100vw; /* Largeur fixe = 100% de l'écran */
        min-width: 100vw; /* Force la largeur */
        max-width: 100vw; /* Empêche le dépassement */
        height: 100%;
        min-height: 0;
        overflow-y: auto; /* Scroll vertical si nécessaire */
        overflow-x: hidden; /* Pas de scroll horizontal */
        padding: 80px 20px 30px 20px;
        background: var(--event-details-bg);
        border-radius: 0;
        box-sizing: border-box;
        -webkit-overflow-scrolling: touch;
        gap: 20px;
        position: relative; /* Fix pour Safari iOS */
    }

    .calendar {
        width: 100%;
        max-width: 100%;
        padding: 10px;
        box-shadow: none;
    }

    .calendar-header {
        margin-bottom: 15px;
        gap: 15px;
    }

    .calendar-nav-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .calendar-year {
        font-size: 22px;
        min-width: auto;
    }

    .calendar-content {
        gap: 8px;
    }

    .calendar-content > span {
        font-size: 13px;
        font-weight: 600;
        padding: 10px 0;
    }

    .calendar-day {
        font-size: 16px;
        min-height: 50px;
        font-weight: 500;
    }
    
    .calendar-today-btn {
        margin-top: 20px;
        padding: 14px 24px;
        font-size: 16px;
    }

    .calendar-close-btn {
        position: fixed;
        top: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 28px;
        z-index: 10002;
        box-shadow: 0 4px 20px rgba(255, 71, 87, 0.5);
    }

    /* Styles déjà appliqués dans la section précédente */
    .event-date-display {
        margin-bottom: 20px;
    }
    
    .event-day-number {
        font-size: 72px;
    }

    .event-month-name {
        font-size: 24px;
        margin-top: -20px;
    }

    .event-title {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .event-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .event-info-item {
        grid-column: span 1 !important;
        padding: 12px;
    }

    .event-description {
        font-size: 15px;
        line-height: 1.6;
        padding: 20px;
        margin: 15px 0;
    }

    .event-actions {
        flex-direction: row;
        gap: 10px;
        margin-top: 20px;
    }

    .event-btn {
        flex: 1;
        padding: 14px 20px;
        font-size: 16px;
    }

    .event-register-btn {
        font-size: 17px;
        padding: 16px 30px;
        margin: 20px 0;
    }
}

/* ================================================
   BOUTON RETOUR MOBILE
   ================================================ */

.mobile-back-btn {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10002;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.5);
    line-height: 1;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.mobile-back-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.mobile-back-btn:active {
    transform: scale(0.9);
    background: #2980b9;
}

@media (max-width: 768px) {
    .mobile-back-btn {
        display: flex;
    }
}

/* ================================================
   SKELETON LOADER
   ================================================ */

.skeleton-loader {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        rgba(255, 255, 255, 0.1) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    pointer-events: none;
    position: relative;
    overflow: hidden;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.calendar-grid.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* ================================================
   BOUTON "AUJOURD'HUI"
   ================================================ */

.calendar-today-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 15px auto;
}

.calendar-today-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.calendar-today-btn:active {
    transform: translateY(0);
}

.calendar-today-btn::before {
    content: '📅';
    font-size: 16px;
}

/* ================================================
   ANIMATIONS FLUIDES
   ================================================ */

/* Animation de transition pour les jours */
.calendar-day {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.calendar-day:hover {
    transform: scale(1.05);
}

/* Animation de slide pour le changement de mois */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.calendar-grid.slide-left {
    animation: slideInLeft 0.3s ease;
}

.calendar-grid.slide-right {
    animation: slideInRight 0.3s ease;
}

/* ================================================
   RESPONSIVE MOBILE - AMÉLIORATIONS
   ================================================ */

/* Support du swipe (indicateur visuel) */
@media (max-width: 768px) {
    .calendar-popup-container {
        padding: 20px;
        border-radius: 15px;
    }
    
    .calendar-grid {
        touch-action: pan-y;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }
    
    /* Indicateur de swipe */
    .calendar-header::after {
        content: '← Swipe →';
        display: block;
        text-align: center;
        font-size: 11px;
        color: var(--calendar-text-secondary);
        opacity: 0.5;
        margin-top: 5px;
        font-style: italic;
    }
    
    .calendar-today-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ================================================
   MODAL CRÉATION RAPIDE D'ÉVÉNEMENT
   ================================================ */

.quick-event-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 100000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}

.quick-event-modal-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    padding: 30px;
    max-width: 550px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUpFadeIn 0.3s ease;
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quick-event-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    transition: all 0.2s;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-event-close-btn:hover {
    background: #f5f5f5;
    color: #e74c3c;
    transform: rotate(90deg);
}

.quick-event-title {
    margin: 0 0 25px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    padding-right: 40px;
}

.quick-form-group {
    margin-bottom: 20px;
}

.quick-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
    font-size: 14px;
}

.quick-form-group input[type="text"],
.quick-form-group input[type="date"],
.quick-form-group input[type="time"],
.quick-form-group select,
.quick-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    box-sizing: border-box;
}

.quick-form-group input:focus,
.quick-form-group select:focus,
.quick-form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.quick-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.quick-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.quick-form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.quick-form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.quick-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.quick-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.quick-btn-cancel {
    background: #ecf0f1;
    color: #7f8c8d;
}

.quick-btn-cancel:hover {
    background: #d5dbdb;
    color: #5d6d7e;
}

.quick-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.quick-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.quick-btn-primary:active {
    transform: translateY(0);
}

/* Bouton retour mobile */
.mobile-back-btn {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 24px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.mobile-back-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .mobile-back-btn {
        display: flex;
    }
}

/* Responsive mobile */
@media (max-width: 768px) {
    .quick-event-modal-content {
        width: 95%;
        padding: 20px;
        max-height: 95vh;
    }
    
    .quick-event-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .quick-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .quick-form-actions {
        flex-direction: column;
    }
    
    .quick-btn {
        width: 100%;
    }
}