/**
 * Rekick — Shortcodes — Styles front-end
 * shortcodes.css
 *
 * Reprend fidèlement la maquette rekick-nav-mockup.html
 * Préfixe .rksc- pour éviter tout conflit avec le thème WP.
 */

/* ── Variables ── */
:root {
    --rksc-ochre:  #c8882a;
    --rksc-rust:   #b84c2a;
    --rksc-cream:  #f0e8d8;
    --rksc-dark:   #1a1410;
    --rksc-brown:  #3d2b1a;
    --rksc-tan:    #d4b896;
    --rksc-green:  #4a6741;
    --rksc-paper:  #e8dfc8;
}

/* ── Reset partiel dans le scope ── */
.rksc *, .rksc *::before, .rksc *::after {
    box-sizing: border-box;
}

/* ── Label de section ── */
.rksc-section-label {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--rksc-rust);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
}
.rksc-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rksc-rust);
    opacity: 0.3;
}

/* ── Titre de page ── */
.rksc-page-title {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 0.95;
    color: var(--rksc-dark);
    letter-spacing: 0.04em;
    margin: 0 0 20px;
}
.rksc-page-title em {
    color: var(--rksc-rust);
    font-style: normal;
}

/* ── Ornement ── */
.rksc-ornament {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 28px;
    color: var(--rksc-ochre);
    font-size: 0.6rem;
    opacity: 0.5;
}
.rksc-ornament::before,
.rksc-ornament::after {
    content: '◆ ◆ ◆';
    letter-spacing: 4px;
}

/* ── Message vide ── */
.rksc-empty {
    font-family: 'Crimson Pro', Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--rksc-brown);
    opacity: 0.65;
    padding: 24px 0;
}

/* ════════════════════════════════════
   ACCUEIL — Grille matchs du moment
════════════════════════════════════ */

.rksc-home-grid {
    display: grid;
    grid-template-columns: repeat(var(--rksc-cols, 3), 1fr);
    gap: 16px;
}

/* Carte match accueil */
.rksc-match-card {
    background: var(--rksc-cream);
    border: 1px solid var(--rksc-tan);
    padding: 20px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    transition: border-color 0.2s, transform 0.15s;
}
.rksc-match-card:hover {
    border-color: var(--rksc-ochre);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.rksc-live-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--rksc-rust);
    color: var(--rksc-cream);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    padding: 2px 7px;
    animation: rksc-pulse 2s ease-in-out infinite;
}

.rksc-teams {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 0.05em;
    color: var(--rksc-dark);
    line-height: 1.2;
    margin-bottom: 6px;
}

.rksc-score {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-size: 2rem;
    color: var(--rksc-rust);
    letter-spacing: 0.1em;
    line-height: 1;
    margin-bottom: 8px;
}

.rksc-meta {
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 0.78rem;
    color: var(--rksc-brown);
    opacity: 0.65;
    font-style: italic;
}

/* ════════════════════════════════════
   JEU — Onglets + cartes détaillées
════════════════════════════════════ */

/* Barre d'onglets */
.rksc-tabs-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--rksc-ochre);
    margin-bottom: 28px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.rksc-tabs-bar::-webkit-scrollbar { display: none; }

.rksc-tab-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    border: none;
    background: transparent;
    font-family: 'Archivo Black', 'Arial Black', sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rksc-brown);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    line-height: 1.3;
}
.rksc-tab-btn:hover {
    color: var(--rksc-ochre);
    background: rgba(200,136,42,0.05);
}
.rksc-tab-btn.is-active {
    color: var(--rksc-rust);
    border-bottom-color: var(--rksc-rust);
    background: rgba(184,76,42,0.06);
}

.rksc-tab-label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rksc-live-dot {
    display: inline-block;
    width: 6px; height: 6px;
    background: var(--rksc-rust);
    border-radius: 50%;
    animation: rksc-pulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.rksc-tab-score {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    color: var(--rksc-dark);
    line-height: 1;
}
.rksc-tab-btn.is-active .rksc-tab-score {
    color: var(--rksc-rust);
}

/* Panneaux */
.rksc-panel { display: none; }
.rksc-panel.is-active { display: block; }

/* Carte match complète */
.rksc-match-card--full {
    border-left: 4px solid var(--rksc-rust);
    padding: 28px;
    margin-bottom: 24px;
    overflow: hidden;
    position: relative;
}
.rksc-match-card--full::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 120px; height: 120px;
    background: radial-gradient(circle at top right, rgba(200,136,42,0.08), transparent 70%);
    pointer-events: none;
}
.rksc-match-card--full::after {
    content: '◆';
    position: absolute;
    bottom: 12px; right: 16px;
    color: var(--rksc-ochre);
    font-size: 0.6rem;
    opacity: 0.3;
    pointer-events: none;
}

.rksc-match-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 16px;
    flex-wrap: wrap;
}

.rksc-match-teams {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 0.05em;
    color: var(--rksc-dark);
    line-height: 1;
    margin-bottom: 10px;
}

.rksc-match-score-big {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-size: 3rem;
    color: var(--rksc-rust);
    letter-spacing: 0.1em;
    line-height: 1;
    white-space: nowrap;
}

/* Chips / badges */
.rksc-match-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.rksc-chip {
    font-family: 'Archivo Black', 'Arial Black', sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 3px 10px;
    border: 1px solid var(--rksc-tan);
    color: var(--rksc-brown);
    background: var(--rksc-paper);
}
.rksc-chip--live {
    color: var(--rksc-rust);
    border-color: var(--rksc-rust);
}

/* Texte réécrit */
.rksc-match-text {
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--rksc-brown);
    margin-bottom: 0;
}

