/* =======================
   IMPORT FONTS
======================= */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Share+Tech+Mono&display=swap');

/* =======================
   VARIABLES
======================= */
:root {
    --cyan:        #00f2ff;
    --cyan-dim:    rgba(0, 242, 255, 0.18);
    --cyan-glow:   rgba(0, 242, 255, 0.45);
    --cyan-border: rgba(0, 242, 255, 0.25);
    --teal:        #00cfb4;
    --blue-deep:   #020c18;
    --blue-mid:    #041424;
    --blue-panel:  rgba(4, 20, 40, 0.88);
    --green-dl:    #00ff88;
    --text-body:   #a8dde9;
    --text-dim:    #4a7a8a;
    --font-hud:    'Share Tech Mono', monospace;
    --font-title:  'Orbitron', sans-serif;
}

/* =======================
   GLOBAL
======================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; }

body {
    font-family: var(--font-title);
    background-color: var(--blue-deep);
    background-image: url(/stylesheet/images/body_background.png);
    color: var(--cyan);
    line-height: 1.5;
}

a {
    color: var(--cyan);
    text-decoration: none;
    transition: color 0.2s, text-shadow 0.2s;
}
a:hover, a:focus {
    color: #fff;
    text-shadow: 0 0 8px var(--cyan);
}
a:focus, button:focus, select:focus {
    outline: 2px dashed var(--cyan);
    outline-offset: 3px;
}

/* =======================
   CONTENEUR PRINCIPAL
======================= */
#arc-wrap {
    max-width: 960px;
    margin: 22px auto;
    position: relative;
}

/* =======================
   HERO / HEADER
======================= */
.arc-hero {
    padding: 28px 30px 24px;
    background: var(--blue-panel);
    border: 1px solid var(--cyan-border);
    border-radius: 4px 20px 4px 20px;
    box-shadow:
        0 0 0 1px rgba(0, 242, 255, 0.06),
        0 0 40px rgba(0, 242, 255, 0.07),
        inset 0 0 60px rgba(0, 20, 40, 0.6);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(6px);
    margin-bottom: 22px;
}

.arc-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 242, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.025) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

.arc-hero::after {
    content: '';
    position: absolute;
    top: -120px; left: 0; right: 0;
    height: 120px;
    background: linear-gradient(to bottom,
        transparent,
        rgba(0, 242, 255, 0.025),
        rgba(0, 242, 255, 0.06),
        rgba(0, 242, 255, 0.025),
        transparent);
    animation: holo-scan 9s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes holo-scan {
    0%   { top: -120px; }
    100% { top: 110%; }
}

.arc-hero > * { position: relative; z-index: 1; }

/* Fil d'Ariane */
.arc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-hud);
    font-size: 0.7em;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
}
.arc-breadcrumb a { color: var(--text-dim); }
.arc-breadcrumb a:hover { color: var(--cyan); text-shadow: none; }
.arc-breadcrumb .sep { opacity: 0.5; }
.arc-breadcrumb .current { color: var(--cyan); }

/* Titre */
.arc-title-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.arc-title-icon {
    flex-shrink: 0;
    width: 54px; height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 242, 255, 0.06);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 4px 16px 4px 16px;
    font-size: 1.5rem;
    box-shadow: 0 0 18px rgba(0, 242, 255, 0.1);
}

.arc-title {
    font-family: var(--font-title);
    font-size: 1.3em;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #e0f8ff;
    text-shadow: 0 0 18px var(--cyan-glow), 0 0 40px rgba(0,242,255,0.15);
    margin: 0 0 6px;
    line-height: 1.2;
}
.arc-title span { color: var(--cyan); }

.arc-subtitle {
    font-family: var(--font-hud);
    font-size: 0.78em;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    letter-spacing: 0.05em;
}
.arc-subtitle .dot { opacity: 0.4; }

/* Pastilles stats */
.arc-hero-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.arc-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    background: rgba(0, 242, 255, 0.04);
    border: 1px solid rgba(0, 242, 255, 0.15);
    border-radius: 999px;
    font-family: var(--font-hud);
    font-size: 0.74em;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}
