/* =====================================================================
   concerts.css — Article « Branchés » (salles de concert)
   ---------------------------------------------------------------------
   Chargé après mag.css. Un seul fil conducteur : un câble jack orange
   part de l'ouverture, passe derrière le sommaire et relie les onze scènes,
   de la plus petite à la plus grande. Chaque scène a sa prise (.prise) dans
   la marge gauche ; concerts.js trace le câble d'un seul tenant et le déroule
   au fil de la lecture.
   Sans JavaScript, un simple filet vertical remplace le câble.
   ===================================================================== */

.page-concerts {
    --gutter: 132px;
    --cable: #e05c2a;
    --cable-dark: #8f3412;
    --cable-shine: #ffb48e;
    --panel: #151513;
    --panel-edge: #2a2926;
}

/* =====================
   Le câble : un seul tracé, de l'ouverture à la dernière prise
   ===================== */
/* Le SVG est placé sous le contenu de <main> (z-index -1) : textes, sommaire,
   photos et fiches passent devant lui, le câble ne gêne jamais la lecture. */
.page-cable {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: -1;
    overflow: visible;
    pointer-events: none;
}

.cable path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cable-shade {
    stroke: var(--cable-dark);
    stroke-width: 12;
}

.cable-core {
    stroke: var(--cable);
    stroke-width: 8;
}

.cable-shine {
    stroke: var(--cable-shine);
    stroke-width: 2;
    opacity: 0.55;
    transform: translate(-1.6px, -1.6px);
}

.cable-ghost {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 1.5;
    stroke-dasharray: 2 7;
    stroke-linecap: round;
}

/* =====================
   Ouverture
   ===================== */
/* Le fond de l'ouverture passe sous le câble (pseudo-élément en z-index -2) */
.page-concerts .mag-hero {
    background: none;
}

.page-concerts .mag-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 45% 60% at 78% 45%, rgba(224, 92, 42, 0.13), transparent 70%),
        var(--bg);
    /* Fondu vers le bas : pas de bord visible entre l'ouverture et la suite */
    -webkit-mask-image: linear-gradient(#000 75%, transparent);
    mask-image: linear-gradient(#000 75%, transparent);
}

.title-accent {
    color: var(--accent);
}

/* =====================
   La prise (scènes et sommaire)
   ===================== */
.prise,
.patch-jack {
    position: relative;
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background:
        radial-gradient(circle, #030303 0 5px, #5c5a55 5.5px 6.5px, #d6d2ca 7px 9.5px, #6a6862 10px 11px, #1b1a18 11.5px 100%);
    box-shadow:
        0 0 0 1px #34332f,
        0 0 0 4px var(--bg),
        0 8px 18px rgba(0, 0, 0, 0.6);
}

/* La LED à côté de la prise */
.prise::after,
.patch-jack::after {
    content: '';
    position: absolute;
    top: -6px;
    right: -9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2b2a27;
    transition: background 0.3s, box-shadow 0.3s;
}

.prise.is-on::after,
.patch-list li.is-match .patch-jack::after,
.patch-list a:hover .patch-jack::after {
    background: var(--cable);
    box-shadow: 0 0 10px var(--cable), 0 0 2px #fff;
}

/* Sans câble animé, toutes les LED sont allumées */
.scenes:not(.has-cable) .prise::after {
    background: var(--cable);
}

/* =====================
   En bref : la baie de brassage
   ===================== */
.patch {
    max-width: 1040px;
    margin: 0 auto;
    padding: 96px 20px 0;
}

.envies {
    display: none;
    margin-bottom: 28px;
    text-align: center;
}

.mag-js .envies {
    display: block;
}

.envies-title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 22px;
    font-style: italic;
    color: var(--text);
}

.envies-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.envie {
    padding: 8px 15px;
    background: transparent;
    border: 1px solid var(--border-hover);
    border-radius: 999px;
    color: var(--text);
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.envie:hover {
    border-color: var(--cable);
}

.envie[aria-pressed="true"] {
    background: var(--cable);
    border-color: var(--cable);
    color: var(--bg);
}

.envie:focus-visible {
    outline: 2px solid var(--cable);
    outline-offset: 3px;
}

.envies-result {
    min-height: 1.6em;
    margin-top: 12px;
    font-family: 'Newsreader', Georgia, serif;
    font-size: 17px;
    color: var(--text-muted);
}

.envies-result a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--cable);
    text-underline-offset: 3px;
}

.envies-result a:hover {
    color: var(--cable);
}

