/* Compléments propres aux concours, posés sur le thème du site (dist/css/kivusoft.css).
   Charte : bleu Kivusoft (nuit #001028 et ses teintes), orange #FDA90D, blancs. Aucune autre couleur. */
:root {
    --kc-night: #001028;          /* bleu Kivusoft */
    --kc-blue: #001028;           /* bleu Kivusoft (texte et accents sur fond clair) */
    --kc-blue-soft: rgba(0, 16, 40, .07);
    --kc-orange: #FDA90D;         /* orange Kivusoft */
    --kc-orange-ink: #8A5300;     /* orange foncé pour du texte lisible sur blanc */
    --kc-orange-soft: rgba(253, 169, 13, .16);
    --kc-night-soft: rgba(0, 16, 40, .06);
}
html[data-theme="dark"] { --kc-orange-ink: #FDA90D; --kc-blue: #fff; --kc-blue-soft: rgba(255, 255, 255, .08); --kc-night-soft: rgba(255, 255, 255, .07); }

.kc-eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--kc-blue); margin-bottom: .5rem; }

/* ---------- En-tête ---------- */
.header .navbar-brand img { height: 44px; width: auto; }
.kc-lang { display: inline-flex; padding: 3px; border: 1px solid var(--k-line); border-radius: 10px; background: var(--k-surface); }
.kc-lang a { min-width: 34px; padding: .3rem .5rem; border-radius: 7px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-align: center; color: var(--k-muted); line-height: 1.2; }
.kc-lang a:hover { color: var(--k-fg); background: var(--kc-night-soft); }
.kc-lang a[aria-current] { background: var(--kc-night); color: #fff; }
html[data-theme="dark"] .kc-lang a[aria-current] { background: #fff; color: var(--kc-night); }
html[data-theme="dark"] .header .navbar .btn-primary { color: var(--kc-night) !important; }
.kc-badge { display: inline-grid; place-items: center; min-width: 1.3rem; height: 1.3rem; padding: 0 .35rem; border-radius: 999px; background: var(--kc-orange); color: var(--kc-night); font-size: .72rem; font-weight: 800; }


/* ---------- Hero (bandeau bleu nuit) ---------- */
.kc-hero { padding: 96px 0 88px; color: #fff;
    background: radial-gradient(900px 420px at 88% -10%, #12336a 0%, transparent 60%), radial-gradient(700px 360px at -5% 110%, #0a2147 0%, transparent 60%), var(--kc-night); }
.kc-hero h1 { color: #fff; font-size: clamp(2.2rem, 4.8vw, 3.6rem); font-weight: 800; line-height: 1.08; }
.kc-hero .kc-hl { color: var(--kc-orange); }
.kc-hero .lead { color: rgba(255, 255, 255, .72); max-width: 40rem; }
.kc-hero .kc-eyebrow { color: var(--kc-orange); }
.kc-btn-orange { background: var(--kc-orange); border: 1px solid var(--kc-orange); color: var(--kc-night) !important; font-weight: 800; }
.kc-btn-orange:hover, .kc-btn-orange:focus { background: #fff; border-color: #fff; }
.kc-btn-ghost { background: transparent; border: 1px solid rgba(255, 255, 255, .3); color: #fff !important; }
.kc-btn-ghost:hover, .kc-btn-ghost:focus { background: #fff; border-color: #fff; color: var(--kc-night) !important; }
.kc-hero-stats { display: flex; flex-wrap: wrap; gap: 2.5rem; margin: 3rem 0 0; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .12); }
.kc-hero-stats dt { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.kc-hero-stats dd { margin: .2rem 0 0; font-size: 1.6rem; font-weight: 800; color: #fff; }

/* Slider du hero (diapositives gérées dans l'admin concours) */
.kc-hero { position: relative; overflow: hidden; }
.kc-hero > .container { position: relative; z-index: 1; }
.kc-hero-bgs, .kc-hero-bg { position: absolute; inset: 0; }
.kc-hero-bg { opacity: 0; transition: opacity 1.2s ease; }
.kc-hero-bg.is-active { opacity: 1; }
.kc-hero-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.kc-hero-bg.is-active img { animation: kc-zoom 9s ease-out forwards; }
@keyframes kc-zoom { to { transform: scale(1); } }
.kc-hero-bgs::after { content: ""; position: absolute; inset: 0;  /* voile bleu nuit : texte toujours lisible */
    background: linear-gradient(90deg, rgba(0, 16, 40, .94) 0%, rgba(0, 16, 40, .78) 45%, rgba(0, 16, 40, .45) 100%); }
.kc-slides { display: grid; }
.kc-slide { grid-area: 1 / 1; opacity: 0; transform: translateY(18px); pointer-events: none; transition: opacity .6s ease, transform .6s ease; }
.kc-slide.is-active { opacity: 1; transform: none; pointer-events: auto; transition-delay: .2s; }
.kc-slide-title { color: #fff; font-size: clamp(2.2rem, 4.8vw, 3.6rem); font-weight: 800; line-height: 1.08; margin: 0; }
.kc-slide-dots { display: flex; gap: .5rem; margin-top: 2rem; }
.kc-slide-dots button { width: 26px; height: 4px; padding: 0; border: 0; border-radius: 4px; background: rgba(255, 255, 255, .3); transition: width .3s, background-color .3s; }
.kc-slide-dots button.is-active { width: 44px; background: var(--kc-orange); }
.kc-slide-dots button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .kc-hero-bg img { animation: none; transform: none; } .kc-slide, .kc-hero-bg { transition: none; } }

/* Carte « prochaine clôture » */
.kc-next { display: flex; flex-direction: column; padding: 2rem; border-radius: 20px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; transition: transform .25s, border-color .25s; }
.kc-next:hover { color: #fff; transform: translateY(-4px); border-color: var(--kc-orange); }
.kc-next-label { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--kc-orange); }
.kc-next-contest { margin-top: 1.25rem; font-size: .9rem; color: rgba(255, 255, 255, .65); }
.kc-next-edition { font-size: 1.5rem; font-weight: 800; }
.kc-next-count { margin-top: 1.5rem; font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kc-next-date { font-size: .85rem; color: rgba(255, 255, 255, .55); }
.kc-next-cta { margin-top: 1.75rem; align-self: flex-start; padding: .6rem 1.1rem; border-radius: 10px; background: #fff; color: var(--kc-night); font-weight: 800; }
.kc-next:hover .kc-next-cta { background: var(--kc-orange); }

/* ---------- Pastilles d'état ---------- */
.kc-status { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; padding: .25rem .7rem; border-radius: 999px; }
.kc-status::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.kc-status.open { background: var(--kc-orange-soft); color: var(--kc-orange-ink); }
.kc-status.open::before { background: var(--kc-orange); }
.kc-status.soon, .kc-status.info { background: var(--kc-blue-soft); color: var(--kc-blue); }
.kc-status.closed { background: var(--kc-night-soft); color: var(--k-muted); }
.kc-status.err { background: var(--kc-orange); color: var(--kc-night); }
.kc-status.err::before { background: var(--kc-night); }

/* ---------- Cartes ---------- */
.kc-countdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--k-fg); font-size: .85rem; }
.kc-countdown i { color: var(--kc-orange); }
.card .card-img-top { aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px 16px 0 0; }
.card h3 a, .card h5 a { color: inherit; }
.card:hover h5 a { color: var(--kc-blue); }
.kc-more { font-size: .9rem; font-weight: 700; color: var(--kc-blue); }

/* Étapes numérotées */
.kc-steps { counter-reset: step; }
.kc-step::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px;
    background: var(--kc-orange-soft); color: var(--kc-orange-ink); font-weight: 800; margin-bottom: 1.1rem; }

/* Fiche édition */
.kc-facts .kc-fact { border: 1px solid var(--k-line); border-radius: 14px; padding: 1rem 1.2rem; background: var(--k-surface); height: 100%; }
.kc-fact dt { font-size: .75rem; color: var(--k-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kc-fact dd { margin: .25rem 0 0; font-weight: 700; color: var(--k-fg); }
.kc-sticky { position: sticky; top: 100px; }
.kc-prose { line-height: 1.75; }
.kc-prose table { width: 100%; border-collapse: collapse; }
.kc-prose td, .kc-prose th { border: 1px solid var(--k-line); padding: .5rem; }
.kc-code { font-family: ui-monospace, monospace; font-weight: 700; letter-spacing: .08em; background: var(--kc-blue-soft); color: var(--kc-blue); padding: .1rem .5rem; border-radius: 6px; }
.kc-empty { padding: 3rem; text-align: center; color: var(--k-muted); border: 1px dashed var(--k-line); border-radius: 16px; }
.kc-auth { max-width: 460px; margin: 0 auto; }
.kc-form-wide { max-width: 820px; margin: 0 auto; }
.card:has(form) { transform: none !important; } /* pas d'effet de survol sur les cartes de formulaire */

/* Espacements de section */
.space-ptb { padding: 80px 0; }
.space-pb { padding-bottom: 80px; }

/* Bandeau « épreuve ouverte » */
.kc-exam-banner { background: var(--kc-orange); color: var(--kc-night); }
.kc-exam-banner strong, .kc-exam-banner .small { color: var(--kc-night); }
