/*======================
  Import global styles
======================*/
/* @import url('global.css');
@import url('header.css');
@import url('footer.css'); */

/* Variables CSS pour la modale */
:root {
    --privacy-modal-z-index: 9999;
    --privacy-modal-backdrop: rgba(0, 0, 0, 0.6);
    --privacy-modal-bg: #FFFFEB;
    --vert-texte: #003833;
    --vert-menu: #006633;
    --vert-souscription: #A4EBA8;
    --texte-noir: #323232;
    --jaune: #FFFB92;
    --violet: #E3D3F1;
    --privacy-modal-border-radius: 16px;
    --privacy-modal-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    --privacy-modal-max-width: 800px;
    --privacy-modal-max-height: 90vh;
    --privacy-modal-padding: 32px;
    --privacy-modal-header-height: 80px;
    --privacy-modal-footer-height: 100px;
}

/* Modale principale */
.privacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--privacy-modal-z-index);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.privacy-modal--open {
    opacity: 1;
    visibility: visible;
}

/* Overlay de fond */
.privacy-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--privacy-modal-backdrop);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* Contenu de la modale */
.privacy-modal__content {
    position: relative;
    background: var(--privacy-modal-bg);
    border-radius: var(--privacy-modal-border-radius);
    box-shadow: var(--privacy-modal-shadow);
    width: 90%;
    max-width: var(--privacy-modal-max-width);
    max-height: var(--privacy-modal-max-height);
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.privacy-modal--open .privacy-modal__content {
    transform: scale(1) translateY(0);
}

/* Header de la modale */
.privacy-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--privacy-modal-padding);
    height: var(--privacy-modal-header-height);
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.privacy-modal__title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.2;
}

.privacy-modal__close {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--texte-noir);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.privacy-modal__close:hover {
    background: var(--violet);
    color: var(--texte-noir);
}

.privacy-modal__close:focus {
    outline: 2px solid var(--jaune);
    outline-offset: 2px;
}

/* Corps de la modale */
.privacy-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: var(--privacy-modal-padding);
    line-height: 1.6;
}

/* Scrollbar personnalisée */
.privacy-modal__body::-webkit-scrollbar {
    width: 8px;
}

.privacy-modal__body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.privacy-modal__body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.privacy-modal__body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Amélioration du scroll sur mobile */
@media (max-width: 768px) {
    .privacy-modal__body {
        -webkit-overflow-scrolling: touch; /* Scroll fluide sur iOS */
        scroll-behavior: smooth;
    }
    
    .privacy-modal__body::-webkit-scrollbar {
        width: 4px; /* Scrollbar plus fine sur mobile */
    }
}

/* Métadonnées */
.privacy-modal__meta {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--jaune);
    border-radius: 12px;
    border-left: 4px solid #8b5cf6;
    text-align: center;
}

.privacy-modal__date {
    color: #7c3aed;
    font-size: 14px;
    margin: 0;
    font-weight: 600;
}

/* Introduction */
.privacy-modal__intro {
    margin-bottom: 32px;
    padding: 24px;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.privacy-modal__intro p {
    margin: 0 0 12px 0;
    color: #4b5563;
    line-height: 1.5;
}

.privacy-modal__intro p:last-child {
    margin-bottom: 0;
}

/* Sections */
.privacy-modal__section {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--privacy-modal-bg);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.privacy-modal__section:last-child {
    margin-bottom: 0;
}

.privacy-modal__section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.privacy-modal__section-title::before {
    content: "";
    font-size: 18px;
}

.privacy-modal__subsection-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin: 20px 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #d1d5db;
}

/* Listes */
.privacy-modal__list {
    margin: 16px 0;
    padding-left: 20px;
}

.privacy-modal__list li {
    margin-bottom: 8px;
    color: #4b5563;
    line-height: 1.5;
}

.privacy-modal__list li:last-child {
    margin-bottom: 0;
}

/* Mise en évidence */
.privacy-modal__highlight {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border-left: 3px solid #3b82f6;
}

.privacy-modal__highlight p {
    margin: 0 0 12px 0;
    color: #1e40af;
    line-height: 1.5;
}

