/* Styles généraux */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #c41e3a 0%, #165B33 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* Animation 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: rgba(255, 255, 255, 0.8);
    font-size: 1em;
    animation: fall linear infinite;
    user-select: none;
}

@keyframes fall {
    to {
        transform: translateY(100vh);
    }
}

.snowflake:nth-child(odd) {
    animation-duration: 10s;
    animation-delay: 0s;
}

.snowflake:nth-child(even) {
    animation-duration: 15s;
    animation-delay: 2s;
}

.snowflake:nth-child(3n) {
    animation-duration: 12s;
    animation-delay: 4s;
    font-size: 1.5em;
}

.snowflake:nth-child(4n) {
    animation-duration: 18s;
    animation-delay: 1s;
    font-size: 0.8em;
}

.snowflake:nth-child(5n) {
    animation-duration: 14s;
    animation-delay: 3s;
}


/* Boules de Noël animées */
.ornament {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    animation: swing 3s ease-in-out infinite;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.ornament::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 15px;
    background: #8B7355;
    border-radius: 2px;
}

.ornament-1 {
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #c41e3a);
    top: -20px;
    left: -20px;
    animation-delay: 0s;
}

.ornament-2 {
    background: radial-gradient(circle at 30% 30%, #ffd700, #ff8c00);
    top: -20px;
    left: 46%;
    animation-delay: 1s;
}

.ornament-3 {
    background: radial-gradient(circle at 30% 30%, #98FB98, #165B33);
    top: -20px;
    right: -25px;
    animation-delay: 2s;
}

@keyframes swing {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Conteneurs */
.container, .reveal-container, .gift-ideas-container, .login-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
    z-index: 10;
}

.login-container {
    max-width: 400px;
    text-align: center;
    margin: 100px auto;
}

.login-container h1 {
    margin-bottom: 30px;
    color: #c41e3a;
}

.login-container input {
    width: 100%;
    padding: 15px;
    margin: 15px 0;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

/* En-têtes */
h1 {
    color: #c41e3a;
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

h2 {
    color: #165B33;
    margin: 25px 0 15px 0;
    font-size: 1.8em;
}

h3 {
    color: #c41e3a;
    margin: 20px 0 10px 0;
}

/* Alertes */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background: #c41e3a;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn:hover {
    background: #a01828;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: #165B33;
}

.btn-secondary:hover {
    background: #0d4023;
}

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

/* Administration */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #165B33;
}

.admin-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.family-card {
    background: #fff;
    border: 3px solid #165B33;
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Formulaires */
.form-inline {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-group {
    margin: 15px 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea,
select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    width: 100%;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #c41e3a;
}

.form-inline input,
.form-inline select {
    flex: 1;
    min-width: 200px;
}

.participant-form input {
    flex: 1;
}

input[type="file"] {
    border: 2px dashed #ddd;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
}

input[type="file"]:hover {
    border-color: #c41e3a;
    background: #fff5f5;
}

/* Tableau des participants */
.participants-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.participants-table thead {
    background: #165B33;
    color: white;
}

.participants-table th,
.participants-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}



.link-input {
    font-size: 12px;
    padding: 6px;
    width: 100%;
}

/* Exclusions */
.exclusions-list {
    margin-top: 15px;
}

.exclusion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    margin: 8px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Section tirage */
.draw-section {
    text-align: center;
    margin: 30px 0;
    padding: 30px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border-radius: 12px;
}

/* Page de révélation */
.reveal-container {
    text-align: center;
    max-width: 800px;
}

.reveal-title {
    font-size: 3em;
    color: #c41e3a;
    margin-bottom: 10px;
}

.reveal-subtitle {
    font-size: 1.5em;
    color: #165B33;
    margin-bottom: 30px;
}

.reveal-box {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    padding: 40px;
    border-radius: 20px;
    margin: 30px 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    animation: revealPulse 2s ease-in-out infinite;
}

@keyframes revealPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.reveal-box h2 {
    color: white;
    margin-bottom: 20px;
}

.assigned-person {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
}

.person-name {
    font-size: 2.5em;
    font-weight: bold;
    color: #c41e3a;
    text-transform: uppercase;
}

/* Idées cadeaux */
.gift-ideas-section,
.my-ideas-section {
    margin: 30px 0;
}

.gift-ideas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.gift-idea-card {
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.gift-idea-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border-color: #c41e3a;
}

.my-gift-card {
    border-color: #165B33;
}

.my-gift-card:hover {
    border-color: #0d4023;
}

.gift-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.gift-description {
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
}

.gift-link {
    display: inline-block;
    color: #c41e3a;
    text-decoration: none;
    font-weight: 600;
    margin-top: 10px;
}

.gift-link:hover {
    text-decoration: underline;
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: background 0.3s;
}

.btn-delete:hover {
    background: #c82333;
}

/* Sections d'information */
.info-box {
    background: #e7f3ff;
    border: 2px solid #2196F3;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    text-align: center;
}

.info-box p {
    margin: 10px 0;
    font-size: 1.1em;
}

.info-text {
    text-align: center;
    color: #666;
    font-size: 1.1em;
    margin: 15px 0;
}

.subtitle {
    text-align: center;
    color: #165B33;
    font-size: 1.3em;
    margin: 10px 0 20px 0;
}

/* Formulaire d'ajout de cadeau */
.add-gift-form {
    background: #f0f8f0;
    border: 2px solid #165B33;
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
}

/* Section actions */
.actions-section {
    text-align: center;
    margin: 40px 0;
}

/* Message footer */
.footer-message {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.footer-message p {
    margin: 10px 0;
    font-size: 1.2em;
    color: #165B33;
}

/* Responsive */
@media (max-width: 768px) {
    .container, .reveal-container, .gift-ideas-container {
        margin: 20px;
        padding: 20px;
    }
    
    .reveal-title {
        font-size: 2em;
    }
    
    .person-name {
        font-size: 1.8em;
    }
    
    .gift-ideas-grid {
        grid-template-columns: 1fr;
    }
    
    .form-inline, .form-row {
        flex-direction: column;
    }
    
    .participants-table {
        font-size: 14px;
    }
    
    .participants-table th,
    .participants-table td {
        padding: 8px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .ornament {
        width: 40px;
        height: 40px;
    }
}