
/* =====================================================
   ROOT REVELATION — FICHE INDIVIDUELLE DU CANDIDAT
   Palette : violet profond, aubergine et or
   ===================================================== */

:root {
    --rr-bg: #17111f;
    --rr-bg-soft: #21172c;
    --rr-panel: #281d34;
    --rr-card: #332440;
    --rr-card-hover: #3b2a4a;
    --rr-gold: #e9c96b;
    --rr-gold-light: #f5e4a9;
    --rr-purple: #ad88d0;
    --rr-text: #f7f1fb;
    --rr-muted: #c4b6d1;
    --rr-border: rgba(233, 201, 107, .19);
    --rr-radius: 16px;
}

/* ---------- Base ---------- */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 25px;
}

body.rr-candidat-page {
    margin: 0;
    min-height: 100vh;
    background: var(--rr-bg) !important;
    color: var(--rr-text);
    font-family: "GlacialIndifference", "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.65;
}

.rr-candidat-page *,
.rr-candidat-page *::before,
.rr-candidat-page *::after {
    box-sizing: border-box;
}

.rr-candidat-page a {
    transition:
        color .2s ease,
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.rr-candidat-page p {
    color: var(--rr-muted);
}

.rr-candidat-page h1,
.rr-candidat-page h2,
.rr-candidat-page h3 {
    font-family: inherit;
}

/* ---------- En-tête ---------- */

.rr-candidat-header {
    position: relative;
    z-index: 5;
    width: 100%;
    padding: 13px 0;
    background: #12111c;
    border-bottom: 1px solid var(--rr-border);
}

.rr-header-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px;
    min-height: 54px;
}

.rr-header-logo {
    display: inline-flex !important;
    flex: 0 0 auto;
    align-items: center;
    margin: 0 auto 0 0 !important;
    padding: 0 !important;
    line-height: 0;
}

.rr-header-logo img {
    display: block;
    width: 300px;
    max-width: 100%;
    height: auto;
    margin: 0 !important;
    object-fit: contain;
}

.rr-back-button {
    display: inline-flex !important;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 41px;
    margin: 0 0 0 auto !important;
    padding: 9px 16px;
    border: 1px solid rgba(233, 201, 107, .35);
    border-radius: 8px;
    background: #281d34;
    color: var(--rr-gold-light) !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none !important;
    white-space: nowrap;
}

.rr-back-button:hover,
.rr-back-button:focus {
    background: #392747;
    border-color: var(--rr-gold);
    color: #fff !important;
    transform: translateY(-1px);
}

.rr-back-button > span:first-child {
    font-size: 17px;
}

/* ---------- Fond général ---------- */

.rr-single-candidate {
    position: relative;
    overflow: hidden;
    padding: 38px 0 52px;
    background:
        radial-gradient(
            ellipse at 12% 7%,
            rgba(126, 83, 158, .20),
            transparent 39%
        ),
        radial-gradient(
            ellipse at 95% 85%,
            rgba(174, 135, 70, .08),
            transparent 35%
        ),
        linear-gradient(135deg, #1b1425 0%, #21172c 52%, #17111f 100%) !important;
}

.rr-single-candidate > .container {
    position: relative;
    z-index: 1;
}

/* Affiche + panneau : deux colonnes */

.rr-candidate-layout {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
    gap: 27px;
}

/* ---------- Affiche du candidat ---------- */

.rr-candidate-visual {
    min-width: 0;
}

.rr-single-poster {
    padding: 9px;
    overflow: hidden;
    border: 1px solid rgba(233, 201, 107, .42);
    border-radius: var(--rr-radius);
    background: linear-gradient(145deg, #382846, #241a30);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .30);
}

.rr-single-poster img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 9px;
    object-fit: contain;
}

.rr-poster-caption {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 13px 4px 0;
    color: var(--rr-gold-light) !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
}

.rr-poster-caption span {
    color: var(--rr-muted);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: .4px;
}

/* ---------- Panneau principal ---------- */

.rr-single-panel {
    min-width: 0;
    padding: 27px;
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(53, 38, 68, .98), rgba(37, 27, 48, .99))
        !important;
    color: var(--rr-text) !important;
    box-shadow: 0 20px 55px rgba(0, 0, 0, .25);
}

