:root {
    --brand-color:    #ff1a75;
    --brand-dark:     #cc0055;
    --brand-light:    #ff4d4d;
    --text-color:     #333;
    --shadow:         0 4px 12px rgba(0, 0, 0, 0.15);
    --border-radius:  12px;
    --transition:     all 0.3s ease;
}

/* =====================
   LAYOUT GLOBAL
===================== */
.bam-single-post.enhanced-layout {
    font-family: 'Poppins', sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 20px 90px; /* marge basse : le bouton CTA peut se détacher et rester visible en bas d'écran */
    color: var(--text-color);
}

.entry-header {
    margin-bottom: 20px;
    text-align: center;
}

.entry-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.entry-title-flame {
    display: inline-block;
    margin-right: 6px;
    font-size: 0.9em;
}

.entry-meta {
    font-size: 0.9rem;
    color: #666;
}

.bam-single-post a,
.bam-single-post a:visited,
.bam-single-post a:hover,
.bam-single-post a:focus {
    color: var(--brand-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.bam-single-post a:hover {
    color: var(--brand-dark);
    text-decoration: underline;
}

/* =====================
   PROFIL : PHOTO + INFOS
===================== */
.post-profile-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin: 0 0 55px 0;
}

.post-media-wrapper {
    position: relative;
    flex: 0 0 66%;
    max-width: 66%;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.post-media-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.post-profile-info {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
    overflow: hidden;
}

.profile-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 12px;
    line-height: 1.3;
}

.profile-details {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.profile-details li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #444;
}

.profile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 26, 117, 0.08);
    border-radius: 50%;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.profile-icon svg {
    width: 19px;
    height: 19px;
    display: block;
}

/* Logos de marque : pas de fond, ils ressortent mieux avec leurs propres couleurs */
.profile-icon.icon-snapchat,
.profile-icon.icon-telegram,
.profile-icon.icon-instagram,
.profile-icon.icon-tiktok {
    background: transparent;
    width: 34px;
    height: 34px;
}

.profile-icon.icon-snapchat svg,
.profile-icon.icon-telegram svg,
.profile-icon.icon-instagram svg,
.profile-icon.icon-tiktok svg {
    width: 26px;
    height: 26px;
}

.profile-details a {
    color: var(--text-color);
    font-weight: 500;
}

.profile-contact {
    cursor: pointer;
    transition: color 0.2s ease;
}

.profile-details a.profile-link {
    font-weight: 700;
    color: var(--brand-color);
}

.profile-details a:hover,
.profile-contact:hover {
    color: var(--brand-color);
    text-decoration: underline;
}

/* =====================
   MINI-CARROUSEL PHOTO
===================== */
.photo-slider {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 4 / 3; /* valeur par défaut, ajustée en JS sur le vrai ratio de la photo */
}

.photo-slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.45s ease;
}

.photo-slide {
    flex: 0 0 100%;
    width: 100%;
    position: relative;
    line-height: 0;
    height: 100%;
}

.photo-slider .photo-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    box-shadow: none;
}

/* Démarcation + flèche "d'autres photos" */
.photo-more-line {
    position: absolute;
    top: 12%;
    bottom: 12%;
    right: 52px;
    width: 2px;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.7) 0,
        rgba(255, 255, 255, 0.7) 6px,
        transparent 6px,
        transparent 12px
    );
    z-index: 5;
    pointer-events: none;
}

.photo-more-hint {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.5) 60%);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 6;
    transition: background 0.2s ease;
}

.photo-more-hint:hover {
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.65) 60%);
}

.photo-more-arrow {
    transform: translateX(-2px);
}

/* Flèche gauche : retour à la photo précédente (uniquement sur les slides floutées) */
.photo-prev-hint {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to left, transparent, rgba(0, 0, 0, 0.5) 60%);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 6;
    transition: background 0.2s ease;
}