.arc-stat-pill strong { font-weight: 700; color: var(--cyan); }
.arc-stat-pill.green strong { color: var(--green-dl); }
.arc-stat-pill.teal  strong { color: var(--teal); }

/* Bouton retour */
.arc-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.22);
    border-radius: 3px 10px 3px 10px;
    color: var(--text-body);
    font-family: var(--font-hud);
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all 0.2s ease;
}
.arc-back-btn:hover {
    background: rgba(0, 242, 255, 0.1);
    border-color: var(--cyan);
    color: #fff;
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.15);
    text-shadow: none;
    transform: translateX(-3px);
}

/* =======================
   ONGLETS
======================= */
.arc-tabs-bar {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    position: relative;
    margin-bottom: 0;
}
.arc-tabs-bar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: var(--cyan-border);
}

.arc-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(0, 10, 22, 0.6);
    border: 1px solid rgba(0, 242, 255, 0.12);
    border-bottom: none;
    border-radius: 3px 10px 0 0;
    color: var(--text-dim);
    font-family: var(--font-hud);
    font-size: 0.8em;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    bottom: 0;
    transition: all 0.18s;
    z-index: 1;
    text-transform: uppercase;
}
.arc-tab:hover {
    background: rgba(0, 242, 255, 0.06);
    border-color: rgba(0, 242, 255, 0.25);
    color: var(--text-body);
    text-shadow: none;
}
.arc-tab.active {
    background: var(--blue-panel);
    border-color: var(--cyan-border);
    border-bottom-color: var(--blue-panel);
    color: var(--cyan);
    bottom: -1px;
    padding-bottom: 11px;
    z-index: 3;
    text-shadow: 0 0 8px var(--cyan-glow);
}

.arc-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(0, 242, 255, 0.07);
    border: 1px solid rgba(0, 242, 255, 0.18);
    border-radius: 999px;
    font-size: 0.7em;
    font-weight: 800;
    color: var(--text-dim);
}
.arc-tab.active .arc-tab-badge {
    background: rgba(0, 242, 255, 0.15);
    border-color: rgba(0, 242, 255, 0.4);
    color: var(--cyan);
}

/* =======================
   PANNEAUX
======================= */
.arc-panel {
    display: none;
    background: var(--blue-panel);
    border: 1px solid var(--cyan-border);
    border-top: none;
    border-radius: 0 4px 4px 20px;
    overflow: hidden;
    backdrop-filter: blur(6px);
    animation: arcPanelIn 0.2s ease both;
    position: relative;
}
.arc-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 242, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.018) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}
.arc-panel > * { position: relative; z-index: 1; }
.arc-panel.active { display: block; }

@keyframes arcPanelIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: none; }
}

/* =======================
   TABLE
======================= */
.arc-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.arc-table-wrap::-webkit-scrollbar { height: 4px; }
.arc-table-wrap::-webkit-scrollbar-thumb {
    background: var(--cyan-border);
    border-radius: 4px;
}

table.arc-table {
    width: 100%;
    border-collapse: collapse;
}

table.arc-table thead th {
    padding: 13px 18px;
    background: rgba(0, 242, 255, 0.04);
    border-bottom: 1px solid var(--cyan-border);
    color: var(--cyan);
    font-family: var(--font-title);
    font-size: 0.66em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    white-space: nowrap;
    text-align: left;
}
table.arc-table thead th:first-child {
    border-left: 3px solid var(--cyan);
}

table.arc-table tbody tr {
    border-bottom: 1px solid rgba(0, 242, 255, 0.07);
    transition: background 0.15s;
}
table.arc-table tbody tr:last-child { border-bottom: none; }
table.arc-table tbody tr:hover td { background: rgba(0, 242, 255, 0.04); }
table.arc-table tbody tr:hover td:first-child { border-left-color: var(--teal); }