.rr-candidate-intro {
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.rr-candidate-code {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid rgba(233, 201, 107, .28);
    border-radius: 5px;
    background: rgba(233, 201, 107, .08);
    color: var(--rr-gold-light);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.rr-single-panel .rr-candidate-intro h1 {
    margin: 13px 0 9px !important;
    color: var(--rr-gold-light) !important;
    font-size: clamp(25px, 2.5vw, 34px);
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.rr-single-panel .rr-intro-text {
    margin: 0;
    color: #d5c9e0 !important;
    font-size: 14px;
    line-height: 1.7;
}

/* ---------- Biographie ---------- */

.rr-biography {
    padding: 17px 0 15px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.rr-single-panel .rr-biography h2 {
    margin: 0 0 7px;
    color: #f2e7fa !important;
    font-size: 16px;
    font-weight: 700;
}

.rr-single-panel .rr-biography p {
    margin: 0;
    color: var(--rr-muted) !important;
    font-size: 13px;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

/* ---------- Statistiques compactes ---------- */

.rr-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin: 19px 0 20px;
}

.rr-stat-card {
    display: flex;
    min-width: 0;
    min-height: 98px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 11px 5px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 10px;
    background: rgba(20, 14, 28, .32);
    text-align: center;
    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.rr-stat-card:hover {
    border-color: rgba(233, 201, 107, .28);
    background: rgba(20, 14, 28, .52);
    transform: translateY(-2px);
}

.rr-stat-label {
    display: block;
    margin-bottom: 6px;
    color: #cbbbd9;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.35;
}

.rr-stat-number,
.rr-stat-card .rr-counter {
    color: var(--rr-gold-light);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.rr-stat-number small {
    color: #d2c1df;
    font-size: 11px;
    font-weight: 500;
}

.rr-stat-caption {
    display: block;
    margin-top: 5px;
    color: #a99ab8;
    font-size: 9px;
    line-height: 1.35;
}

/* ---------- Barre de progression ---------- */

.rr-progress-section {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.rr-progress-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.rr-single-panel .rr-progress-heading h2 {
    margin: 0;
    color: #f3e8fa !important;
    font-size: 15px;
    font-weight: 700;
}

.rr-progress-heading > span {
    color: var(--rr-gold-light);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.rr-single-panel .progress.rr-progress {
    height: 8px;
    margin: 0 0 9px;
    overflow: hidden;
    border: 0;
    border-radius: 30px;
    background: #4a3757 !important;
    box-shadow: none;
}

.rr-single-panel .progress.rr-progress .progress-bar {
    height: 100%;
    border-radius: 30px;
    background: linear-gradient(90deg, #9971bf, #d4a85e, #f3dc91) !important;
    box-shadow: none;
    transition: width .8s ease;
}

.rr-single-panel .rr-progress-note {
    margin: 0;
    color: #b6a8c5 !important;
    font-size: 11px;
    line-height: 1.6;
}

/* ---------- Soutien intégré au panneau ---------- */

.rr-support-block {
    scroll-margin-top: 20px;
    margin-top: 22px;
    padding-top: 23px;
    border-top: 1px solid var(--rr-border);
}

.rr-support-heading {
    margin-bottom: 17px;
}

.rr-section-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--rr-purple);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
}

.rr-single-panel .rr-support-heading h2 {
    margin: 0 0 7px;
    color: var(--rr-gold-light) !important;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.3;
}

.rr-single-panel .rr-support-heading p {
    margin: 0;
    color: var(--rr-muted) !important;
    font-size: 13px;
    line-height: 1.6;
}

/* ---------- Grille des forfaits ---------- */

.rr-packages-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.rr-package-option {
    position: relative;
    display: flex !important;
    min-width: 0;
    min-height: 100px;
    align-items: stretch;
    gap: 8px;
    margin: 0 !important;
    padding: 13px;
    border: 1px solid #4c385b;
    border-radius: 11px;
    background: rgba(22, 15, 30, .34);
    color: var(--rr-text) !important;
    cursor: pointer;
    transition:
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.rr-package-option:hover {
    border-color: rgba(233, 201, 107, .65);
    background: var(--rr-card-hover);
    transform: translateY(-1px);
}

.rr-package-option:has(input[type="radio"]:checked) {
    border-color: var(--rr-gold);
    background: linear-gradient(
        145deg,
        rgba(103, 75, 116, .6),
        rgba(49, 34, 62, .96)
    );
    box-shadow: inset 0 0 0 1px rgba(233, 201, 107, .12);
}

.rr-package-option input[type="radio"] {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    margin: 3px 0 0;
    accent-color: var(--rr-gold);
    cursor: pointer;
}

.rr-package-content {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.rr-package-name {
    color: #e6d9ef;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.rr-package-votes {
    color: var(--rr-gold-light);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
}

.rr-package-votes > span {
    color: #c5b4d3;
    font-size: 11px;
    font-weight: 400;
}

.rr-package-price {
    margin-top: 2px;
    color: #e8d8f2;
    font-size: 12px;
    font-weight: 600;
}

.rr-package-check {
    display: flex;
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    border: 1px solid #6b5579;
    border-radius: 50%;
    color: transparent;
    font-size: 11px;
    line-height: 1;
}

.rr-package-option:has(input[type="radio"]:checked) .rr-package-check {
    border-color: var(--rr-gold);
    background: var(--rr-gold);
    color: #26192e;
}

/* ---------- Bouton de paiement ---------- */

.rr-payment-button {
    display: flex;
    width: 100%;
    min-height: 47px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 18px;
    border: 1px solid #f1d985;
    border-radius: 9px;
    background: linear-gradient(100deg, #d8b65c, #f0d98e);
    color: #25182c !important;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    transition:
        box-shadow .2s ease,
        filter .2s ease,
        transform .2s ease;
}

.rr-payment-button:hover,
.rr-payment-button:focus {
    background: linear-gradient(100deg, #e6c66e, #f8e8ac);
    color: #25182c !important;
    box-shadow: 0 7px 22px rgba(233, 201, 107, .16);
    transform: translateY(-1px);
}

.rr-payment-button span {
    font-size: 18px;
}

.rr-single-panel .rr-payment-note {
    margin: 10px 0 0;
    color: #b7a9c5 !important;
    font-size: 10px;
    line-height: 1.6;
    text-align: center;
}

.rr-empty-packages {
    padding: 15px;
    border: 1px solid rgba(233, 201, 107, .2);
    border-radius: 9px;
    background: rgba(20, 14, 28, .3);
    color: var(--rr-muted);
    font-size: 13px;
}

/* ---------- Pied de page ---------- */

.rr-candidat-footer {
    padding: 24px 15px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    background: #100b16 !important;
    text-align: center;
}

.rr-candidat-footer p {
    margin: 0 0 7px;
    color: #b9acc5 !important;
    font-size: 12px;
    line-height: 1.7;
}

.rr-candidat-footer p strong {
    color: var(--rr-gold-light);
    letter-spacing: .7px;
}

.rr-candidat-footer a {
    color: var(--rr-gold-light) !important;
    font-size: 12px;
    text-decoration: none;
}

.rr-candidat-footer a:hover {
    color: #fff !important;
    text-decoration: underline;
}

/* ---------- Tablettes ---------- */

@media (max-width: 991px) {
    .rr-single-candidate {
        padding: 27px 0 38px;
    }

    .rr-candidate-layout {
        grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
        gap: 18px;
    }

    .rr-single-panel {
        padding: 21px 18px;
    }

    .rr-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .rr-stat-card {
        min-height: 86px;
    }

    .rr-stat-number,
    .rr-stat-card .rr-counter {
        font-size: 21px;
    }

    .rr-package-option {
        padding: 11px 9px;
    }
}

/* ---------- Mobiles ---------- */

@media (max-width: 767px) {
    .rr-candidat-header {
        padding: 11px 0;
    }

    .rr-header-inner {
        gap: 10px;
        min-height: 46px;
    }

    .rr-header-logo img {
        width: 45px;
    }

    .rr-back-button {
        min-height: 38px;
        gap: 6px;
        padding: 8px 11px;
        font-size: 11px;
    }

    .rr-single-candidate {
        padding: 22px 0 32px;
    }

    .rr-candidate-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 19px;
    }

    .rr-candidate-visual {
        width: 100%;
        max-width: 430px;
        margin: 0 auto;
    }

    .rr-single-poster {
        padding: 7px;
        border-radius: 13px;
    }

    .rr-poster-caption {
        margin-top: 9px;
    }

    .rr-single-panel {
        padding: 21px 16px;
        border-radius: 14px;
    }

    .rr-single-panel .rr-candidate-intro h1 {
        font-size: 27px;
    }

    .rr-single-panel .rr-intro-text {
        font-size: 13px;
    }

    .rr-biography {
        padding: 15px 0;
    }

    .rr-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        margin: 16px 0;
    }

    .rr-stat-card {
        min-height: 88px;
        padding: 10px 6px;
    }

    .rr-stat-label {
        font-size: 10px;
    }

    .rr-stat-caption {
        font-size: 9px;
    }

    .rr-progress-section {
        padding-bottom: 17px;
    }

    .rr-support-block {
        margin-top: 19px;
        padding-top: 20px;
    }

    .rr-single-panel .rr-support-heading h2 {
        font-size: 22px;
    }

    .rr-packages-grid {
        gap: 8px;
    }

    .rr-package-option {
        min-height: 94px;
        padding: 10px 8px;
        gap: 6px;
    }

    .rr-package-name {
        font-size: 11px;
    }

    .rr-package-votes {
        font-size: 18px;
    }

    .rr-package-price {
        font-size: 11px;
    }

    .rr-package-check {
        width: 17px;
        height: 17px;
        flex-basis: 17px;
    }

    .rr-payment-button {
        min-height: 45px;
        padding: 11px 10px;
        font-size: 12px;
    }
}

/* ---------- Très petits écrans ---------- */

@media (max-width: 360px) {
    .rr-header-inner > .container {
        padding-right: 10px;
        padding-left: 10px;
    }

    .rr-back-button {
        padding: 7px 8px;
        font-size: 10px;
    }

    .rr-single-panel {
        padding: 17px 12px;
    }

    .rr-packages-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .rr-package-option {
        min-height: 78px;
        padding: 12px;
    }
}

/* Accessibilité : limiter les animations si demandé par le système */

@media (prefers-reduced-motion: reduce) {
    .rr-candidat-page *,
    .rr-candidat-page *::before,
    .rr-candidat-page *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
