/* ========================================
   POP-UP CAMPAGNE NOVEMBRE - ADEQUATION PACA
   Style épuré wellness - Compatible charte graphique
   ======================================== */

/* Import des fonts du site si besoin */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Open+Sans:wght@300;400;600&display=swap');

/* ========================================
   OVERLAY - Z-INDEX CRITIQUE
   ======================================== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 99999; /* AU-DESSUS du header du site (999) */
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 20px;
    overflow-y: auto;
}

.popup-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

/* ========================================
   CONTAINER PRINCIPAL
   ======================================== */
.popup-campagne {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin: auto;
}

.popup-overlay.active .popup-campagne {
    transform: translateY(0);
    opacity: 1;
}

/* ========================================
   BOUTON FERMETURE
   ======================================== */
.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    color: #2c1810;
    border: 2px solid rgba(44, 24, 16, 0.2);
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
}

.popup-close:hover {
    background: #2c1810;
    color: white;
    border-color: #2c1810;
    transform: rotate(90deg);
}

/* ========================================
   HEADER POP-UP
   ======================================== */
.popup-header {
    background: linear-gradient(135deg, #8b6f47 0%, #6d5635 100%);
    color: white;
    padding: 50px 30px 35px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    position: relative;
}

.popup-emoji {
    font-size: 56px;
    display: block;
    margin-bottom: 15px;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.popup-title {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.3;
    letter-spacing: 0.5px;
}

.popup-subtitle {
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    font-weight: 300;
    opacity: 0.95;
    line-height: 1.6;
    font-style: italic;
    max-width: 90%;
    margin: 0 auto;
}

/* ========================================
   CORPS DE LA POP-UP
   ======================================== */
.popup-body {
    padding: 35px 30px;
    font-family: 'Open Sans', sans-serif;
}

/* Section Défi/Solution */
.popup-challenge {
    background: #faf8f5;
    border-left: 4px solid #c9a05f;
    padding: 18px 22px;
    margin-bottom: 28px;
    border-radius: 6px;
}

.popup-challenge-title {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 700;
    color: #2c1810;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.popup-challenge-text {
    font-size: 14px;
    color: #4a2c1a;
    line-height: 1.7;
    margin: 0;
}

/* ========================================
   TECHNIQUES GRID
   ======================================== */
.popup-techniques {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin: 28px 0;
}

.technique-card {
    background: white;
    border: 2px solid #f0ede8;
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.technique-card:hover {
    border-color: #c9a05f;
    box-shadow: 0 8px 20px rgba(201, 160, 95, 0.15);
    transform: translateY(-3px);
}

.technique-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}

.technique-name {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-weight: 700;
    color: #2c1810;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.technique-desc {
    font-size: 12px;
    color: #727475;
    line-height: 1.5;
    margin: 0;
}

/* ========================================
   SECTION CTA
   ======================================== */
.popup-cta-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #f0ede8;
}

.popup-cta-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: #2c1810;
    text-align: center;
    margin-bottom: 22px;
}

.popup-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.popup-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 50px;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    line-height: 1.5;
}