.privacy-modal__highlight p:last-child {
    margin-bottom: 0;
}

/* Liens */
.privacy-modal__link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.privacy-modal__link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.privacy-modal__link:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Contact */
.privacy-modal__contact {
    margin: 16px 0 0 0 !important;
    padding: 12px 16px;
    background: var(--vert-souscription);
    border-radius: 8px;
    border-left: 3px solid var(--jaune);
    max-width: 60%;
}

/* Footer de la modale */
.privacy-modal__footer {
    display: flex;
    gap: 16px;
    padding: 0 var(--privacy-modal-padding);
    height: var(--privacy-modal-footer-height);
    align-items: center;
    justify-content: flex-end;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

/* Boutons */
.privacy-modal__button {
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 120px;
}

.privacy-modal__button--primary {
    background: var(--vert-menu);
    color: white;
}


.privacy-modal__button--secondary {
    background: var(--vert-menu);
    color: white;
    border: 1px solid #d1d5db;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --privacy-modal-padding: 24px;
        --privacy-modal-header-height: 70px;
        --privacy-modal-footer-height: 90px;
    }

    .privacy-modal__content {
        width: 95%;
        margin: 20px;
        max-height: calc(100vh - 40px);
        height: calc(100vh - 40px); /* Forcer la hauteur */
    }

    .privacy-modal__title {
        font-size: 20px;
    }

    .privacy-modal__section-title {
        font-size: 18px;
    }

    .privacy-modal__body {
        max-height: calc(100vh - 200px); /* Réserver l'espace pour header + footer */
        overflow-y: auto; /* Forcer le scroll si nécessaire */
    }

    .privacy-modal__footer {
        flex-direction: column;
        gap: 12px;
        height: auto;
        padding: 20px var(--privacy-modal-padding);
    }

    .privacy-modal__button {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 575px) {
    :root {
        --privacy-modal-padding: 20px;
    }

    .privacy-modal__content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
        height: 100vh; /* Forcer la hauteur complète */
        margin-bottom: 80px;
    }

    .privacy-modal__header {
        padding: 0 20px;
        height: 60px; /* Réduire la hauteur du header */
    }

    .privacy-modal__body {
        padding: 20px;
        max-height: calc(100vh - 140px); /* Réserver l'espace pour header + footer */
        overflow-y: auto; /* Forcer le scroll si nécessaire */
    }

    .privacy-modal__footer {
        padding: 20px;
        height: 150px; /* Réduire la hauteur du footer */
    }

    .privacy-modal__section {
        margin-bottom: 10px;
        /* top: 50px; */
        padding: 24px;
        background: var(--privacy-modal-bg);
        border-radius: 12px;
        border: 1px solid #e5e7eb;
    }
}

/* Animation d'entrée */
@keyframes privacyModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Animation de sortie */
@keyframes privacyModalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
}

/* Support pour les préférences de réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
    .privacy-modal,
    .privacy-modal__content {
        transition: none;
    }
    
    .privacy-modal--open .privacy-modal__content {
        transform: none;
    }
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    .privacy-modal__content {
        background: var(--privacy-modal-bg);
        color: var(--texte-noir);
    }

    .privacy-modal__title {
        color: var(--texte-noir);
    }

    .privacy-modal__section-title {
        color: var(--texte-noir);
        border-bottom-color: #4b5563;
    }

    .privacy-modal__subsection-title {
        color: var(--texte-noir);
    }

    .privacy-modal__list li {
        color: var(--texte-noir);
    }

    .privacy-modal__intro {
        background: var(--violet);
        border-color: #4b5563;
    }

    .privacy-modal__intro p {
        color: var(--texte-noir);
    }

    .privacy-modal__highlight {
        background: var(--jaune);
        border-color: var(--violet);
    }

    .privacy-modal__highlight p {
        color: var(--texte-noir);
    }

    .privacy-modal__header,
    .privacy-modal__footer {
        border-color: #4b5563;
    }

    .privacy-modal__close:hover {
        background: var(--violet);
        color: var(--texte-noir);
    }
} 