table.arc-table tbody td {
    padding: 13px 18px;
    color: var(--text-body);
    vertical-align: middle;
    font-family: var(--font-hud);
    font-size: 0.86em;
}
table.arc-table tbody td:first-child {
    border-left: 3px solid transparent;
    transition: border-color 0.2s;
    color: #e0f8ff;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* Compteur DL */
.arc-dl-count {
    font-family: var(--font-hud);
    font-size: 0.85em;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}
.arc-dash { color: var(--text-dim); }

/* Boutons téléchargement */
.arc-files-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.arc-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.28);
    border-radius: 3px 8px 3px 8px;
    color: var(--green-dl);
    font-family: var(--font-hud);
    font-size: 0.82em;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    max-width: 420px;
}
.arc-dl-btn:hover {
    background: rgba(0, 255, 136, 0.12);
    border-color: var(--green-dl);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.2);
    color: #fff;
    transform: translateX(2px);
    text-shadow: none;
}

.arc-fn {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
    white-space: nowrap;
}
.arc-sz {
    font-size: 0.78em;
    color: var(--text-dim);
    flex-shrink: 0;
}

.arc-absent {
    font-family: var(--font-hud);
    font-size: 0.8em;
    color: var(--text-dim);
    font-style: italic;
}

/* =======================
   EMPTY STATE
======================= */
.arc-empty {
    padding: 60px 30px;
    text-align: center;
}
.arc-empty-icon { font-size: 3rem; opacity: 0.25; margin-bottom: 16px; }
.arc-empty-text {
    font-family: var(--font-hud);
    font-size: 0.86em;
    color: var(--text-dim);
    letter-spacing: 0.08em;
}

/* =======================
   ERREUR FATALE
======================= */
.arc-fatal {
    padding: 16px 20px;
    background: rgba(0, 242, 255, 0.04);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-left: 3px solid var(--cyan);
    border-radius: 0 10px 10px 0;
    color: var(--text-body);
    font-family: var(--font-hud);
    font-size: 0.86em;
    letter-spacing: 0.04em;
    margin: 20px 0;
}

/* =======================
   RESPONSIVE MOBILE
======================= */
@media (max-width: 700px) {

    html { font-size: 15px; }

    #arc-wrap { margin: 10px; }

    .arc-hero {
        padding: 18px 16px;
        border-radius: 4px 14px 4px 14px;
        margin-bottom: 14px;
    }

    .arc-title { font-size: 1.05em; letter-spacing: 0.1em; }
    .arc-title-icon { width: 42px; height: 42px; font-size: 1.2rem; }

    .arc-tabs-bar { gap: 3px; }
    .arc-tab { padding: 8px 12px; font-size: 0.72em; }
    .arc-panel { border-radius: 0 4px 4px 14px; }

    table.arc-table thead th,
    table.arc-table tbody td { padding: 10px 12px; }

    .arc-dl-btn { max-width: 100%; }
    .arc-fn { max-width: 160px; }

    .arc-stat-pill { font-size: 0.68em; padding: 5px 10px; }
}
/* =======================
   BREADCRUMB — liste sémantique
======================= */
.arc-breadcrumb ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
}
.arc-breadcrumb ol li {
    display: flex;
    align-items: center;
}
.arc-breadcrumb ol li + li::before {
    content: '/';
    margin: 0 7px;
    opacity: 0.4;
    color: var(--text-dim);
}

/* =======================
   STAT PILL — orange (auto-import)
======================= */
.arc-stat-pill.orange strong { color: #ffb347; }
.arc-stat-pill.orange { border-color: rgba(255, 179, 71, 0.25); }

/* =======================
   RÉSUMÉ PAGE — visually-hidden
   (accessible mais invisible)
======================= */
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* =======================
   PAGINATION — conteneur
======================= */
.arc-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 20px 18px 22px;
    border-top: 1px solid rgba(0, 242, 255, 0.08);
    background: rgba(0, 10, 22, 0.35);
    position: relative;
}

/* Ligne décorative supérieure */
.arc-pagination::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 242, 255, 0.35) 30%,
        rgba(0, 242, 255, 0.35) 70%,
        transparent
    );
}