.patch-panel {
    position: relative;
    padding: 26px 44px 22px;
    background: linear-gradient(180deg, #1a1a17, var(--panel));
    border: 1px solid var(--panel-edge);
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 30px 60px rgba(0, 0, 0, 0.35);
}

/* Les vis du rack, aux quatre coins */
.patch-panel::before {
    content: '';
    position: absolute;
    inset: 12px;
    pointer-events: none;
    background:
        radial-gradient(circle at 5px 5px, #4b4a45 0 3px, #0e0e0d 3.5px 5px, transparent 5.5px) top left / 10px 10px no-repeat,
        radial-gradient(circle at 5px 5px, #4b4a45 0 3px, #0e0e0d 3.5px 5px, transparent 5.5px) top right / 10px 10px no-repeat,
        radial-gradient(circle at 5px 5px, #4b4a45 0 3px, #0e0e0d 3.5px 5px, transparent 5.5px) bottom left / 10px 10px no-repeat,
        radial-gradient(circle at 5px 5px, #4b4a45 0 3px, #0e0e0d 3.5px 5px, transparent 5.5px) bottom right / 10px 10px no-repeat;
}

.patch-title {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--panel-edge);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text);
}

.patch-title span:last-child {
    font-weight: 500;
    color: var(--text-muted);
}

.patch-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    margin: 18px 0 16px;
}

.patch-list a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    height: 100%;
    padding: 12px 6px 14px;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s, opacity 0.3s;
}

.patch-list a:hover {
    background: rgba(255, 255, 255, 0.04);
}

.patch-list a:focus-visible {
    outline: 2px solid var(--cable);
    outline-offset: -2px;
}

.patch-jack {
    flex: none;
    width: 26px;
    height: 26px;
    margin-bottom: 10px;
    background:
        radial-gradient(circle, #030303 0 4px, #5c5a55 4.5px 5.5px, #d6d2ca 6px 8px, #6a6862 8.5px 9px, #1b1a18 9.5px 100%);
    box-shadow: 0 0 0 1px #34332f, 0 4px 10px rgba(0, 0, 0, 0.5);
}

.patch-num {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--cable);
}

.patch-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.patch-format {
    margin-top: 3px;
    font-family: 'Newsreader', Georgia, serif;
    font-size: 14px;
    font-style: italic;
    color: var(--text-muted);
}

.patch-list.has-match li:not(.is-match) a {
    opacity: 0.3;
}

.patch-list li.is-match .patch-name {
    color: var(--cable);
}

.patch-note {
    padding-top: 14px;
    border-top: 1px solid var(--panel-edge);
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

/* =====================
   Introduction : alignée sur le texte des scènes, à droite du câble
   ===================== */
.page-concerts .mag-intro {
    max-width: 920px;
    padding-left: calc(20px + var(--gutter));
    padding-top: 112px;
}

.page-concerts .mag-intro p {
    max-width: 640px;
}

/* =====================
   Les scènes, reliées par le câble
   ===================== */
.scenes {
    position: relative;
    max-width: 920px;
    margin: 0 auto;
    padding: 64px 20px 0;
}

/* Sans JavaScript : un filet vertical relie les prises */
.scenes::before {
    content: '';
    position: absolute;
    top: 64px;
    bottom: 0;
    left: calc(20px + var(--gutter) / 2 - 1px);
    width: 2px;
    background: linear-gradient(var(--cable), var(--cable-dark));
    opacity: 0.6;
}

.scenes.has-cable::before {
    display: none;
}

.scene {
    position: relative;
    z-index: 1;
    padding-left: var(--gutter);
    scroll-margin-top: 80px;
}

.scene > .prise {
    position: absolute;
    top: 0;
    left: calc(var(--gutter) / 2);
    transform: translateX(-50%);
}

.scene-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 14px;
    min-height: 32px;
    padding-top: 6px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.scene-num {
    font-weight: 700;
    color: var(--cable);
}

.scene-format {
    font-weight: 700;
    color: var(--text);
}

.scene-jauge::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 1px;
    margin-right: 14px;
    vertical-align: middle;
    background: var(--text-dim);
}

.scene-name {
    margin: 14px 0 12px;
    font-size: clamp(44px, 6.6vw, 82px);
    line-height: 0.92;
    letter-spacing: 0.005em;
    color: var(--text);
    text-wrap: balance;
}

.scene-tags {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 19px;
    font-style: italic;
    color: var(--text-muted);
}

.scene > p {
    max-width: 640px;
    margin-top: 28px;
    font-family: 'Newsreader', Georgia, serif;
    font-optical-sizing: auto;
    font-size: 19px;
    line-height: 1.65;
    color: var(--reading);
    hyphens: auto;
    -webkit-hyphens: auto;
    text-wrap: pretty;
}

.scene > p a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--cable);
    text-underline-offset: 3px;
}

.scene > p a:hover {
    color: var(--cable);
}

/* Photos : deux images décalées, ou une seule en grand */
.scene-photos {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    align-items: start;
    gap: 14px;
    margin: 40px 0 8px;
}

.scene-photos img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 640px;
    object-fit: cover;
    border-radius: 2px;
    background: var(--bg2);
}

.scene-photos img:nth-of-type(2) {
    margin-top: 56px;
}

.scene-photos figcaption {
    grid-column: 1 / -1;
    margin-top: 4px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.scene-photos--solo {
    grid-template-columns: 1fr;
}

/* Fiche technique */
.fiche {
    max-width: 640px;
    margin-top: 36px;
    padding: 18px 24px 20px;
    background: var(--mag-sheet);
    border: 1px solid var(--border);
    border-top: 2px solid var(--cable);
    border-radius: 0 0 4px 4px;
}

.fiche-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--cable);
}

