/* Styles pour la gestion des cookies - GDN Lab (style Alarme PPMS) */

/* Modal cookies avec z-index élevé */
#cookie_management_modal,
#cookie_management_detail_modal {
    z-index: 1060;
}

/* Style pour l'ouverture automatique de la modale */
#cookie_management_modal.show {
    display: block !important;
}

/* Style compact comme alarme-ppms */
#cookie_management_modal .modal-content,
#cookie_management_detail_modal .modal-content {
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    border: none !important;
}

/* Typography plus compacte */
#cookie_management_modal .modal-body,
#cookie_management_detail_modal .modal-body {
    padding: 1rem 1.5rem !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
}

#cookie_management_modal .modal-header,
#cookie_management_detail_modal .modal-header {
    padding: 1rem 1.5rem 1.5rem !important;
}

#cookie_management_modal .modal-footer,
#cookie_management_detail_modal .modal-footer {
    padding: 0.5rem 1.5rem 1rem !important;
}

/* Boutons style alarme-ppms */
#cookie_management_modal .btn,
#cookie_management_detail_modal .btn {
    border-radius: 30px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    outline: none;
    border: 1px solid transparent;
}

/* Bouton vert "Tout accepter" */
button[name="accept_all"] {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;

    color: white !important;
    font-size: 0.9rem !important;
}

button[name="accept_all"]:hover {
    background-color: #181515 !important;
    border-color: #181515 !important;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Bouton "Gestion des cookies" */
#btn_manage_cookies {
    border-color: #ccc !important;
    color: #666 !important;
    background-color: white !important;
    font-size: 0.9rem !important;
}

#btn_manage_cookies:hover {
    background-color: #f8f9fa !important;
    border-color: #999 !important;
    color: #333 !important;
}

/* Bouton "Continuer sans accepter" style cookie-pps.png */
button[name="refuse_all"] {
    background: white !important;

    color: #666 !important;
    text-decoration: none !important;
    font-size: 0.85rem !important;
    padding: 0.25rem 0.75rem !important;
    border:none;
    top: 1.2rem!important;
}

button[name="refuse_all"]:hover {
    background-color: #f8f9fa !important;

    color: #333 !important;
}

/* Styles pour les cartes de cookies */
.cookies_block .card {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.cookies_block .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Badge recommandé */
.badge.bg-primary {
    background: linear-gradient(45deg, #0d6efd, #0b5ed7) !important;
}

/* Switches avec style GDN */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-input:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Animation pour les détails cookies personnalisés */
.cookies-details {
    transition: all 0.3s ease;
    max-height: 1000px;
    overflow: hidden;
    opacity: 1;
}

.cookies-details.hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

/* Style pour les liens */
.text-primary {
    color: #0d6efd !important;
    text-decoration: none;
}

.text-primary:hover {
    color: #0b5ed7 !important;
    text-decoration: underline;
}

/* Responsive pour mobile */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        width: 100%;
    }

    .d-flex.justify-content-end.gap-2 {
        flex-direction: column !important;
    }
}

/* Animation d'entrée pour la modale */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal.fade.show .modal-dialog {
    animation: modalSlideIn 0.3s ease-out;
}

/* Style pour les badges de statut */
.badge {
    font-size: 0.75em;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

/* Amélioration visuelle des form-switch */
.form-switch .form-check-input {
    width: 2.5em;
    height: 1.25em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280,0,0,0.25%29'/%3e%3c/svg%3e");
}

.form-switch .form-check-input:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28255,255,255,1.0%29'/%3e%3c/svg%3e");
}

/* Bordure colorée pour les cartes importantes */
.card.border-primary {
    border-left: 4px solid #0d6efd !important;
}

/* Style pour les boutons toggle personnalisés */
.cookies-toggle-btn {
    border: none !important;
    background: none !important;
    font-size: 0.875rem;
    padding: 0.25rem 0;
    color: #0d6efd;
    cursor: pointer;
    text-decoration: none;
}

.cookies-toggle-btn:hover {
    text-decoration: underline !important;
    color: #0b5ed7;
}

/* Loading state pour les boutons de soumission */
.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Amélioration de l'accessibilité */
.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Style dark mode ready */
@media (prefers-color-scheme: dark) {
    .modal-content {
        background-color: #ffffff;
        color: #111111;
    }

    .text-muted {
        color: #6c757d !important;
    }

    .border {
        border-color: #495057 !important;
    }
}

.btn{
    border-radius: 30px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    outline: none;
    border: 1px solid transparent;
}


.btn.btn-primary{
    background: #181515;
    color: #ffffff;
}