* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
    position: relative;
}

/* Flocons de neige */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: #fff;
    font-size: 1.5em;
    animation: fall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Header */
header {
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 10;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.5), 0 0 40px rgba(255, 0, 0, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(255, 0, 0, 0.5), 0 0 40px rgba(255, 0, 0, 0.3);
    }
    to {
        text-shadow: 0 0 30px rgba(255, 0, 0, 0.8), 0 0 60px rgba(255, 0, 0, 0.5);
    }
}

/* Compteur */
.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.countdown-box {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    border-radius: 15px;
    padding: 1.5rem 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.1);
    min-width: 120px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.countdown-number {
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.countdown-label {
    font-size: 1rem;
    text-align: center;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.countdown-separator {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffd700;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Section événements */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

/* Formulaire d'ajout */
.add-event-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.add-event-form input {
    flex: 1;
    min-width: 150px;
    padding: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s;
}

.add-event-form input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.add-event-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#add-event-btn {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
}

#add-event-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.6);
}

#add-event-btn:active {
    transform: translateY(0);
}

/* Liste des événements - Style liste de tournée */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.event-item {
    background: rgba(255, 255, 255, 0.05);
    border-left: 6px solid #ffd700;
    border-radius: 10px;
    padding: 2.5rem 3rem;
    animation: slideIn 0.5s ease-out;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.event-item:hover {
    transform: translateX(10px);
    box-shadow: 0 6px 30px rgba(255, 215, 0, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.event-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-title {
    font-size: 3.5rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    margin: 0;
}

.event-date-time {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

.event-item.past {
    opacity: 0.5;
    border-left-color: rgba(255, 215, 0, 0.4);
}

.event-item.past .event-title {
    color: rgba(255, 215, 0, 0.6);
}

.delete-btn {
    display: none;
}

/* Panneau d'administration */
.admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.admin-panel.active {
    display: flex;
}

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

.admin-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 215, 0, 0.3);
    position: relative;
    box-sizing: border-box;
}

.admin-content h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.close-admin-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(255, 68, 68, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
}

.close-admin-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.6);
}

/* Liste des événements dans l'admin */
.admin-events-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.admin-event-item {
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid #ffd700;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.admin-event-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.admin-event-item.past {
    opacity: 0.6;
    border-left-color: rgba(255, 215, 0, 0.4);
}

.admin-event-info {
    flex: 1;
}

.admin-event-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 0.3rem;
}

.admin-event-date-time {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.admin-delete-btn {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(255, 68, 68, 0.4);
    white-space: nowrap;
}

.admin-delete-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.6);
}

.delete-btn-text {
    display: inline;
}

/* Masquer le texte sur mobile */
@media (max-width: 768px) {
    .delete-btn-text {
        display: none;
    }
    
    .admin-delete-btn {
        padding: 0.5rem;
        min-width: 40px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Décorations animées */
.decorations {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 15;
}

.santa, .elf, .gift, .candy-cane {
    position: absolute;
    font-size: 3rem;
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

.santa {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.santa.clickable {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 1000 !important;
    position: absolute !important;
    will-change: transform;
}

.santa.clickable:hover {
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
    animation-play-state: paused;
}

.elf {
    top: 20%;
    right: 5%;
    animation-delay: 1.5s;
}

.gift {
    bottom: 15%;
    left: 10%;
    animation-delay: 3s;
}

.candy-cane {
    bottom: 25%;
    right: 8%;
    animation-delay: 4.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(-10px) rotate(-5deg);
    }
    75% {
        transform: translateY(-15px) rotate(3deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 1.5rem 1rem;
    }
    
    header h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .countdown-container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .countdown-box {
        min-width: 70px;
        padding: 1rem 1rem;
    }
    
    .countdown-number {
        font-size: 1.8rem;
    }
    
    .countdown-label {
        font-size: 0.8rem;
    }
    
    .countdown-separator {
        font-size: 1.5rem;
    }
    
    main {
        padding: 2rem 1rem;
    }
    
    .add-event-form {
        flex-direction: column;
    }
    
    .add-event-form input,
    #add-event-btn {
        width: 100%;
    }
    
    .event-title {
        font-size: 2rem;
    }
    
    .event-date-time {
        font-size: 1.3rem;
    }
    
    .event-item {
        padding: 1.5rem 1.5rem;
    }
    
    .admin-content {
        padding: 1.5rem;
        max-width: 95%;
        margin: 1rem;
    }
    
    .admin-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .admin-events-list {
        max-height: 50vh;
        padding: 0.75rem;
    }
    
    .admin-event-item {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .admin-event-title {
        font-size: 1rem;
    }
    
    .admin-event-date-time {
        font-size: 0.8rem;
    }
    
    .santa, .elf, .gift, .candy-cane {
        font-size: 2rem;
    }
}

/* Très petits écrans (360px et moins) */
@media (max-width: 360px) {
    header {
        padding: 1rem 0.5rem;
    }
    
    header h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .countdown-box {
        min-width: 60px;
        padding: 0.75rem 0.5rem;
    }
    
    .countdown-number {
        font-size: 1.5rem;
    }
    
    .countdown-label {
        font-size: 0.7rem;
    }
    
    .countdown-separator {
        font-size: 1.2rem;
    }
    
    main {
        padding: 1.5rem 0.5rem;
    }
    
    .event-title {
        font-size: 1.5rem;
    }
    
    .event-date-time {
        font-size: 1rem;
    }
    
    .event-item {
        padding: 1rem 1rem;
    }
    
    .admin-content {
        padding: 1rem;
        max-width: 100%;
        margin: 0.5rem;
        border-radius: 15px;
    }
    
    .admin-content h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .close-admin-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .add-event-form {
        gap: 0.75rem;
    }
    
    .add-event-form input {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    #add-event-btn {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .admin-events-list {
        max-height: 45vh;
        padding: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .admin-event-item {
        padding: 0.6rem 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .admin-event-title {
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
    }
    
    .admin-event-date-time {
        font-size: 0.75rem;
    }
    
    .admin-delete-btn {
        padding: 0.4rem;
        min-width: 35px;
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .santa, .elf, .gift, .candy-cane {
        font-size: 1.5rem;
    }
}