.fiche dl {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 9px 18px;
    margin-top: 14px;
}

.fiche dt {
    padding-top: 2px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.fiche dd {
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
}

.fiche a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--cable);
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.fiche a:hover {
    color: var(--cable);
}

.fiche a:focus-visible {
    outline: 2px solid var(--cable);
    outline-offset: 2px;
}

/* Entre deux scènes : une phrase le long du câble */
.liaison {
    position: relative;
    z-index: 1;
    max-width: calc(var(--gutter) + 520px);
    padding: 104px 0 104px var(--gutter);
    font-family: 'Newsreader', Georgia, serif;
    font-size: 18px;
    font-style: italic;
    line-height: 1.55;
    color: var(--text-muted);
}

/* =====================
   La carte
   ===================== */
.son-carte {
    display: none;
}

.mag-js .son-carte {
    display: block;
    max-width: 1000px;
    margin: 0 auto;
    padding: 140px 20px 0;
}

.son-carte-intro {
    margin-top: 8px;
    font-family: 'Newsreader', Georgia, serif;
    font-size: 18px;
    font-style: italic;
    color: #bdb8ae;
}

.son-map {
    height: min(460px, 70vh);
    margin-top: 18px;
    background: var(--bg);
    border: 1px solid var(--border-hover);
    border-radius: 4px;
}

.son-map .leaflet-control-attribution {
    background: rgba(12, 12, 11, 0.7);
    color: var(--text-dim);
    font-size: 9px;
}

.son-map .leaflet-control-attribution a {
    color: var(--text-muted);
}

.son-marker-wrap {
    background: none;
    border: none;
}

.son-marker {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--cable);
    box-shadow: 0 0 0 3px rgba(12, 12, 11, 0.6), 0 4px 12px rgba(0, 0, 0, 0.5);
    color: var(--text);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.son-marker:hover {
    background: var(--cable);
    color: var(--bg);
}

.son-tooltip {
    padding: 4px 8px;
    background: rgba(12, 12, 11, 0.92);
    border: 1px solid var(--border-hover);
    border-radius: 3px;
    box-shadow: none;
    color: var(--text);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.son-tooltip::before {
    display: none;
}

/* Crédits photo */
.mag-credits {
    margin-top: 28px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-dim);
}

/* =====================
   Tablette et mobile
   ===================== */
@media (max-width: 900px) {
    .patch-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .patch-list a {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 12px;
        text-align: left;
    }

    .patch-jack {
        margin-bottom: 0;
    }

    .patch-name {
        flex: 1 1 0;
        min-width: 0;
    }

    .patch-format {
        flex-basis: 100%;
        margin: 0 0 0 38px;
    }

    .patch-num {
        display: none;
    }
}

@media (max-width: 768px) {
    .page-concerts {
        --gutter: 44px;
    }

    .hero-cable {
        width: 78vw;
        opacity: 0.4;
    }

    .patch {
        padding-top: 64px;
    }

    .patch-panel {
        padding: 22px 16px 16px;
    }

    .patch-panel::before {
        inset: 7px;
    }

    .patch-title {
        padding: 0 8px 12px;
    }

    .patch-list {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .patch-list a {
        padding: 9px 8px;
    }

    .scenes {
        padding: 40px 16px 0;
    }

    .page-concerts .mag-intro {
        padding: 88px 16px 32px calc(16px + var(--gutter));
    }

    .cable-shade { stroke-width: 9; }
    .cable-core { stroke-width: 6; }
    .cable-shine { stroke-width: 1.5; transform: translate(-1.2px, -1.2px); }

    .scenes::before {
        top: 40px;
        left: calc(16px + var(--gutter) / 2 - 1px);
    }

    .prise {
        width: 26px;
        height: 26px;
        background:
            radial-gradient(circle, #030303 0 4px, #5c5a55 4.5px 5.5px, #d6d2ca 6px 8px, #6a6862 8.5px 9px, #1b1a18 9.5px 100%);
    }

    .scene-meta {
        min-height: 26px;
        padding-top: 4px;
        font-size: 12px;
        gap: 2px 10px;
    }

    .scene-jauge {
        flex-basis: 100%;
    }

    .scene-jauge::before {
        display: none;
    }

    .scene-name {
        font-size: min(calc(26px + 4vw), 11vw);
    }

    .scene-tags,
    .scene > p {
        font-size: 18px;
    }

    .scene-photos {
        gap: 8px;
        margin-left: calc(var(--gutter) * -1 + 8px);
    }

    .scene-photos img:nth-of-type(2) {
        margin-top: 28px;
    }

    .fiche {
        padding: 16px 16px 18px;
    }

    .fiche dl {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .fiche dd + dt {
        margin-top: 8px;
    }

    .liaison {
        padding: 72px 0 72px var(--gutter);
        font-size: 17px;
    }

    .mag-js .son-carte {
        padding-top: 96px;
    }
}
