/* ═══════════════════════════════════════════════════════════════════════════════
   Lightbox overlay partagée – accepted.php / winners.php
   ═══════════════════════════════════════════════════════════════════════════════ */

.photo-overlay {
    display:none; position:fixed; top:0; left:0;
    width:100%; height:100%;
    background:rgba(0,0,0,0.85); z-index:9999;
    justify-content:center; align-items:center; cursor:pointer;
}
.photo-overlay.active { display:flex; }
.photo-overlay img {
    max-width:90%; max-height:90%; object-fit:contain;
    -webkit-user-select:none; user-select:none; pointer-events:none;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Photos admises – salons/accepted.php
   ═══════════════════════════════════════════════════════════════════════════════ */

.acc-wrap { max-width:1200px; margin:0 auto; padding:0 1rem 2rem; }

.acc-logos {
    display:flex; justify-content:center; align-items:flex-end;
    flex-wrap:wrap; gap:1.25rem 2rem; margin-bottom:1.25rem;
    background:#fff; border:1px solid #dde3ec; border-radius:8px;
    padding:1rem 1.5rem;
}
.acc-logo-item { display:flex; flex-direction:column; align-items:center; gap:.3rem; }
.acc-logo-item img { height:65px; width:auto; object-fit:contain; }
.acc-logo-item span { font-size:.75rem; color:#555; text-align:center; max-width:110px; }

.acc-info {
    background:#fff; border:1px solid #dde3ec; border-radius:8px;
    padding:.75rem 1.25rem; margin-bottom:1rem;
    font-size:.9rem; line-height:1.9; color:#222;
}

.acc-legend {
    display:flex; flex-wrap:wrap; gap:.4rem .75rem;
    justify-content:flex-start; margin-bottom:1.25rem;
    background:#fff; border:1px solid #dde3ec; border-radius:8px;
    padding:.6rem 1rem; font-size:.82rem; color:#444;
}
.acc-legend-item { display:flex; align-items:center; gap:.3rem; white-space:nowrap; }
.acc-legend-item img { height:20px; width:auto; vertical-align:middle; }

.section-accordion {
    margin-bottom:.6rem; border:1px solid #dde3ec;
    border-radius:8px; overflow:hidden;
}
.section-accordion summary {
    background:#e8edf5; padding:.55rem 1rem;
    font-weight:700; font-size:.92rem; color:#1a1a2e;
    cursor:pointer; list-style:none;
    display:flex; align-items:center; gap:.5rem;
}
.section-accordion summary::-webkit-details-marker { display:none; }
.section-accordion summary::before {
    content:'▶'; font-size:.68rem;
    transition:transform .2s; color:#4a6fa5;
}
.section-accordion[open] summary::before { transform:rotate(90deg); }
.section-content { overflow-x:auto; }

.acc-table { width:100%; min-width:520px; }
.acc-table-head,
.acc-table-row {
    display:grid;
    grid-template-columns:2fr 2fr 1.2fr 90px;
    gap:0; align-items:stretch;
    border-bottom:1px solid #e8edf5;
}
.acc-table-head {
    background:#f0f5ff;
    font-size:.78rem; font-weight:700; color:#4a6fa5;
}
.acc-table-head > span {
    padding:.4rem .6rem;
    border-right:1px solid #dde3ec;
}
.acc-table-head > span:last-child { border-right:none; }
.acc-table-row { background:#fff; font-size:.84rem; }
.acc-table-row:nth-child(even) { background:#f9fbff; }
.acc-table-row:last-child { border-bottom:none; }
.acc-table-row > span {
    display:flex; align-items:center;
    padding:.4rem .6rem;
    border-right:1px solid #f0f3f7; color:#222;
}
.acc-table-row > span:last-child { border-right:none; }
.acc-cell-author { font-weight:500; }
.acc-cell-awards { flex-wrap:wrap; gap:.2rem; }
.acc-cell-awards img { height:22px; width:auto; }
.acc-cell-thumb { justify-content:center; }
.acc-cell-thumb img {
    max-width:80px; max-height:60px; object-fit:contain;
    cursor:pointer; border-radius:2px;
}

@media (max-width:1024px) {
    .acc-table-head,
    .acc-table-row { grid-template-columns:1.8fr 1.8fr 1fr 75px; }
    .acc-table { min-width:460px; }
    .acc-cell-thumb img { max-width:65px; max-height:50px; }
}
@media (max-width:768px) {
    .acc-logos { gap:.75rem 1.25rem; }
    .acc-logo-item img { height:50px; }
    .acc-legend { font-size:.78rem; gap:.3rem .5rem; }
    .acc-table { min-width:0; }
    .acc-table-head { display:none; }
    .acc-table-row {
        grid-template-columns:1fr 1fr;
        grid-template-rows:auto auto;
        padding:.35rem .5rem;
        gap:.1rem .5rem;
    }
    .acc-table-row > span { border-right:none; padding:.15rem .2rem; }
    .acc-cell-author { grid-column:1; grid-row:1; font-weight:600; font-size:.82rem; }
    .acc-cell-title  { grid-column:2; grid-row:1; font-size:.82rem; }
    .acc-cell-awards { grid-column:1; grid-row:2; align-items:center; }
    .acc-cell-thumb  { grid-column:2; grid-row:2; justify-content:flex-end; }
    .acc-cell-thumb img { max-width:65px; max-height:50px; }
}
@media (max-width:480px) {
    .acc-wrap { padding:0 .5rem 1.5rem; }
    .acc-logos { padding:.75rem; }
    .acc-logo-item img { height:42px; }
    .acc-table-row { grid-template-columns:1fr; grid-template-rows:auto; padding:.4rem .5rem; }
    .acc-cell-author,
    .acc-cell-title,
    .acc-cell-awards,
    .acc-cell-thumb { grid-column:1; grid-row:auto; }
    .acc-cell-thumb { justify-content:flex-start; }
    .acc-cell-thumb img { max-width:80px; max-height:60px; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Lauréats – salons/winners.php
   ═══════════════════════════════════════════════════════════════════════════════ */

.win-wrap { max-width:1100px; margin:0 auto; padding:0 1rem 2rem; }

.win-logos {
    display:flex; justify-content:center; align-items:flex-end;
    flex-wrap:wrap; gap:1.25rem 2rem; margin-bottom:1.25rem;
    background:#fff; border:1px solid #dde3ec; border-radius:8px;
    padding:1rem 1.5rem;
}
.win-logo-item { display:flex; flex-direction:column; align-items:center; gap:.3rem; }
.win-logo-item img { height:65px; width:auto; object-fit:contain; }
.win-logo-item span { font-size:.75rem; color:#555; text-align:center; max-width:110px; }

.win-info {
    background:#fff; border:1px solid #dde3ec; border-radius:8px;
    padding:.75rem 1.25rem; margin-bottom:1rem;
    font-size:.9rem; line-height:1.9; color:#222;
}

.win-legend {
    display:flex; flex-wrap:wrap; gap:.4rem .75rem;
    justify-content:flex-start; margin-bottom:1.25rem;
    background:#fff; border:1px solid #dde3ec; border-radius:8px;
    padding:.6rem 1rem; font-size:.82rem; color:#444;
}
.win-legend-item { display:flex; align-items:center; gap:.3rem; white-space:nowrap; }
.win-legend-item img { height:20px; width:auto; vertical-align:middle; }

.win-section-title {
    font-weight:700; font-size:1.05rem; color:#fff;
    text-align:center; margin:1.5rem 0 .5rem;
    padding-bottom:.4rem; border-bottom:2px solid #e8edf5;
}

.win-table { width:100%; min-width:540px; }
.win-table-head,
.win-table-row {
    display:grid;
    grid-template-columns:2fr 2fr 1fr .8fr 90px;
    gap:0; align-items:stretch;
    border-bottom:1px solid #e8edf5;
}
.win-table-head {
    background:#f0f5ff; font-size:.78rem; font-weight:700; color:#4a6fa5;
}
.win-table-head > span { padding:.4rem .6rem; border-right:1px solid #dde3ec; }
.win-table-head > span:last-child { border-right:none; }
.win-table-row { background:#fff; font-size:.84rem; }
.win-table-row:nth-child(even) { background:#f9fbff; }
.win-table-row:last-child { border-bottom:none; }
.win-table-row > span {
    display:flex; align-items:center; padding:.4rem .6rem;
    border-right:1px solid #f0f3f7; color:#222;
}
.win-table-row > span:last-child { border-right:none; }
.win-cell-awards { flex-wrap:wrap; gap:.2rem; }
.win-cell-awards img { height:22px; width:auto; }
.win-cell-section { font-size:.78rem; color:#555; }
.win-cell-thumb { justify-content:center; }
.win-cell-thumb img {
    max-width:80px; max-height:60px; object-fit:contain;
    cursor:pointer; border-radius:2px;
}
.win-table-card { background:#fff; border:1px solid #dde3ec; border-radius:8px; overflow:hidden; }
.win-table-scroll { overflow-x:auto; }

@media (max-width:1024px) {
    .win-table-head,
    .win-table-row { grid-template-columns:1.8fr 1.8fr .9fr .8fr 75px; min-width:480px; }
    .win-cell-thumb img { max-width:65px; max-height:50px; }
}
@media (max-width:768px) {
    .win-logos { gap:.75rem 1.25rem; }
    .win-logo-item img { height:50px; }
    .win-legend { font-size:.78rem; }
    .win-table { min-width:0; }
    .win-table-head { display:none; }
    .win-table-row {
        grid-template-columns:1fr 1fr;
        grid-template-rows:auto auto auto;
        padding:.35rem .5rem; gap:.1rem .5rem;
    }
    .win-table-row > span { border-right:none; padding:.15rem .2rem; }
    .win-table-row > span:nth-child(1) { grid-column:1; grid-row:1; font-weight:600; font-size:.82rem; }
    .win-table-row > span:nth-child(2) { grid-column:2; grid-row:1; font-size:.82rem; }
    .win-table-row > span:nth-child(3) { grid-column:1; grid-row:2; }
    .win-table-row > span:nth-child(4) { grid-column:2; grid-row:2; font-size:.76rem; color:#666; }
    .win-table-row > span:nth-child(5) { grid-column:2; grid-row:3; justify-content:flex-end; }
    .win-cell-thumb img { max-width:65px; max-height:50px; }
}
@media (max-width:480px) {
    .win-wrap { padding:0 .5rem 1.5rem; }
    .win-logos { padding:.75rem; }
    .win-logo-item img { height:42px; }
    .win-table-row { grid-template-columns:1fr; grid-template-rows:auto; padding:.4rem .5rem; }
    .win-table-row > span { grid-column:1 !important; grid-row:auto !important; }
    .win-cell-thumb { justify-content:flex-start; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Sélection photos – salons/selection.php
   ═══════════════════════════════════════════════════════════════════════════════ */

.sel-wrap { max-width: 1200px; margin: 0 auto; padding: 0 1rem 2rem; }
.sel-top-card { background: #fff; border: 1px solid #dde3ec; border-radius: 8px; max-width: 560px; margin: 0 auto 1.25rem; padding: 1.25rem 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); color: #333; }
.sel-top-card .lc-field select { width: 100%; box-sizing: border-box; padding: .45rem .7rem; border: 1px solid #c8d0dc; border-radius: 4px; font-size: .95rem; background: #fff; color: #333; }
.sel-checks { display: flex; flex-direction: column; gap: .4rem; margin: .75rem 0; }
.sel-checks label { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: #333; cursor: pointer; }
.sel-seuils-card { background: #fff; border: 1px solid #dde3ec; border-radius: 8px; max-width: 560px; margin: 0 auto 1.25rem; padding: 1rem 1.5rem; color: #333; font-size: .88rem; }
.sel-seuils-grid { display: grid; grid-template-columns: 1fr repeat(3, 80px); gap: .4rem .6rem; align-items: center; }
.sel-seuils-col-head { text-align: center; font-weight: 700; font-size: .82rem; color: #4a6fa5; }
.sel-seuils-label { font-weight: 600; }
.sel-seuils-grid input[type="text"] { width: 100%; padding: .3rem .4rem; border: 1px solid #c8d0dc; border-radius: 4px; font-size: .88rem; color: #333; text-align: center; box-sizing: border-box; }
.sel-stats { background: #fff; border: 1px solid #dde3ec; border-radius: 8px; margin: 0 0 .75rem; padding: .75rem 1.25rem; color: #333; font-size: .88rem; }
.sel-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.sel-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; padding: 0 1rem; box-sizing: border-box; }
#tableSelection { border-collapse: collapse; width: 100%; white-space: nowrap; }
#salon-content #tableSelection th, #salon-wp-wrapper #tableSelection th { background: #555 !important; color: #fff !important; font-size: .75rem !important; padding: 3px 4px; text-align: center; border: 1px solid #888 !important; }
#salon-content #tableSelection td, #salon-wp-wrapper #tableSelection td { padding: 2px 4px; border: 1px solid #ccc !important; color: #111 !important; font-size: .75rem !important; background: #fff !important; }
#tableSelection tr:nth-child(even) td { background: #f5f5f5 !important; }
#tableSelection td:nth-child(7), #tableSelection td:nth-child(8), #tableSelection td:nth-child(9),
#tableSelection td:nth-child(10), #tableSelection td:nth-child(11), #tableSelection td:nth-child(15) { text-align: center; white-space: nowrap; width: 1px; }
#tableSelection.sel-rows-hidden tr[data-section] { display: none !important; }
#sel-top-btn {
    display: none; position: fixed; right: 1.25rem; bottom: 2rem; z-index: 999;
    width: 2.75rem; height: 2.75rem; border-radius: 50%; border: none; cursor: pointer;
    background: #3b82f6; color: #fff; font-size: 1.4rem; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
#sel-top-btn:hover { background: #2563eb; }
#photoOverlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
#photoOverlayImg {
    max-width: 90%;
    max-height: 90%;
    border: 2px solid #fff;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Règlement – salons/rule.php
   ═══════════════════════════════════════════════════════════════════════════════ */

.rule-wrap { max-width:1200px; margin:0 auto; padding:0 1rem 2rem; }
.rule-wrap h1, .rule-wrap h2, .rule-wrap h3 { text-align:center !important; }

@media (max-width:1024px) {
    .rule-wrap p[style], .rule-wrap div[style] {
        margin-inline-start:5% !important;
        margin-inline-end:5% !important;
    }
    .rule-wrap table {
        margin-inline-start:0 !important;
        width:100% !important;
    }
}
@media (max-width:768px) {
    .rule-wrap { padding:0 .75rem 1.5rem; }
    .rule-wrap p[style], .rule-wrap div[style] {
        margin-inline-start:0 !important;
        margin-inline-end:0 !important;
    }
    .rule-awards-wrap { overflow-x:auto; }
    .rule-awards-wrap table { min-width:400px; }
}
@media (max-width:480px) {
    .rule-wrap { padding:0 .5rem 1.5rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Histogrammes overlay — accepted.php / winners.php
   ═══════════════════════════════════════════════════════════════════════════════ */
.res-histo-bar { display:flex; flex-wrap:wrap; gap:.75rem; justify-content:center; margin-top:1rem; }
#histo-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.72); z-index:9999; align-items:center; justify-content:center; }
#histo-overlay.active { display:flex; }
#histo-overlay-box { position:relative; background:#fff; border-radius:10px; width:92vw; height:90vh; max-width:1100px; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 8px 40px rgba(0,0,0,.4); }
#histo-overlay-bar { display:flex; justify-content:space-between; align-items:center; padding:.5rem 1rem; border-bottom:1px solid #dde3ec; flex-shrink:0; }
#histo-overlay-title { font-weight:700; font-size:.95rem; color:#1a1a2e; }
#histo-overlay-close { background:none; border:none; font-size:1.6rem; line-height:1; cursor:pointer; color:#666; padding:0 .25rem; }
#histo-overlay-close:hover { color:#cc0000; }
#histo-iframe { flex:1; border:none; width:100%; }
