/* Charte Graphique Le pouvoir citoyen (Bleu France & Rouge Marianne harmonisés avec le Logo) */
:root {
    --blue-france: #003594; /* Bleu exact du logo */
    --red-marianne: #e1000f; /* Rouge exact du logo */
    --background-default-grey: #F5F7FA;
    --text-action-high-blue: #003594;
    --text-default-grey: #161616;
    --white: #FFFFFF;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    font-size: 11pt;
    background-color: var(--background-default-grey);
    color: var(--text-default-grey);
    line-height: 1.6;
}

.rf-header {
    background-color: var(--white);
    border-bottom: 2px solid var(--blue-france);
    padding: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.rf-header__container { max-width: 900px; margin: 0 auto; padding: 0 1rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.rf-container, .rf-footer__container { max-width: 900px; margin: 0 auto; padding: 0 1rem; }

.rf-header__logo { margin-bottom: 1rem; }
.rf-header__logo img { max-height: 130px; width: auto; object-fit: contain; }

.rf-header__title .rf-header__main-title { display: none; }
.rf-header__title p { font-size: 11pt; color: var(--blue-france); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

/* Barre de navigation visible */
.rf-navigation {
    margin-top: 1.5rem;
    width: 100%;
    border-top: 1px solid #eee;
    padding-top: 1.2rem;
}

.rf-navigation__list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    list-style: none !important;
    list-style-type: none !important;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.rf-navigation__list li {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0;
    padding: 0;
}

.rf-navigation__link {
    font-size: 9.5pt;
    font-weight: 800;
    color: var(--blue-france);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.rf-navigation__link:hover {
    background-color: rgba(0, 53, 148, 0.06);
}

.rf-navigation__link.active {
    background-color: var(--blue-france);
    color: var(--white);
}

/* Classes pour le texte adaptatif */
.desktop-text {
    display: inline;
}
.mobile-text {
    display: none;
}

/* Optimisation mobile : barre de navigation classique sur une seule ligne */
@media (max-width: 600px) {
    .desktop-text {
        display: none;
    }
    .mobile-text {
        display: inline;
    }
    .rf-navigation {
        margin-top: 1rem;
        padding-top: 0.8rem;
        border-top: 1px solid #eee;
    }
    .rf-navigation__list {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.25rem;
        flex-wrap: nowrap;
        padding: 0.4rem 0;
        margin: 0;
        scrollbar-width: none;
    }
    .rf-navigation__list::-webkit-scrollbar {
        display: none;
    }
    .rf-navigation__list li {
        flex: 1 1 auto;
        text-align: center;
    }
    .rf-navigation__link {
        font-size: 8pt;
        padding: 0.4rem 0.3rem;
        white-space: nowrap;
        display: block;
        letter-spacing: 0px;
    }
}

.rf-container { padding-top: 3rem; padding-bottom: 3rem; }
h1, .intro h1 { font-size: 1.6rem; margin-bottom: 1rem; color: var(--blue-france); font-weight: 800; }
h2, .intro h2, .validation-section h2 { font-size: 1.4rem; margin-bottom: 1rem; color: var(--blue-france); font-weight: 800; }
h3 { font-size: 1.2rem; margin-bottom: 0.8rem; color: var(--blue-france); font-weight: 800; }

.intro { background: var(--white); padding: 2.5rem; margin-bottom: 2.5rem; border-left: 4px solid var(--blue-france); box-shadow: 0 6px 18px rgba(0, 53, 148, 0.04); border-radius: 4px; }
.intro p { font-size: 11pt; }

.issues-list { display: flex; flex-direction: column; gap: 4rem; }

.issue-card { background-color: var(--white); border: 1px solid #E5E5E5; padding: 2.5rem; border-radius: 4px; box-shadow: 0 6px 18px rgba(0, 53, 148, 0.04); position: relative; }

/* Césure visuelle entre les thématiques */
.issue-card:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -2rem;
    left: 15%;
    width: 70%;
    height: 3px;
    background-color: rgba(0, 0, 145, 0.1);
    border-radius: 3px;
}
.issue-card__title { font-size: 1.4rem; color: var(--blue-france); margin-bottom: 1.5rem; font-weight: 800; letter-spacing: -0.5px; border-bottom: 2px solid var(--red-marianne); padding-bottom: 0.5rem; display: inline-block; }

.contexte-box { margin-bottom: 2rem; padding: 1.5rem; background-color: rgba(0, 53, 148, 0.03); border-left: 4px solid var(--blue-france); border-radius: 0 4px 4px 0; font-size: 11pt; }
.contexte-title { font-weight: 800; margin-bottom: 0.5rem; color: var(--blue-france); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; }

/* 3 Piliers */
.impact-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 2.5rem; }
@media (min-width: 800px) { .impact-grid { grid-template-columns: repeat(3, 1fr); } }
.impact-box { padding: 1.5rem; border-radius: 4px; background-color: var(--background-default-grey); border: 1px solid #E5E5E5; }
.impact-title { font-weight: 800; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; color: var(--blue-france); font-size: 1.05rem; }
.impact-text { font-size: 11pt; text-align: left; color: #444; }

/* Section des sources (sous la grille d'impacts) */
.sources-section { font-size: 9pt; color: #666; font-style: italic; margin-bottom: 2.5rem; line-height: 1.5; padding-left: 0.5rem; }

/* Implications avant le vote */
.implications-container { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 2.5rem; border-top: 2px dashed #ddd; padding-top: 2.5rem; }
@media (min-width: 700px) { .implications-container { grid-template-columns: 1fr 1fr; } }
.implication-box { padding: 1.5rem 1.5rem 0 1.5rem; border-radius: 8px; background-color: var(--white); display: flex; flex-direction: column; overflow: hidden; }
.implication-box--pour { background-color: rgba(0, 53, 148, 0.04); border: 1px solid rgba(0, 53, 148, 0.15); color: #1b438f; }
.implication-box--contre { background-color: rgba(225, 0, 15, 0.03); border: 1px solid rgba(225, 0, 15, 0.12); color: #b30b15; }
.implication-title { font-weight: 800; margin-bottom: 0.75rem; font-size: 1.05rem; }
.implication-box--pour .implication-title { color: var(--blue-france); }
.implication-box--contre .implication-title { color: var(--red-marianne); }
.implication-box p { font-size: 11pt; flex-grow: 1; margin-bottom: 1.5rem; color: inherit; }

.vote-action-inside { margin: 0 -1.5rem; margin-top: auto; }
.vote-action-inside .btn { width: 100%; display: block; border-radius: 0; padding: 1.2rem; border: none; }

.btn { padding: 0.85rem 1.8rem; font-size: 1.05rem; font-weight: 700; cursor: pointer; border-radius: 2px; transition: all 0.2s; font-family: inherit; border: none; }
.btn-pour { background-color: var(--blue-france); color: var(--white); }
.btn-pour:hover { background-color: #002260; }
.btn-contre { background-color: var(--red-marianne); color: var(--white); }
.btn-contre:hover { background-color: #b3000c; }

.has-voted-pour .btn-pour { background-color: var(--text-default-grey); color: var(--white); }
.has-voted-pour .btn-contre { display: none; }

.has-voted-contre .btn-contre { background-color: var(--text-default-grey); color: var(--white); }
.has-voted-contre .btn-pour { display: none; }

.vote-results { margin-top: 2rem; padding: 1.5rem; background-color: var(--background-default-grey); border-radius: 4px; border: 1px solid #e5e5e5; }
.animated-fade-in { animation: fadeIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.vote-count-text { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; text-align: center; color: var(--text-default-grey); }
.vote-count-text strong { color: var(--blue-france); }
.vote-count-text strong.strong-red { color: var(--red-marianne); }

.progress-bar-container { width: 100%; height: 14px; background-color: var(--background-default-grey); border: 1px solid #ddd; border-radius: 7px; overflow: hidden; position: relative; }
.progress-pour { height: 100%; background-color: var(--blue-france); transition: width 1s cubic-bezier(0.4, 0, 0.2, 1); }
.progress-red-bg { position: absolute; top:0; right:0; bottom:0; background-color: var(--red-marianne); z-index: 0; }

.vote-numbers { display: flex; justify-content: space-between; font-size: 0.9rem; margin-top: 0.6rem; font-weight: 800; }
.num-pour { color: var(--blue-france); }
.num-contre { color: var(--red-marianne); }

/* Validation Section */
.validation-section { background: var(--white); padding: 3rem; margin-top: 3rem; border-top: 5px solid var(--blue-france); box-shadow: 0 4px 12px rgba(0,0,0,0.05); border-radius: 4px; text-align: center; }
.validation-section h2 { font-size: 1.4rem; margin-bottom: 1rem; color: var(--blue-france); }
.validation-section p { margin-bottom: 0.5rem; font-size: 1.05rem; }
.privacy-notice { font-size: 0.9rem; color: #555; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.form-group { margin-bottom: 2rem; display: flex; flex-direction: column; align-items: center; }
.form-group label { display: block; font-weight: 700; margin-bottom: 0.8rem; color: var(--text-default-grey); }
.form-group input { padding: 1rem; font-size: 1.2rem; width: 100%; max-width: 320px; border: 2px solid #ccc; border-radius: 4px; font-family: inherit; text-align: center; font-weight: bold; letter-spacing: 2px; }
.form-group input:focus { border-color: var(--blue-france); outline: none; }
.form-group-email { margin-bottom: 2rem; display: flex; flex-direction: column; align-items: center; width: 100%; }
.form-group-email label { font-weight: 700; margin-bottom: 0.8rem; color: var(--text-default-grey); }
.form-group-email input[type="email"] { padding: 1rem; font-size: 1.1rem; width: 100%; max-width: 320px; border: 2px solid #ccc; border-radius: 4px; font-family: inherit; margin-bottom: 1rem; text-align: center; }
.form-group-email input[type="email"]:focus { border-color: var(--blue-france); outline: none; }
.checkbox-container { display: flex; align-items: flex-start; max-width: 450px; text-align: left; gap: 0.8rem; margin-top: 0.5rem; background: #f9f9f9; padding: 1rem; border-radius: 4px; border: 1px dashed #ccc; }
.checkbox-container input[type="checkbox"] { margin-top: 0.15rem; width: 1.2rem; height: 1.2rem; cursor: pointer; accent-color: var(--blue-france); flex-shrink: 0; }
.checkbox-container label { font-size: 0.85rem; font-weight: 600; color: #555; margin-bottom: 0; cursor: pointer; line-height: 1.4; }
.btn-final { margin-top: 1rem; padding: 1.2rem 3rem; font-size: 1.2rem; background-color: var(--blue-france); color: var(--white); border: none; border-radius: 4px; font-weight: 900; cursor: pointer; transition: background 0.3s; }
.btn-final:hover { background-color: #0000ff; }
.btn-final:disabled { background-color: #ccc; cursor: not-allowed; color: white;}
.submit-message { margin-top: 1.5rem; font-weight: 800; font-size: 1.2rem; }

.rf-footer { background-color: var(--white); border-top: 2px solid var(--blue-france); padding: 2rem 0; margin-top: 4rem; text-align: center; font-weight: 600; font-size: 0.9rem; }

/* Progress Bar Wizard */
.wizard-progress-container {
    max-width: 900px;
    margin: 0 auto 2rem auto;
    padding: 0 1rem;
}
.wizard-progress-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--blue-france);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
}
.wizard-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #E5E5E5;
    border-radius: 4px;
    overflow: hidden;
}
.wizard-progress-fill {
    height: 100%;
    background-color: var(--blue-france);
    width: 0%;
    transition: width 0.4s ease;
}

/* Card visibility & Wizard transitions */
.issue-card {
    display: none;
}
.issue-card.active {
    display: block;
    animation: slideIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation buttons */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    gap: 1rem;
}
.btn-skip {
    background-color: transparent;
    color: #666;
    border: 1px solid #ccc;
    font-size: 0.95rem;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
}
.btn-skip:hover {
    background-color: #eee;
    color: var(--text-default-grey);
}
.btn-next {
    background-color: var(--blue-france);
    color: white;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    box-shadow: 0 4px 6px rgba(2, 27, 121, 0.15);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-next:hover {
    background-color: #002260;
    transform: translateY(-1px);
}
.btn-prev {
    background-color: transparent;
    color: var(--blue-france);
    border: 1px solid var(--blue-france);
    font-size: 0.95rem;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
}
.btn-prev:hover {
    background-color: rgba(0, 53, 148, 0.06);
}

/* Specific button placements */
.skip-container {
    text-align: center;
    margin-top: 1.5rem;
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
}

/* Hide inactive elements in results */
.has-voted-pour .implication-box--contre,
.has-voted-contre .implication-box--pour,
.has-skipped .implication-box {
    opacity: 0.5;
}

/* Modal Pédagogique */
.pedagogic-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pedagogic-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}
.pedagogic-modal__content {
    position: relative;
    background-color: var(--white);
    width: 90%;
    max-width: 800px;
    height: 85%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.pedagogic-modal__close {
    background-color: #f5f5f5;
    border: none;
    border-bottom: 1px solid #ddd;
    color: #333;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 1rem;
    cursor: pointer;
    text-align: right;
    width: 100%;
    display: block;
    transition: background-color 0.2s;
}
.pedagogic-modal__close:hover {
    background-color: #e0e0e0;
}
#pedagogic-modal__body {
    padding: 2rem;
    overflow-y: auto;
    flex-grow: 1;
}

/* Styles spécifiques du contenu pédagogique du RIC dans le modal */
.ric-content h2 {
    color: var(--blue-france);
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--red-marianne);
    padding-bottom: 0.5rem;
    display: inline-block;
}
.ric-content h3 {
    color: var(--blue-france);
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}
.ric-content p, .ric-content ul {
    margin-bottom: 1.2rem;
    font-size: 11pt;
    line-height: 1.7;
}
.ric-content ul {
    padding-left: 20px;
}
.ric-content li {
    margin-bottom: 0.6rem;
}
.ric-content .contexte-box {
    border-left: none !important;
    padding-left: 0 !important;
}

/* Table styles */
.ric-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ddd;
}
.ric-table th, .ric-table td {
    padding: 1rem;
    text-align: left;
    font-size: 10.5pt;
}
.ric-table th {
    background-color: var(--blue-france);
    color: white;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}
.ric-table tr:nth-child(even) {
    background-color: #f8f9fa;
}
.ric-table tr:hover {
    background-color: #f1f3f4;
}
.ric-table td strong {
    color: var(--blue-france);
}

/* Badge style */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 800;
    border-radius: 4px;
    text-transform: uppercase;
    color: white;
}
.badge-legislatif { background-color: #2b5c8f; }
.badge-abrogatif { background-color: var(--red-marianne); }
.badge-const { background-color: #8f2b8a; }
.badge-revoc { background-color: #e67e22; }

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* --- GRAPHIQUE 2D BOUSSOLE CITOYENNE --- */
.compass-container {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 1;
    margin: 2rem auto;
    position: relative;
    border: 2px solid #ccd6e0;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 53, 148, 0.05);
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

.compass-quadrant {
    position: absolute;
    width: 50%;
    height: 50%;
    pointer-events: none;
    opacity: 0.04;
}
.quadrant-top-left { top: 0; left: 0; background-color: #27ae60; }
.quadrant-top-right { top: 0; right: 0; background-color: #684f9a; }
.quadrant-bottom-left { bottom: 0; left: 0; background-color: #dd0000; }
.quadrant-bottom-right { bottom: 0; right: 0; background-color: #0d378a; }

.compass-axis-x {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 2px;
    background-color: #a0aec0;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
}
.compass-axis-y {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background-color: #a0aec0;
    transform: translateX(-50%);
    z-index: 1;
    pointer-events: none;
}

.compass-label {
    position: absolute;
    font-size: 0.72rem;
    font-weight: 800;
    color: #4a5568;
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.85);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.label-top { top: 8px; left: 50%; transform: translateX(-50%); }
.label-bottom { bottom: 8px; left: 50%; transform: translateX(-50%); }
.label-left { left: 8px; top: 50%; transform: translateY(-50%); }
.label-right { right: 8px; top: 50%; transform: translateY(-50%); }

.compass-candidate {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #fff;
    border: 3px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 900;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
    z-index: 10;
}
.compass-candidate:hover {
    transform: translate(-50%, -50%) scale(1.22);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 20;
}

.compass-user {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--blue-france);
    transform: translate(-50%, -50%);
    border: 3.5px solid #fff;
    box-shadow: 0 0 8px rgba(0, 53, 148, 0.6);
    z-index: 30;
    pointer-events: none;
}
.compass-user-pulse {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--blue-france);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 29;
    animation: pulseUser 1.6s infinite;
}

.compass-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background-color: rgba(11, 19, 43, 0.95);
    color: #fff;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: bold;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 100;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    text-align: center;
    line-height: 1.3;
}
.compass-candidate:hover .compass-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}
.compass-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(11, 19, 43, 0.95);
}

@keyframes pulseUser {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        box-shadow: 0 0 0 0 rgba(0, 53, 148, 0.7);
    }
    70% {
        transform: translate(-50%, -50%) scale(1.1);
        box-shadow: 0 0 0 12px rgba(0, 53, 148, 0);
    }
    100% {
        transform: translate(-50%, -50%) scale(0.9);
        box-shadow: 0 0 0 0 rgba(0, 53, 148, 0);
    }
}

/* Adaptation mobile */
@media (max-width: 600px) {
    .pedagogic-modal__content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    #pedagogic-modal__body {
        padding: 1.5rem 1rem;
    }
    .ric-table th, .ric-table td {
        padding: 0.75rem 0.5rem;
        font-size: 9.5pt;
    }
}

/* Boutons de la boussole politique à 5 choix */
.test-answers-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem 0.9rem;
    margin-top: 1.5rem;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}
.test-answers-options .btn {
    text-align: center;
    width: 100%;
    padding: 1.2rem 0.9rem; /* Hauteur augmentée pour gros pouces */
    border-radius: 2px !important;
    font-size: 1.05rem;
    display: block;
    transition: transform 0.1s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.test-answers-options .btn:active {
    transform: scale(0.98);
}
.test-answers-options .btn-neutre {
    grid-column: span 2;
}
.btn-tfav, .btn-fav, .btn-opp, .btn-topp {
    background-color: rgba(0, 53, 148, 0.04) !important;
    border: 2px solid rgba(0, 53, 148, 0.15) !important;
    color: var(--blue-france) !important;
}
.btn-tfav:hover, .btn-fav:hover, .btn-opp:hover, .btn-topp:hover {
    background-color: rgba(0, 53, 148, 0.12) !important;
    border-color: rgba(0, 53, 148, 0.25) !important;
}
.btn-neutre {
    background-color: #f1f3f5 !important;
    color: #495057 !important;
    border: 1px solid #dee2e6 !important;
}
.btn-neutre:hover {
    background-color: #e9ecef !important;
}

/* Grille pour les 3 fiches du haut (Boussole) */
.top-3-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
    width: 100%;
    justify-content: center;
    position: relative;
}
.top-3-grid .issue-card {
    display: flex !important;
    flex-direction: column;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 1;
    transform: scale(1);
}
.top-3-grid .issue-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 53, 148, 0.08);
}

/* Centrage fluide sur desktop */
.top-3-grid .issue-card.hidden-card {
    display: none !important;
}
.top-3-grid .issue-card.chosen-card {
    max-width: 400px !important;
    flex: 0 0 400px !important;
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 53, 148, 0.12);
}

@media (min-width: 768px) {
    .top-3-grid {
        flex-direction: row;
        justify-content: center;
        align-items: stretch;
    }
    .top-3-grid .issue-card {
        flex: 1;
        max-width: 32%;
    }
}

/* Pile Tinder sur mobile */
@media (max-width: 767px) {
    .tinder-stack {
        position: relative;
        width: 100%;
        max-width: 340px;
        height: 420px;
        margin: 2.5rem auto;
        touch-action: none;
        display: flex;
        justify-content: center;
        align-items: center;
        perspective: 1000px;
    }
    .tinder-card {
        position: absolute;
        width: 100%;
        height: 100%;
        background-color: var(--white);
        border: 1px solid #E5E5E5;
        border-radius: 8px;
        box-shadow: 0 8px 20px rgba(0, 53, 148, 0.08);
        transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s, box-shadow 0.3s;
        will-change: transform, opacity;
        user-select: none;
        overflow: hidden;
        cursor: grab;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 1.5rem;
        box-sizing: border-box;
    }
    .tinder-card:active {
        cursor: grabbing;
    }
    /* Effets de profondeur de la pile */
    .tinder-card.card-depth-0 {
        transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
        z-index: 3;
    }
    .tinder-card.card-depth-1 {
        transform: translate3d(0, 10px, -20px) scale(0.95) rotate(1deg);
        z-index: 2;
        opacity: 0.9;
    }
    .tinder-card.card-depth-2 {
        transform: translate3d(0, 20px, -40px) scale(0.9) rotate(-1deg);
        z-index: 1;
        opacity: 0.8;
    }
    .tinder-card.card-hidden {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* Carte élue / matchée qui revient au centre */
    .tinder-card.matched-card {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1.05) !important;
        z-index: 100 !important;
        transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
        box-shadow: 0 12px 30px rgba(0, 53, 148, 0.16) !important;
        cursor: default !important;
    }

    /* Badges de Swipe */
    .swipe-badge {
        position: absolute;
        top: 25px;
        padding: 0.4rem 0.8rem;
        font-size: 1.25rem;
        font-weight: 800;
        border-radius: 4px;
        border: 3px solid;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.1s ease;
        z-index: 10;
        text-transform: uppercase;
    }
    .swipe-badge-yes {
        left: 20px;
        color: var(--blue-france);
        border-color: var(--blue-france);
        transform: rotate(-10deg);
    }
    .swipe-badge-no {
        right: 20px;
        color: var(--red-marianne);
        border-color: var(--red-marianne);
        transform: rotate(10deg);
    }
}
