/* assets/styles/toast.css - VERSION AMÉLIORÉE */
#toast-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    pointer-events: none;
}

/* TOAST CLASSIQUE (messages simples) */
.toast {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-left: 5px solid;
    min-width: 300px;
    max-width: 500px;
    text-align: center;
    position: relative;
    pointer-events: all;
    animation: toastSlideIn 0.4s ease-out;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* TOAST DE VICTOIRE (grand et centré) */
.toast.win {
    min-width: 500px;
    max-width: 600px;
    padding: 0;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    box-shadow: 0 20px 50px rgba(39, 174, 96, 0.4);
    animation: winToastAppear 0.6s ease-out;
}

.toast-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 2rem;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.toast-header h2 {
    margin: 0;
    font-size: 2.2rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.toast.win .toast-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid white;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.toast.win .toast-close:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

.toast.win .toast-content {
    padding: 2.5rem;
    text-align: center;
}

.toast.win .toast-content p {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: white;
}

.prize-display {
    font-size: 2rem;
    font-weight: bold;
    color: #f1c40f;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    margin: 1rem 0;
}

.toast-actions {
    padding: 0 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-print {
    padding: 15px 30px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.btn-print:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
}

.btn-dismiss {
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 25px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-dismiss:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* COULEURS STANDARD */
.toast.success {
    border-left-color: #27ae60;
    background: linear-gradient(135deg, #2c3e50, #27ae60);
}

.toast.info {
    border-left-color: #3498db;
    background: linear-gradient(135deg, #2c3e50, #3498db);
}

.toast.warning {
    border-left-color: #f39c12;
    background: linear-gradient(135deg, #2c3e50, #f39c12);
    color: #2c3e50;
}

.toast.danger {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, #2c3e50, #e74c3c);
}

/* CONTENU STANDARD */
.toast-content {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.toast-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: scale(1.1);
}

.toast.warning .toast-close {
    color: #2c3e50;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 15px 15px;
    animation: toastProgress 30s linear forwards;
}

.toast.success .toast-progress {
    background: #27ae60;
}

.toast.info .toast-progress {
    background: #3498db;
}

.toast.warning .toast-progress {
    background: #f39c12;
}

.toast.danger .toast-progress {
    background: #e74c3c;
}

.toast.win .toast-progress {
    background: #f1c40f;
    height: 5px;
}

/* ANIMATIONS */
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes winToastAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .toast {
        min-width: 250px;
        max-width: 90%;
        margin: 1rem;
        padding: 1.2rem 1.5rem;
    }
    
    .toast.win {
        min-width: 90%;
        max-width: 95%;
    }
    
    .toast-header h2 {
        font-size: 1.8rem;
    }
    
    .toast.win .toast-content {
        padding: 1.5rem;
    }
    
    .prize-display {
        font-size: 1.5rem;
        padding: 1rem;
    }
    
    .toast-actions {
        padding: 0 1.5rem 1.5rem;
    }
    
    .btn-print,
    .btn-dismiss {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

/* FORMULAIRE TÉLÉPHONE COMPACT */
.toast.phone-input.compact {
    min-width: 380px;
    max-width: 420px;
    padding: 0;
}

.toast-header.compact {
    padding: 1.2rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-header.compact h2 {
    font-size: 1.4rem;
    margin: 0;
    color: white;
}

.toast-content.compact {
    padding: 1.5rem;
}

.compact-text {
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    text-align: center;
    color: #ecf0f1;
}

/* Pays compact */
.country-selector.compact {
    margin-bottom: 1rem;
    text-align: center;
}

.country-selector.compact label {
    display: block;
    margin-bottom: 0.4rem;
    color: #bdc3c7;
    font-size: 0.9rem;
}

#country-select {
    padding: 8px 12px;
    border: 2px solid #3498db;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    color: #2c3e50;
    font-size: 0.9rem;
    cursor: pointer;
    width: 100%;
    max-width: 180px;
}

/* Groupe téléphone compact */
.phone-input-group.compact {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    border: 2px solid #3498db;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
}

.country-code.compact {
    padding: 10px 12px;
    background: #34495e;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    min-width: 70px;
    text-align: center;
    border-right: 2px solid #3498db;
}

.phone-field.compact {
    flex: 1;
    padding: 10px 12px;
    font-size: 1rem;
    border: none;
    background: transparent;
    color: #2c3e50;
    cursor: pointer;
}

.phone-field.compact:focus {
    outline: none;
}

.phone-hint.compact {
    font-size: 0.8rem;
    color: #95a5a6;
    text-align: center;
    margin-bottom: 1rem;
    font-style: italic;
}

/* Actions compact */
.phone-actions {
    text-align: center;
}

.btn-validate-phone.compact {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.8rem;
}

.btn-validate-phone.compact:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

.btn-validate-phone.compact:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.phone-error.compact {
    color: #e74c3c;
    font-size: 0.85rem;
    text-align: center;
    padding: 8px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 5px;
    display: none;
}

/* Indication visuelle que le champ est cliquable */
.phone-field.compact {
    position: relative;
}

.phone-field.compact::after {
    content: "⌨️";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive pour le formulaire compact */
@media (max-width: 480px) {
    .toast.phone-input.compact {
        min-width: 90%;
        max-width: 95%;
        margin: 1rem;
    }
    
    .toast-content.compact {
        padding: 1rem;
    }
    
    .phone-input-group.compact {
        flex-direction: column;
    }
    
    .country-code.compact {
        border-right: none;
        border-bottom: 2px solid #3498db;
        width: 100%;
    }
    
    .phone-field.compact::after {
        display: none;
    }
}


/* AJOUTS POUR LE TOAST DE PERTE */
    .toast.lose {
        min-width: 500px;
        max-width: 600px;
        padding: 0;
        border: none;
        border-radius: 20px;
        overflow: hidden;
        background: linear-gradient(135deg, #7f8c8d, #95a5a6);
        box-shadow: 0 20px 50px rgba(127, 140, 141, 0.4);
        animation: winToastAppear 0.6s ease-out;
    }

    .toast.lose .toast-header {
        background: rgba(0, 0, 0, 0.3);
    }

    .toast.lose .toast-header h2 {
        color: #ecf0f1;
    }

    .segment-display {
        font-size: 1.8rem;
        font-weight: bold;
        color: #e74c3c;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        background: rgba(0, 0, 0, 0.2);
        padding: 1.2rem;
        border-radius: 12px;
        border: 2px dashed rgba(255, 255, 255, 0.2);
        margin: 1rem 0;
    }

    .lose-message {
        font-size: 1.1rem;
        color: #ecf0f1;
        margin-top: 1rem;
        font-style: italic;
    }

    .btn-retry-later {
        width: 100%;
        padding: 15px 30px;
        background: linear-gradient(135deg, #e74c3c, #c0392b);
        border: none;
        border-radius: 25px;
        color: white;
        font-size: 1.1rem;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    }

    .btn-retry-later:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
    }

    /* BOUTONS DE RÉESSAI IMMÉDIAT */
    .btn-retry, .btn-cancel {
        padding: 10px 20px;
        margin: 5px;
        border: none;
        border-radius: 8px;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .btn-retry {
        background: linear-gradient(135deg, #3498db, #2980b9);
        color: white;
    }

    .btn-retry:hover {
        background: linear-gradient(135deg, #2980b9, #21618c);
    }

    .btn-cancel {
        background: linear-gradient(135deg, #95a5a6, #7f8c8d);
        color: white;
    }

    .btn-cancel:hover {
        background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    }

