/* @category: styles */
/* Polices gourmandes et rondes, mais très lisibles : Baloo 2 (titres,
   très bubblegum) + Nunito (texte courant, doux et clair) */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Nunito:wght@400;500;600;700&display=swap');

/* Importe la structure complète du thème par défaut */
@import url('default.css');

/* ==========================================
   Template: Candy (Flexisite Survey)
   Identité "confiserie" : palette bonbon
   pastel-vif, ruban à rayures diagonales
   façon papier de bonbon, bouton à reflet
   glacé, petit badge menthe-poivrée en coin
   de carte. Volontairement différent de
   "colors" (plus arrondi encore, motifs
   candy plutôt qu'arc-en-ciel uni).
   ========================================== */

/* On écrase les variables de couleurs du thème par défaut */
.poll-template-candy {
    --poll-primary-color: #FF5FA2;   /* bubblegum */
    --poll-primary-hover: #E14989;
    --poll-secondary-color: #3DDC97; /* menthe fraîche, pour les barres de résultats */
    --poll-success-color: #1F9D5C;
    --poll-success-bg: #E3FCEF;
    --poll-error-color: #E0335A;
    --poll-error-bg: #FFE1E8;

    --poll-text-color: #3B2247;      /* prune foncée : gourmand mais très lisible */
    --poll-muted-color: #8C7A97;
    --poll-bg-light: #FDF3FF;        /* lavande-rose très clair, cartes/inputs internes */
    --poll-bg-hover: #FBE6FF;
    --poll-bg-bar: #F7E5FF;

    --poll-border-color: #F0D9FA;
    --poll-border-dark: #DCB8EA;

    --poll-bg-main: #FFFBFD;         /* blanc à peine rosé */
    --poll-box-shadow: 0 12px 28px rgba(255, 95, 162, 0.20);

    /* Polices propres au template (non gérées par des variables dans default.css) */
    --poll-font-display: 'Baloo 2', sans-serif;
    --poll-font-body: 'Nunito', sans-serif;

    font-family: var(--poll-font-body);
}

/* Carte du sondage : très arrondie, ruban à rayures diagonales en
   haut façon papier de bonbon, badge menthe-poivrée en coin */
.poll-survey.poll-template-candy .poll-container {
    background: var(--poll-bg-main) !important;
    color: var(--poll-text-color) !important;
    border: 2px solid var(--poll-border-color);
    border-radius: 28px;
    box-shadow: var(--poll-box-shadow);
    position: relative;
    overflow: hidden;
    padding-top: 39px; /* 14px de ruban + 25px d'espace d'origine */
}

.poll-survey.poll-template-candy .poll-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 14px;
    background: repeating-linear-gradient(
        45deg,
        var(--poll-primary-color) 0px, var(--poll-primary-color) 12px,
        #FFFFFF 12px, #FFFFFF 24px
    );
}

/* Petit badge "menthe-poivrée" décoratif, en coin de carte, comme un
   autocollant. N'est pas lié à l'image de couverture (contrairement
   au médaillon du template Vietnam) : accroché directement sur
   .poll-container, qui existe toujours quel que soit le layout. */
.poll-survey.poll-template-candy .poll-container::after {
    content: "";
    position: absolute;
    top: 8px;
    right: -10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background:
        repeating-conic-gradient(
            var(--poll-error-color) 0deg 18deg,
            #FFFFFF 18deg 36deg
        );
    border: 3px solid #FFFFFF;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.20);
    transform: rotate(-12deg);
    z-index: 2;
}

/* Titres en Baloo 2, bien gourmands. Le sondage s'intègre parfois
   seul sur une page hôte (titre en h2), parfois imbriqué sous un
   autre titre, ex. la galerie de templates (titre en h3) : on style
   les deux. */
.poll-survey.poll-template-candy h2,
.poll-survey.poll-template-candy h3,
.poll-survey.poll-template-candy .poll-question-title,
.poll-survey.poll-template-candy .poll-stats-title,
.poll-survey.poll-template-candy .poll-stats-subtitle {
    font-family: var(--poll-font-display);
    font-weight: 700;
}
.poll-survey.poll-template-candy h2,
.poll-survey.poll-template-candy h3 {
    text-align: center;
    margin: 20px 0;
}

/* Bouton "bonbon" : pilule très arrondie avec un reflet glacé en haut
   (façon bonbon brillant) et un léger effet bondissant au survol */
.poll-survey.poll-template-candy .poll-submit-btn {
    position: relative;
    overflow: hidden;
    border-radius: 999px;
    font-family: var(--poll-font-display);
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 6px 0 var(--poll-primary-hover);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.poll-survey.poll-template-candy .poll-submit-btn::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 10%;
    right: 10%;
    height: 40%;
    border-radius: 999px;
    background: linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
    pointer-events: none;
}
.poll-survey.poll-template-candy .poll-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 var(--poll-primary-hover);
}
.poll-survey.poll-template-candy .poll-submit-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 var(--poll-primary-hover);
}

/* Options de vote : bien arrondies, petit saut au survol, sélection
   mise en avant en bubblegum */
.poll-survey.poll-template-candy .poll-option-label {
    border: 2px solid var(--poll-border-color);
    border-radius: 16px;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.poll-survey.poll-template-candy .poll-option-label:hover {
    background: var(--poll-bg-hover);
    transform: translateX(4px);
}
.poll-survey.poll-template-candy .poll-option-label:has(input:checked) {
    background: var(--poll-bg-hover);
    border-color: var(--poll-primary-color);
}

/* Curseur (input type="range") en bubblegum */
.poll-survey.poll-template-candy .poll-range {
    accent-color: var(--poll-primary-color);
}

/* Image de couverture et items triables : coins bien ronds */
.poll-survey.poll-template-candy .poll-cover {
    border-radius: 20px;
}
.poll-survey.poll-template-candy .sortable-item {
    border-radius: 16px;
    border-width: 2px;
}

/* Barres de résultats et de statistiques : pilules bien arrondies */
.poll-survey.poll-template-candy .poll-bar-container,
.poll-survey.poll-template-candy .poll-bar-container-split,
.poll-survey.poll-template-candy .poll-stats-daily-bar-container {
    border-radius: 999px;
}

/* Boutons de tri mobile et bannière de succès : arrondis et titrés en Baloo 2 */
.poll-survey.poll-template-candy .sort-btns button {
    border-radius: 10px;
}
.poll-survey.poll-template-candy .poll-success-banner {
    border-radius: 20px;
}
.poll-survey.poll-template-candy .poll-success-banner h3 {
    font-family: var(--poll-font-display);
}

/* Liens de navigation : menthe au survol */
.poll-survey.poll-template-candy .poll-nav-links a:hover {
    color: var(--poll-secondary-color);
}