/* =======================
   PAGINATION — bouton générique
======================= */
.arc-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: rgba(0, 242, 255, 0.04);
    border: 1px solid rgba(0, 242, 255, 0.16);
    border-radius: 3px 8px 3px 8px;
    color: var(--text-dim);
    font-family: var(--font-hud);
    font-size: 0.8em;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    cursor: pointer;
    transition:
        background   0.18s ease,
        border-color 0.18s ease,
        color        0.18s ease,
        box-shadow   0.18s ease,
        transform    0.15s ease;
    /* Focus visible WCAG 2.1 AA */
    outline: none;
}
.arc-page-btn:focus-visible {
    outline: 2px dashed var(--cyan);
    outline-offset: 3px;
}

/* Hover (liens seulement) */
a.arc-page-btn:hover {
    background: rgba(0, 242, 255, 0.1);
    border-color: rgba(0, 242, 255, 0.5);
    color: var(--cyan);
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.18);
    transform: translateY(-1px);
    text-shadow: 0 0 8px var(--cyan-glow);
}

/* =======================
   PAGINATION — page courante
======================= */
.arc-page-btn.arc-page-current {
    background: rgba(0, 242, 255, 0.12);
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow:
        0 0 0 1px rgba(0, 242, 255, 0.15),
        0 0 14px rgba(0, 242, 255, 0.22),
        inset 0 0 12px rgba(0, 242, 255, 0.08);
    text-shadow: 0 0 10px var(--cyan-glow);
    cursor: default;
    /* Pseudo-barre inférieure façon onglet actif */
    position: relative;
}
.arc-page-btn.arc-page-current::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 15%; right: 15%;
    height: 2px;
    background: var(--cyan);
    border-radius: 2px;
    box-shadow: 0 0 6px var(--cyan-glow);
}

/* =======================
   PAGINATION — désactivé
======================= */
.arc-page-btn.disabled {
    opacity: 0.28;
    cursor: not-allowed;
    pointer-events: none;
    border-style: dashed;
}

/* =======================
   PAGINATION — Précédent / Suivant
======================= */
.arc-page-prev,
.arc-page-next {
    padding: 0 14px;
    gap: 7px;
    min-width: auto;
    font-size: 0.78em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 3px 10px 3px 10px;
}
.arc-page-prev { border-radius: 3px 10px 3px 10px; }
.arc-page-next { border-radius: 10px 3px 10px 3px; }

a.arc-page-prev:hover { transform: translateX(-2px) translateY(-1px); }
a.arc-page-next:hover { transform: translateX(2px)  translateY(-1px); }

/* =======================
   PAGINATION — liste <ol> numérotée
======================= */
.arc-page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 0; margin: 0;
}
.arc-page-numbers li {
    display: flex;
    align-items: center;
}

/* Ellipsis … */
.arc-page-ellipsis {
    color: var(--text-dim);
    font-family: var(--font-hud);
    font-size: 0.8em;
    padding: 0 4px;
    opacity: 0.5;
    user-select: none;
}

/* =======================
   PAGINATION — compteur discret
   (visible en petit sous les boutons)
======================= */
.arc-pagination-info {
    width: 100%;
    text-align: center;
    font-family: var(--font-hud);
    font-size: 0.68em;
    color: var(--text-dim);
    letter-spacing: 0.06em;
    opacity: 0.6;
    margin-top: 6px;
}
.arc-pagination-info strong {
    color: var(--cyan);
    opacity: 1;
}

/* =======================
   RESPONSIVE MOBILE
======================= */
@media (max-width: 700px) {

    .arc-pagination {
        gap: 4px;
        padding: 14px 10px 18px;
    }

    .arc-page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.76em;
        padding: 0 8px;
    }

    .arc-page-prev,
    .arc-page-next {
        padding: 0 10px;
        font-size: 0.72em;
    }

    /* Sur mobile, masque les numéros intermédiaires si trop serré */
    .arc-page-numbers li:not(:first-child):not(:last-child) .arc-page-btn:not(.arc-page-current) {
        display: none;
    }
    /* Garde toujours les ellipsis visibles */
    .arc-page-numbers li.arc-page-ellipsis { display: flex; }

    .arc-pagination-info { font-size: 0.65em; }
}

@media (max-width: 420px) {
    /* Très petit écran : masque même Précédent/Suivant, garde icône seule */
    .arc-page-prev .arc-page-label,
    .arc-page-next .arc-page-label {
        display: none;
    }
}