/* Drop cap */
.rksc-match-text > p:first-of-type::first-letter {
    font-size: 3rem;
    font-weight: 600;
    color: var(--rksc-rust);
    float: left;
    line-height: 0.8;
    margin-right: 6px;
    margin-top: 4px;
    font-family: 'Archivo Black', 'Arial Black', sans-serif;
}

/* Barre de statut */
.rksc-rewrite-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px dashed var(--rksc-tan);
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 0.82rem;
    color: var(--rksc-brown);
    opacity: 0.75;
    flex-wrap: wrap;
    gap: 8px;
}
.rksc-rewrite-bar strong {
    color: var(--rksc-ochre);
    font-family: 'Archivo Black', 'Arial Black', sans-serif;
    font-size: 0.72rem;
    font-style: normal;
    letter-spacing: 0.06em;
}

/* Zone commentaire */
.rksc-comment-zone {
    background: var(--rksc-paper);
    border: 1px solid var(--rksc-tan);
    padding: 20px;
    margin-bottom: 24px;
}
.rksc-comment-zone h3 {
    font-family: 'Archivo Black', 'Arial Black', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--rksc-rust);
    margin: 0 0 14px;
}
.rksc-comment-input {
    width: 100%;
    background: var(--rksc-cream);
    border: 1px solid var(--rksc-tan);
    padding: 10px 14px;
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 1rem;
    color: var(--rksc-dark);
    resize: vertical;
    outline: none;
    min-height: 80px;
    transition: border-color 0.2s;
}
.rksc-comment-input:focus {
    border-color: var(--rksc-ochre);
}
.rksc-submit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    gap: 12px;
    flex-wrap: wrap;
}
.rksc-word-count {
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 0.78rem;
    color: var(--rksc-brown);
    opacity: 0.6;
    font-style: italic;
}
.rksc-word-count.is-over {
    color: var(--rksc-rust);
    opacity: 1;
    font-weight: 600;
}
.rksc-btn-submit {
    background: var(--rksc-rust);
    color: var(--rksc-cream);
    border: none;
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.15em;
    padding: 8px 24px;
    cursor: pointer;
    transition: background 0.2s;
}
.rksc-btn-submit:hover { background: var(--rksc-ochre); }
.rksc-btn-submit:disabled { background: #aaa; cursor: not-allowed; }

/* Notices */
.rksc-notice {
    padding: 10px 14px;
    margin-bottom: 12px;
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 0.9rem;
}
.rksc-notice--success {
    background: rgba(74,103,65,0.12);
    border: 1px solid var(--rksc-green);
    color: var(--rksc-green);
}
.rksc-notice--error {
    background: rgba(184,76,42,0.1);
    border: 1px solid var(--rksc-rust);
    color: var(--rksc-rust);
}

/* Commentaires */
.rksc-comments-list {
    margin-top: 4px;
}
.rksc-comments-list h4 {
    font-family: 'Archivo Black', 'Arial Black', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rksc-brown);
    border-bottom: 1px solid var(--rksc-tan);
    padding-bottom: 8px;
    margin: 0 0 16px;
}
.rksc-comments-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.rksc-comments-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(212,184,150,0.4);
}
.rksc-comments-list li:last-child { border-bottom: none; }
.rksc-comments-list strong {
    font-family: 'Archivo Black', 'Arial Black', sans-serif;
    font-size: 0.8rem;
    color: var(--rksc-ochre);
}
.rksc-comments-list time {
    font-size: 0.75rem;
    color: var(--rksc-brown);
    opacity: 0.55;
    margin-left: 8px;
    font-style: italic;
}
.rksc-comments-list p {
    margin: 6px 0 0;
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--rksc-brown);
}

/* ════════════════════════════════════
   HISTORIQUE — Liste matchs archivés
════════════════════════════════════ */

.rksc-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rksc-history-item {
    background: var(--rksc-cream);
    border: 1px solid var(--rksc-tan);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.1s;
}
.rksc-history-item:hover {
    border-color: var(--rksc-ochre);
    text-decoration: none;
    color: inherit;
    transform: translateX(2px);
}

.rksc-hi-teams {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-size: 1.15rem;
    letter-spacing: 0.05em;
    color: var(--rksc-dark);
    flex: 0 0 auto;
}
.rksc-hi-meta {
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 0.8rem;
    color: var(--rksc-brown);
    opacity: 0.6;
    font-style: italic;
    flex: 1;
    min-width: 150px;
}
.rksc-hi-score {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    font-size: 1.4rem;
    color: var(--rksc-rust);
    letter-spacing: 0.1em;
    flex: 0 0 auto;
}
.rksc-hi-badge {
    font-family: 'Archivo Black', 'Arial Black', sans-serif;
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 8px;
    border: 1px solid var(--rksc-green);
    color: var(--rksc-green);
    flex: 0 0 auto;
}

/* ════════════════════════════════════
   Animation pulse partagée
════════════════════════════════════ */

@keyframes rksc-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* ════════════════════════════════════
   Responsive
════════════════════════════════════ */

@media (max-width: 768px) {
    .rksc-home-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    .rksc-match-header {
        flex-direction: column;
    }
    .rksc-match-score-big {
        font-size: 2.2rem;
    }
    .rksc-tab-btn {
        padding: 8px 12px;
        font-size: 0.6rem;
    }
    .rksc-history-item {
        flex-wrap: wrap;
        gap: 8px;
    }
    .rksc-hi-meta {
        flex-basis: 100%;
        order: 3;
    }
}

@media (max-width: 480px) {
    .rksc-home-grid {
        grid-template-columns: 1fr !important;
    }
}