.photo-prev-hint:hover {
    background: linear-gradient(to left, transparent, rgba(0, 0, 0, 0.65) 60%);
}

.photo-prev-arrow {
    transform: translateX(2px);
}

/* Slides floutées + cadenas */
.photo-slide-locked {
    cursor: pointer;
}

.photo-slide-locked img {
    filter: blur(20px) brightness(0.6);
    transform: scale(1.08);
}

.photo-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 38% 22px 0;
    gap: 34px;
    text-align: center;
    color: #fff;
}

.photo-lock-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-lock-text {
    font-weight: 700;
    font-size: 1rem;
    max-width: 82%;
    line-height: 1.4;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* =====================
   STATUT EN LIGNE
===================== */
.user-status-indicator {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 30px;
    z-index: 10;
    backdrop-filter: blur(4px);
    font-size: 0.85rem;
    font-weight: 600;
}

.user-status-indicator.online {
    background: rgba(0, 0, 0, 0.55);
    color: #4dff91;
}

.user-status-indicator.offline {
    background: rgba(0, 0, 0, 0.55);
    color: #ff6b6b;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.user-status-indicator.online .status-dot {
    background: #28a745;
    box-shadow: 0 0 6px #28a745;
    animation: pulse 2s infinite;
}

.user-status-indicator.offline .status-dot {
    background: #dc3545;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.6); }
    70%  { box-shadow: 0 0 0 6px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* =====================
   BOUTON FLOTTANT
===================== */
.floating-cta-wrapper {
    position: absolute;
    bottom: -26px;
    left: 0;
    z-index: 20;
    width: 100%;
    text-align: center;
}

.primary-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(145deg, var(--brand-light), var(--brand-color));
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 18px 40px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(255, 26, 117, 0.45);
    transition: var(--transition);
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
    cursor: pointer;
    animation: cta-pulse 2.6s ease-in-out infinite;
}

@keyframes cta-pulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(255, 26, 117, 0.45), 0 0 0 0 rgba(255, 26, 117, 0.45);
    }
    50% {
        box-shadow: 0 8px 25px rgba(255, 26, 117, 0.45), 0 0 0 14px rgba(255, 26, 117, 0);
    }
}

.primary-cta-button:hover {
    animation-play-state: paused;
}

.primary-cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: 0.5s;
}

.primary-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 26, 117, 0.55);
}

.primary-cta-button:hover::before {
    left: 100%;
}

.primary-cta-button:active {
    transform: translateY(1px);
}

.button-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.button-text {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =====================
   TEXTE DE L'ANNONCE
===================== */
.entry-content {
    background: linear-gradient(145deg, #fff, #fdf7f9);
    border: 1px solid rgba(255, 26, 117, 0.15);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 26px 24px;
    margin: 24px 0 20px;
    line-height: 1.8;
    font-size: 1.02rem;
    position: relative;
    overflow: hidden;
}

.entry-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-light), var(--brand-color));
}

.entry-content-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--brand-color);
    margin-bottom: 14px;
}

