/* Style de la boîte cadeau */
#ecc_box {
    width: 200px;
    height: 200px;
    background-color: #154782;
    margin: 0 auto;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    text-align: center;
    cursor: pointer;
    transform-style: preserve-3d;
}

/* Ruban de la boîte cadeau */
#ecc_box::before, #ecc_box::after {
    content: '';
    position: absolute;
    background-color: #197df3;
}

#ecc_box::before {
    width: 100%;
    height: 20px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

#ecc_box::after {
    width: 20px;
    height: 100%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Animation de secousse */
@keyframes shake {
    0% { transform: rotate(0deg) translateX(0); }
    25% { transform: rotate(-5deg) translateX(-10px); }
    50% { transform: rotate(5deg) translateX(10px); }
    75% { transform: rotate(-5deg) translateX(-10px); }
    100% { transform: rotate(0deg) translateX(0); }
}

.ecc_shake {
    animation: shake 0.5s infinite;
}

/* Animation d'ouverture */
@keyframes open {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1.5); opacity: 0; }
}

.ecc_open {
    animation: open 1s forwards;
}

/* Style de l'image résultat */
#ecc_result_image {
	display: none;
	margin-left: auto;
	margin-right: auto;
	width: 25%;
    height: auto;
    margin-top: -200px;
    animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Style du décompte */
#ecc_countdown {
	visibility: hidden;
    font-size: 36px;
    font-weight: bold;
    color: #2a9d8f;
}
/* --------------------------------------------------------------------- */
/* Style du formulaire */
#ecc_form {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#ecc_form label {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

#ecc_form input[type="text"] {
    width: 80%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}
#ecc_form input[type="tel"] {
    width: 80%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}


#ecc_form input[type="submit"] {
    background-color: #1d589e;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#ecc_form input[type="submit"]:hover {
    background-color: #154782;
}

/* Style du conteneur principal */
#ecc_container {
    text-align: center;
    padding: 20px;
}

/* Styles pour les tableaux de statistiques */
.event-code-stats-simple {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stats-table, .gagnants-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stats-table th, .stats-table td,
.gagnants-table th, .gagnants-table td {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.stats-table th, .gagnants-table th {
    background-color: #1d589e;
    color: white;
    font-weight: normal;
}

.stats-table tr:nth-child(even),
.gagnants-table tr:nth-child(even) {
    background-color: #f5f8fa;
}

.stats-table tr:hover,
.gagnants-table tr:hover {
    background-color: #e9f2fb;
}

/* Style spécifique pour la ligne des gagnants */
.stats-table tr.highlight-row {
    background-color: #e3f2fd;
    font-weight: bold;
}

.stats-table tr.highlight-row:hover {
    background-color: #bbdefb;
}

/* Style pour les titres */
.event-code-stats-simple h2 {
    color: #154782;
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #197df3;
}

/* Style pour le message "Aucun gagnant" */
.gagnants-table td[colspan] {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* Animation de fondu pour le chargement */
@keyframes fadeInTable {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stats-table, .gagnants-table {
    animation: fadeInTable 0.5s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-table, .gagnants-table {
        display: block;
        overflow-x: auto;
    }
    
    .event-code-stats-simple {
        padding: 10px;
    }
    
    .stats-table th, .stats-table td,
    .gagnants-table th, .gagnants-table td {
        padding: 8px 10px;
    }
}

.event-code-stats-simple h4 {
    color: #000000; /* Noir */
    text-align: center;
    font-family: inherit;
    margin: 25px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #197df3;
    font-weight: 600;
}

.event-code-stats-simple h4 {
    font-size: 1.2em;
    margin: 20px 0 10px 0;
}
#chocolaterie-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

.chocolaterie-drop {
    position: absolute;
    animation-name: falling;
    animation-timing-function: linear;
    animation-iteration-count: 1;
}

@keyframes falling {
    0% {
        transform: translateY(-100px) rotate(0deg);
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
    }
}