.popup-btn-primary {
    background: linear-gradient(135deg, #c9a05f 0%, #a88348 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(201, 160, 95, 0.3);
}

.popup-btn-primary:hover {
    background: linear-gradient(135deg, #a88348 0%, #8b6f47 100%);
    box-shadow: 0 8px 25px rgba(201, 160, 95, 0.4);
    transform: translateY(-2px);
}

.popup-btn-secondary {
    background: white;
    color: #2c1810;
    border: 2px solid #2c1810;
}

.popup-btn-secondary:hover {
    background: #2c1810;
    color: white;
    transform: translateY(-2px);
}

.popup-btn-tertiary {
    background: transparent;
    color: #727475;
    border: 2px solid #d4d4d4;
    font-size: 14px;
}

.popup-btn-tertiary:hover {
    background: #faf8f5;
    border-color: #a88348;
    color: #2c1810;
}

/* Badge Recommandé */
.badge-recommended {
    display: inline-block;
    background: #28a745;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   FOOTER
   ======================================== */
.popup-footer {
    padding: 20px 30px 25px;
    text-align: center;
    background: #faf8f5;
    border-radius: 0 0 12px 12px;
}

.popup-footer-options {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.popup-footer-link {
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    color: #727475;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.popup-footer-link:hover {
    color: #2c1810;
}

/* ========================================
   SCROLLBAR PERSONNALISÉE
   ======================================== */
.popup-campagne::-webkit-scrollbar {
    width: 8px;
}

.popup-campagne::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.popup-campagne::-webkit-scrollbar-thumb {
    background: #c9a05f;
    border-radius: 4px;
}

.popup-campagne::-webkit-scrollbar-thumb:hover {
    background: #a88348;
}

/* ========================================
   RESPONSIVE - TABLET (≤ 768px)
   ======================================== */
@media (max-width: 768px) {
    .popup-overlay {
        padding: 15px;
    }

    .popup-campagne {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 10px;
    }

    .popup-header {
        padding: 40px 25px 30px;
    }

    .popup-title {
        font-size: 22px;
    }

    .popup-subtitle {
        font-size: 14px;
    }

    .popup-body {
        padding: 28px 25px;
    }

    .popup-techniques {
        gap: 14px;
    }

    .technique-card {
        padding: 16px 12px;
    }

    .popup-btn {
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE (≤ 480px)
   ======================================== */
@media (max-width: 480px) {
    .popup-overlay {
        padding: 10px;
        align-items: flex-start;
        padding-top: 40px; /* Espace pour ne pas coller au top */
    }

    .popup-campagne {
        max-height: 92vh;
        border-radius: 8px;
    }

    .popup-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
        top: 15px;
        right: 15px;
    }

    .popup-header {
        padding: 35px 20px 25px;
    }

    .popup-emoji {
        font-size: 44px;
    }

    .popup-title {
        font-size: 20px;
        letter-spacing: 0;
    }

    .popup-subtitle {
        font-size: 13px;
        max-width: 100%;
    }

    .popup-body {
        padding: 24px 20px;
    }

    .popup-challenge {
        padding: 15px 18px;
        margin-bottom: 22px;
    }

    .popup-challenge-title {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .popup-challenge-text {
        font-size: 13px;
    }

    /* Techniques en liste verticale sur mobile */
    .popup-techniques {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .technique-card {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 14px 16px;
    }

    .technique-icon {
        font-size: 36px;
        margin-bottom: 0;
        margin-right: 14px;
        min-width: 44px;
    }

    .technique-content {
        flex: 1;
    }

    .technique-name {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .technique-desc {
        font-size: 11px;
    }

    .popup-cta-section {
        margin-top: 24px;
        padding-top: 20px;
    }

    .popup-cta-title {
        font-size: 18px;
        margin-bottom: 18px;
    }

    .popup-cta-buttons {
        gap: 12px;
    }

    .popup-btn {
        padding: 13px 18px;
        font-size: 13px;
        border-radius: 40px;
    }

    .badge-recommended {
        font-size: 9px;
        padding: 3px 8px;
        display: block;
        margin: 6px 0 0 0;
        width: fit-content;
    }

    .popup-footer {
        padding: 16px 20px 20px;
    }

    .popup-footer-options {
        flex-direction: column;
        gap: 14px;
    }

    .popup-footer-link {
        font-size: 12px;
    }
}

/* ========================================
   ANIMATION CHARGEMENT BOUTONS
   ======================================== */
.popup-btn.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.popup-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    right: 20px;
    margin-top: -8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   ACCESSIBILITÉ
   ======================================== */
.popup-campagne:focus-visible {
    outline: 3px solid #c9a05f;
    outline-offset: 3px;
}

.popup-btn:focus-visible,
.popup-close:focus-visible {
    outline: 2px solid #c9a05f;
    outline-offset: 2px;
}

/* Réduire les animations pour ceux qui les préfèrent */
@media (prefers-reduced-motion: reduce) {
    .popup-overlay,
    .popup-campagne,
    .popup-btn,
    .technique-card {
        transition: none;
    }

    .popup-emoji {
        animation: none;
    }
}