.entry-content h2,
.entry-content h3 {
    color: var(--text-color);
    margin: 25px 0 15px;
    font-weight: 600;
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content p:last-child {
    margin-bottom: 0;
}

/* =====================
   MINI-QUIZ (dans la popup)
===================== */
.bam-modal-quiz {
    margin: 0 0 20px;
}

.bam-modal-quiz-progress-wrap {
    margin: 0 0 20px;
}

.bam-modal-quiz-progress {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.bam-modal-quiz-progress-bar {
    height: 100%;
    width: 20%; /* 1re question sur 5 */
    background: linear-gradient(90deg, var(--brand-light), var(--brand-color));
    transition: width 0.35s ease;
}

.bam-modal-quiz-step-text {
    font-size: 0.78rem;
    color: #888;
    text-align: center;
    margin: 0;
}

.quiz-question-text {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 14px;
    line-height: 1.4;
}

.quiz-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.quiz-options-stacked {
    flex-direction: column;
    align-items: stretch;
}

.quiz-option-btn {
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--brand-color);
    background: rgba(255, 26, 117, 0.08);
    border: 1px solid rgba(255, 26, 117, 0.2);
    border-radius: 20px;
    padding: 10px 18px;
    cursor: pointer;
    transition: var(--transition);
}

.quiz-options-stacked .quiz-option-btn {
    border-radius: 10px;
    padding: 12px 16px;
}

.quiz-option-btn:hover {
    background: rgba(255, 26, 117, 0.16);
    border-color: var(--brand-color);
    transform: translateY(-1px);
}

.quiz-option-btn:active {
    transform: translateY(0);
}

/* Questions oui/non : croix rouge / check vert, sans fond ni rond */
.quiz-options-binary {
    gap: 18px;
}

.quiz-btn-no,
.quiz-btn-yes {
    width: auto;
    height: auto;
    padding: 4px;
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: 2.2rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.quiz-btn-no:hover,
.quiz-btn-yes:hover,
.quiz-btn-no:focus,
.quiz-btn-yes:focus,
.quiz-btn-no:active,
.quiz-btn-yes:active {
    background: transparent !important;
    border-color: transparent !important;
    outline: none;
    transform: scale(1.15);
}

/* État sélectionné pour les questions à choix multiples */
.quiz-question-multi .quiz-option-btn.is-selected {
    color: #fff;
    background: var(--brand-color);
    border-color: var(--brand-color);
}

.quiz-next-btn {
    display: block;
    margin: 16px auto 0;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    background: #31BA75;
    border: none;
    border-radius: 20px;
    padding: 10px 26px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(49, 186, 117, 0.35);
    transition: var(--transition);
}

.quiz-next-btn:hover {
    background: #279961;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(49, 186, 117, 0.45);
}

/* Étape "analyse en cours" (spinner) */
.bam-modal-analyzing {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 20px 0;
}

.bam-modal-analyzing.is-visible {
    display: flex;
}

.analyzing-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 26, 117, 0.15);
    border-top-color: var(--brand-color);
    border-radius: 50%;
    animation: analyzing-spin 0.8s linear infinite;
}

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

.analyzing-text {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

/* Écran de validation "Ça matche !" */
.bam-modal-match {
    display: none; /* IMPORTANT : ne pas mettre "flex" ici, sinon ça casse l'attribut [hidden] et laisse un espace vide */
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 10px 0 24px;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.bam-modal-match.is-visible,
.bam-modal-match.is-fading {
    display: flex;
}

.bam-modal-match.is-visible {
    opacity: 1;
    transform: scale(1);
}

.bam-modal-match.is-fading {
    opacity: 0;
    transform: scale(0.85);
}

.match-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--brand-light), var(--brand-color));
    font-size: 2.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(255, 26, 117, 0.4);
    animation: match-pop 0.5s ease, match-shake 0.4s ease 0.5s 2;
}

@keyframes match-pop {
    0%   { transform: scale(0); }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes match-shake {
    0%, 100% { transform: scale(1) translateX(0) rotate(0); }
    20%      { transform: scale(1) translateX(-4px) rotate(-8deg); }
    40%      { transform: scale(1) translateX(4px) rotate(8deg); }
    60%      { transform: scale(1) translateX(-3px) rotate(-5deg); }
    80%      { transform: scale(1) translateX(3px) rotate(5deg); }
}

.match-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--brand-color);
    margin: 0 0 4px;
}

.bam-modal-match-badge {
    display: inline-block;
    background: linear-gradient(90deg, var(--brand-light), var(--brand-color));
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 5px 14px;
    border-radius: 50px;
    letter-spacing: 0.4px;
}

.bam-modal-match-summary {
    width: 100%;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 12px 0 4px;
    text-align: left;
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text-color);
}

