/* =============================================================================
   relations-internationales.css — Modale à onglets
   ============================================================================= */

.ri-wrap {
    --ri-text:      #1b1b1b;
    --ri-text-soft: #5a6271;
    --ri-bg-card:   #ffffff;
    --ri-bg-soft:   #f0f2f5;
    --ri-border:    #d8dde3;
}

.ri-wrap {
    max-width: 1100px;
    margin: 0 auto;
    color: var(--ri-text);
}

/* ============ HERO ============ */
.ri-hero {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 22px 26px;
    background: linear-gradient(135deg, #003399 0%, #0078d4 100%);
    color: #fff;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    position: relative;
}
.ri-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
      radial-gradient(circle at 20% 30%, rgba(255, 204, 0, 0.18) 1.5px, transparent 2px),
      radial-gradient(circle at 70% 60%, rgba(255, 204, 0, 0.12) 1.5px, transparent 2px),
      radial-gradient(circle at 90% 20%, rgba(255, 204, 0, 0.18) 1.5px, transparent 2px),
      radial-gradient(circle at 30% 80%, rgba(255, 204, 0, 0.12) 1.5px, transparent 2px);
    background-size: 60px 60px, 80px 80px, 100px 100px, 120px 120px;
    opacity: 0.7;
    pointer-events: none;
}
.ri-hero-text { flex: 1; position: relative; z-index: 1; }
.ri-hero-title {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.ri-hero-subtitle {
    margin: 0 0 10px;
    font-size: 13px;
    opacity: 0.9;
    font-weight: 500;
}
.ri-hero-intro {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 720px;
}

.ri-hero-eu-badge {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 1;
}
.ri-hero-eu-badge svg {
    width: 36px;
    height: 24px;
    border-radius: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}
.ri-hero-eu-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    font-size: 11px;
}
.ri-hero-eu-text strong {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
}
.ri-hero-eu-text span { font-weight: 700; font-size: 12px; }

.ri-alert {
    padding: 20px 24px;
    background: rgba(255, 185, 0, 0.12);
    border-left: 4px solid #ffb900;
    border-radius: 0 8px 8px 0;
    line-height: 1.6;
    margin-top: 20px;
}
.ri-alert a { color: #0078d4; font-weight: 600; }

/* ============ BARRE D'ONGLETS ============ */
.ri-tabs-bar {
    display: flex;
    gap: 0;
    background: var(--ri-bg-soft);
    border-bottom: 2px solid var(--ri-border);
    overflow-x: auto;
    scrollbar-width: thin;
}
.ri-tabs-bar::-webkit-scrollbar { height: 4px; }
.ri-tabs-bar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 2px; }

.ri-tab {
    flex: 1 1 auto;
    min-width: 130px;
    background: transparent;
    border: none;
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--ri-text-soft);
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
    border-bottom: 3px solid transparent;
    position: relative;
    white-space: nowrap;
}
.ri-tab:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--ri-text);
}
.ri-tab.active {
    background: var(--ri-bg-card);
    color: var(--ri-tab-color);
    border-bottom-color: var(--ri-tab-color);
    font-weight: 700;
}
.ri-tab-icon {
    font-size: 24px;
    line-height: 1;
}
.ri-tab-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

/* ============ PANNEAUX ============ */
.ri-panels {
    background: var(--ri-bg-card);
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

.ri-panel {
    padding: 22px 24px;
    animation: ri-fade-in 0.3s ease;
}
.ri-panel[hidden] { display: none; }

@keyframes ri-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ri-panel-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--ri-color);
}
.ri-panel-icon {
    flex-shrink: 0;
    font-size: 30px;
    line-height: 1;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ri-color);
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.ri-panel-titles { flex: 1; min-width: 0; }
.ri-panel-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--ri-color);
    line-height: 1.2;
}
.ri-panel-subtitle {
    margin: 3px 0 0;
    font-size: 13px;
    color: var(--ri-text-soft);
    font-weight: 500;
}

/* Corps */
.ri-panel-body { /* sans slider : pleine largeur */ }
.ri-panel-body.with-slider {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

.ri-panel-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--ri-text);
}

.ri-panel-highlights {
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
}
.ri-panel-highlights li {
    background: var(--ri-bg-soft);
    border-left: 3px solid var(--ri-color);
    padding: 9px 12px;
    border-radius: 0 4px 4px 0;
    display: flex;
    flex-direction: column;
}
.ri-hl-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--ri-text-soft);
    font-weight: 700;
}
.ri-hl-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--ri-text);
    margin-top: 2px;
}

.ri-panel-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    padding: 9px 18px;
    background: var(--ri-color);
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 4px;
    transition: opacity 0.15s, transform 0.15s;
}
.ri-panel-link:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ============ SLIDER VERTICAL (composant partagé assets/js/slider.js) ============ */
.ri-card-slider-wrap {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.ri-card-slider-wrap .vslider {
    height: 320px;
    border-radius: 0;
}
.ri-slider-hint {
    font-size: 11.5px;
    color: var(--ri-text-soft);
    margin-top: 8px;
    font-style: italic;
}
/* ============ MODE SOMBRE PAGE DIRECTE ============ */
body.page-relations-internationales:not(.light) .ri-wrap {
    --ri-text:      #ffffff;
    --ri-text-soft: rgba(255, 255, 255, 0.7);
    --ri-bg-card:   #2d3a4a;
    --ri-bg-soft:   rgba(255, 255, 255, 0.06);
    --ri-border:    rgba(255, 255, 255, 0.15);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 800px) {
    .ri-hero {
        flex-direction: column;
        gap: 14px;
        padding: 18px 20px;
    }
    .ri-hero-title { font-size: 20px; }
    .ri-hero-eu-badge { align-self: flex-start; }

    .ri-tab {
        padding: 10px 12px;
        min-width: 110px;
    }
    .ri-tab-icon { font-size: 20px; }
    .ri-tab-label { font-size: 10px; }

    .ri-panel { padding: 18px; }
    .ri-panel-body.with-slider {
        grid-template-columns: 1fr;
    }
    .ri-card-slider-wrap {
        order: -1;
    }
    .ri-card-slider-wrap .vslider {
        height: 240px;
    }
}
@media (max-width: 500px) {
    .ri-tab-label {
        display: none;  /* sur mobile : juste les icônes */
    }
    .ri-tab {
        min-width: 0;
        flex: 1;
        padding: 12px 8px;
    }
    .ri-panel-header {
        padding-bottom: 12px;
        margin-bottom: 14px;
    }
    .ri-panel-icon {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }
    .ri-panel-title { font-size: 17px; }
}