.bam-modal-match-summary strong {
    color: var(--brand-color);
}

.bam-modal-match-tagline {
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(255, 26, 117, 0.25);
}

.bam-modal-match-cta-text {
    font-size: 0.88rem;
    color: #666;
    margin: 8px 0 0;
}

/* =====================
   POPUP D'INSCRIPTION
===================== */
.bam-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.bam-modal-overlay.is-open {
    display: flex;
    opacity: 1;
}

.bam-modal {
    background: #fff;
    border-radius: var(--border-radius);
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px 25px 25px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.bam-modal-overlay.is-open .bam-modal {
    transform: translateY(0);
}

.bam-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.bam-modal-close:hover {
    color: var(--brand-color);
}

.bam-modal-title {
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-color);
    margin: 0 0 16px;
    padding-right: 20px;
}

.bam-modal-title strong {
    font-weight: 700;
}

.bam-modal-context {
    display: none;
    background: rgba(255, 26, 117, 0.08);
    border: 1px solid rgba(255, 26, 117, 0.2);
    color: var(--brand-dark);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 10px;
    margin: 0 0 16px;
}

.bam-modal-photo {
    margin: 0 auto 10px;
    max-width: 220px;
    /* max-height ajustée dynamiquement en JS pour éviter le scroll de la popup */
    overflow: hidden;
}

.bam-modal-photo img {
    width: 100%;
    max-height: inherit;
    height: auto;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: block;
    margin: 0 auto;
}

@media (min-width: 769px) {
    .bam-modal {
        max-width: 480px;
    }

    .bam-modal-photo {
        max-width: 66%;
    }
}

.bam-modal-form-target {
    /* Sélecteur pour ton script d'inscription : #bam-modal-form-target */
    min-height: 10px;
    position: relative;
    z-index: 5;
}

.bam-modal-form-target.is-overlapping {
    margin-top: -22px;
}

.bam-carousel-target {
    /* Sélecteur pour ton script carrousel : #bam-carousel-target */
    min-height: 10px;
    margin: 20px 0;
}

/* Bouton flottant qui se "détache" et suit le scroll une fois qu'on
   dépasse sa position d'origine (remplace l'ancienne barre sticky séparée) */
.floating-cta-wrapper.is-docked {
    position: fixed !important;
    top: auto !important;
    bottom: 14px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(94%, 560px) !important;
    max-width: none;
    z-index: 999;
    animation: none !important;
}

.floating-cta-wrapper.is-docked .primary-cta-button {
    box-shadow: 0 8px 25px rgba(255, 26, 117, 0.45), 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 768px) {
    .entry-title { font-size: 1.4rem; }
    .primary-cta-button { font-size: 1.05rem; padding: 16px 24px; }
    .button-text { font-size: 1.05rem; }
    .post-profile-wrapper { flex-direction: column; margin-bottom: 20px; }
    .post-media-wrapper { order: 1; flex: 0 0 auto; max-width: 100%; margin-bottom: 0; }
    .floating-cta-wrapper {
        order: 2;
        bottom: auto;
        width: 100%;
        z-index: 20;
    }
    .post-profile-info { order: 3; width: 100%; margin-top: 24px; }
}

@media (max-width: 480px) {
    .bam-single-post.enhanced-layout { padding: 12px 12px 90px; }
    .entry-title { font-size: 1.25rem; }
    .primary-cta-button { font-size: 0.95rem; padding: 14px 20px; gap: 8px; }
    .button-text { font-size: 0.95rem; }
    .button-icon-wrapper { width: 30px; height: 30px; font-size: 1rem; }
    .post-profile-wrapper { margin-bottom: 18px; }
    .post-media-wrapper { margin-bottom: 0; }

    .user-status-indicator { font-size: 0.75rem; padding: 5px 10px; }
    .bam-modal { padding: 25px 18px 20px; }
    .bam-modal-photo { max-width: 240px; }
}
