/* =========================================================
   public.css — styles pour les pages publiques (accueil, login, register)
   Chargé uniquement par base_public.html ; ne dépend pas de Bootstrap.
   ========================================================= */

/* --- Polices self-hébergées ------------------------------------------- */

/* Roboto latin-ext (accents français, etc.) */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/roboto-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Roboto latin */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/roboto-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Titan One latin-ext */
@font-face {
    font-family: 'Titan One';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/titan-one-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Titan One latin */
@font-face {
    font-family: 'Titan One';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/titan-one-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Variables --------------------------------------------------------- */

:root {
    --brand: #2274A5;
    --brand-dark: #1a5f85;
    --brand-rgb: 34, 116, 165;
}

/* --- Reset minimal ----------------------------------------------------- */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    color: #212529;
    background-color: #123d54;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    color: var(--brand-dark);
}

/* --- Page layout ------------------------------------------------------- */

.page-public {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #123d54;
    background-image: image-set(
        url('../images/backgroud.webp') type('image/webp'),
        url('../images/backgroud.jpeg') type('image/jpeg')
    );
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow-y: auto;
}

.app-main--landing {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.app-main--landing > .pub-alert {
    max-width: 32rem;
    width: calc(100% - 2rem);
    margin: 1rem auto 0;
}

/* --- Flash messages ---------------------------------------------------- */

.pub-alert {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    margin-bottom: 0;
}
.pub-alert-success { background: #d1e7dd; color: #0a3622; border: 1px solid #a3cfbb; }
.pub-alert-danger  { background: #f8d7da; color: #58151c; border: 1px solid #f1aeb5; }
.pub-alert-warning { background: #fff3cd; color: #664d03; border: 1px solid #ffe69c; }
.pub-alert-info    { background: #cff4fc; color: #055160; border: 1px solid #9eeaf9; }

/* --- Accessibilité ----------------------------------------------------- */

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 0.5rem;
    z-index: 10000;
    padding: 0.5rem 1rem;
    background: #fff;
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: 0 0.125rem 0.75rem rgba(0, 0, 0, 0.15);
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* --- Focus visible (RGAA 10.7) ---------------------------------------- */

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.pub-header__brand:focus-visible,
.pub-header__link:focus-visible,
.pub-pagination a:focus-visible,
.pub-name-link:focus-visible,
.pub-blog-card__link:focus-visible,
.form-check-input:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Header sits on a dark/blurred background — use white outline */
.pub-header__brand:focus-visible,
.pub-header__link:focus-visible {
    outline-color: #fff;
}

/* --- Header ------------------------------------------------------------ */

.pub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.5rem;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.pub-header__brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.pub-header__logo {
    height: 2rem;
    width: auto;
    display: block;
}

.pub-header__nav {
    display: flex;
    align-items: center;
}

.pub-header__list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pub-header__link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    padding: 0.35rem 0.8rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s;
}

.pub-header__link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.pub-header__link--cta {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.30);
}

.pub-header__link--cta:hover {
    background: rgba(255, 255, 255, 0.30);
    color: #fff;
}

/* --- Logo -------------------------------------------------------------- */

.landing-logo {
    display: block;
    width: min(100%, 16rem);
    height: auto;
    margin: 0 auto 1rem;
}

.landing-logo--compact {
    width: min(100%, 12rem);
    margin-bottom: 0.85rem;
}

/* --- Landing card ------------------------------------------------------ */

.landing-page {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    padding: clamp(1rem, 3vh, 2rem) clamp(1rem, 4vw, 2.5rem);
    padding-bottom: clamp(1rem, 3vh, 2rem);
    overflow-y: auto;
}

.landing-card {
    width: 100%;
    max-width: 40rem;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 1.25rem;
    box-shadow: 0 1.5rem 3.5rem rgba(0, 0, 0, 0.35);
    padding: clamp(1.75rem, 4vw, 2.75rem);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.landing-card--auth     { max-width: 26rem; }
.landing-card--register { max-width: 36rem; }

.landing-card__header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.landing-card__body {
    color: #4a5560;
    font-size: 0.95rem;
    line-height: 1.6;
}

.landing-card__body p {
    margin-top: 0;
    margin-bottom: 0.85rem;
}

.landing-card__footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
    font-size: 0.875rem;
    color: #6c757d;
}

.landing-card__footer a {
    color: #6c757d;
    text-decoration: none;
}

.landing-card__footer a:hover {
    color: var(--brand);
}

/* --- Typography -------------------------------------------------------- */

.landing-brand {
    font-family: 'Titan One', cursive;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--brand-dark);
}

.landing-title {
    font-size: clamp(1.5rem, 3.5vw, 1.9rem);
    font-weight: 700;
    color: #1d2b22;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.landing-title .landing-brand {
    font-size: clamp(1.85rem, 4.5vw, 2.35rem);
    color: var(--brand);
}

.landing-lead {
    font-size: 1.05rem;
    font-weight: 500;
    color: #4a5560;
    margin-top: 0;
    margin-bottom: 0;
}

.landing-lead .landing-brand { font-size: 1.2rem; color: var(--brand-dark); }
.landing-card__body .landing-brand { font-size: 1.05em; }
.landing-card__footer .landing-brand { font-size: 1em; }

.landing-outro {
    font-weight: 600;
    color: #1d2b22;
    margin-bottom: 0 !important;
}

.landing-cta          { margin-bottom: 0.25rem; }
.landing-cta a        { color: var(--brand); font-size: 0.95rem; }
.landing-cta a:hover  { color: var(--brand-dark); }

.landing-stats {
    display: flex;
    justify-content: center;
    gap: clamp(1.5rem, 6vw, 3rem);
    margin-top: 1.25rem;
    margin-bottom: 0.25rem;
}

.landing-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 5.5rem;
}

.landing-stat__value {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--brand);
}

.landing-stat__label {
    margin-top: 0.25rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.landing-note {
    margin-top: 1rem;
    margin-bottom: 0;
    text-align: center;
    font-size: 0.82rem;
    color: #6c757d;
}

/* --- Buttons ----------------------------------------------------------- */

.btn {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    transition: color 0.15s, background-color 0.15s, border-color 0.15s;
    text-decoration: none;
}

.btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
    border-radius: 0.5rem;
}

.btn-primary {
    background-color: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}

.btn-outline-secondary {
    background-color: transparent;
    border-color: #6c757d;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.w-100 { width: 100%; }

/* --- Landing CTA button group ----------------------------------------- */

.landing-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.landing-card__actions .btn {
    flex: 1 1 12rem;
}

/* --- Forms ------------------------------------------------------------- */

.form-label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.form-control,
.form-select {
    display: block;
    width: 100%;
    padding: 0.4rem 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.25rem;
}

.form-select-sm {
    padding: 0.25rem 2rem 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

.form-control:focus,
.form-select:focus {
    outline: 0;
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(var(--brand-rgb), 0.2);
}

.form-control::file-selector-button {
    padding: 0.4rem 0.75rem;
    margin: -0.4rem 0.75rem -0.4rem -0.75rem;
    color: #212529;
    background-color: #e9ecef;
    border: 0;
    border-inline-end: 1px solid #ced4da;
    border-radius: 0;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    cursor: pointer;
    transition: background-color 0.15s;
}

.form-control:hover:not(:disabled):not([readonly])::file-selector-button {
    background-color: #dde0e3;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: none;
    font-size: 0.8rem;
    color: #dc3545;
    margin-top: 0.25rem;
}

.invalid-feedback.d-block,
.is-invalid ~ .invalid-feedback {
    display: block;
}

.form-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: -0.5rem;
    margin-bottom: 0;
}

/* --- Checkbox / form-check --------------------------------------------- */

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding-left: 0;
}

.form-check-input {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin-top: 0.2rem;
    accent-color: var(--brand);
    cursor: pointer;
}

.form-check-label {
    font-size: 0.875rem;
    color: #4a5560;
    cursor: pointer;
}

/* --- Toggle switch (parité avec Bootstrap .form-switch) --------------- */

.form-switch .form-check-input {
    width: 2.25rem;
    height: 1.25rem;
    margin-top: 0.05rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 2em;
    background-color: #c4ccd4;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280,0,0,0.25%29'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
    -webkit-appearance: none;
    appearance: none;
    accent-color: auto;
    transition: background-color 0.15s ease-in-out, background-position 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.form-switch .form-check-input:checked {
    background-color: var(--brand);
    border-color: var(--brand);
    background-position: right center;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

/* --- Spacing utilities ------------------------------------------------- */

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-3 { margin-top: 1rem !important; }

/* --- Text utilities ---------------------------------------------------- */

.text-center  { text-align: center !important; }
.text-muted   { color: #6c757d !important; }
.small        { font-size: 0.875em !important; }

/* --- Flex utilities ---------------------------------------------------- */

.d-flex                   { display: flex !important; }
.justify-content-between  { justify-content: space-between !important; }
.align-items-center       { align-items: center !important; }

/* --- Grid (register form) --------------------------------------------- */
/*
 * Using CSS gap (not Bootstrap's padding-gutter approach). With gap, the
 * browser manages spacing between items independently of item widths, so
 * column widths must NOT subtract the gutter. flex:1 lets each column grow
 * equally to fill the remaining space after gaps are applied.
 */

.row {
    display: flex;
    flex-wrap: wrap;
}

.g-2 { gap: 0.5rem; }
.g-3 { gap: 1rem; }

.col-4   { flex: 1; min-width: 0; }
.col-md-6 { flex: 1 1 100%; min-width: 0; }

@media (min-width: 768px) {
    .col-md-6 { flex: 1; }
}

/* --- Club picker alert ------------------------------------------------- */

.d-none  { display: none !important; }
.d-block { display: block !important; }

.club-picker-error {
    padding: 0.4rem 0.75rem;
    background: #fff3cd;
    color: #664d03;
    border: 1px solid #ffe69c;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.club-picker-inline-row {
    margin-bottom: 0.75rem !important;
}

.club-picker-inline-row .form-label {
    font-size: 0.8rem;
}

.club-picker-inline-row .form-select {
    font-size: 0.85rem;
}

/* --- Landing register helpers ----------------------------------------- */

.landing-register {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e9ecef;
}

/* --- Concours detail page ---------------------------------------------- */

.pub-detail-nav {
    font-size: 0.82rem;
    color: #6c757d;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pub-detail-nav a { color: #6c757d; }
.pub-detail-nav a:hover { color: var(--brand); }

.pub-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.pub-detail-title {
    font-size: clamp(1.1rem, 3vw, 1.45rem);
    margin: 0;
}

.pub-region-note {
    font-size: 0.85rem;
    color: #6c757d;
}

.pub-cta-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pub-cta-box p {
    margin: 0 0 0.75rem;
    font-size: 0.92rem;
    color: #374151;
}

.pub-attribution {
    margin-top: 1.25rem;
    font-size: 0.78rem;
    color: #6c757d;
    text-align: center;
}

.pub-attribution a { color: #6c757d; }
.pub-attribution a:hover { color: #495057; }

/* --- Share button ------------------------------------------------------- */

.btn-share {
    font-size: 0.82rem;
    padding: 0.25rem 0.65rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-share--copied {
    color: #0a6640 !important;
    border-color: #0a6640 !important;
}

/* --- Concours list page ------------------------------------------------- */

.pub-list-header {
    text-align: left;
    margin-bottom: 1rem;
}

.pub-list-lead {
    font-size: 0.92rem;
}

.pub-list-empty {
    text-align: center;
    padding: 2rem 0;
    color: #6c757d;
}

.pub-list-empty-icon {
    font-size: 2.5rem;
    opacity: .35;
    margin-bottom: 0.75rem;
}

.pub-list-info {
    text-align: center;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* --- Public table cells ------------------------------------------------- */

.pub-date-cell {
    white-space: nowrap;
    font-size: 0.85rem;
}

.pub-date-arrow { color: #6c757d; }

.pub-name-link {
    font-weight: 600;
    color: #1d2b22;
}

.pub-name-link:hover { color: var(--brand); }

.pub-disc-label {
    font-size: 0.78rem;
    color: #6c757d;
}

.pub-lieu-cell { font-size: 0.88rem; }

.pub-dept-cell {
    font-size: 0.85rem;
    white-space: nowrap;
}

.pub-row-cancelled { opacity: 0.55; }

/* --- Wide card variant (concours list) --------------------------------- */

.landing-card--wide { max-width: 62rem; }
.landing-card--blog { max-width: 72rem; }

.pub-table-wrap {
    overflow-x: auto;
    margin: 0 -0.5rem;
}

/* --- Filters bar ------------------------------------------------------- */

.pub-filters__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.pub-filters__row .form-control { flex: 2 1 12rem; }
.pub-filters__row .form-select  { flex: 1 1 9rem; }

/* --- Public table ------------------------------------------------------- */

.pub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.pub-table th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.pub-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: top;
}

.pub-table tr:last-child td { border-bottom: none; }
.pub-table tr:hover td      { background-color: #f8f9fb; }

/* --- Badges ------------------------------------------------------------ */

.pub-badge {
    display: inline-block;
    padding: 0.2em 0.55em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
    white-space: nowrap;
}

.pub-badge--success   { background: #d1e7dd; color: #0a3622; }
.pub-badge--danger    { background: #f8d7da; color: #58151c; }
.pub-badge--warning   { background: #fff3cd; color: #664d03; }
.pub-badge--secondary { background: #e9ecef; color: #495057; }

/* --- Pagination -------------------------------------------------------- */

.pub-pagination {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.pub-pagination a,
.pub-pagination span {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    text-decoration: none;
    border: 1px solid #dee2e6;
    color: var(--brand);
    min-width: 2rem;
    text-align: center;
}

.pub-pagination .active  { background-color: var(--brand); border-color: var(--brand); color: #fff; }
.pub-pagination .disabled { color: #6c757d; pointer-events: none; }

/* --- Inscrits badge ---------------------------------------------------- */

.pub-inscrits-badge .bi {
    font-size: 1rem;
    opacity: 0.85;
}

.pub-inscrits-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    background: #e8f4fc;
    border: 1px solid #b8daee;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: #1a5f85;
}

/* --- CTA box ----------------------------------------------------------- */

.pub-cta-box {
    margin-top: 1.5rem;
    padding: 1.2rem 1.4rem;
    background: linear-gradient(135deg, rgba(34,116,165,.08), rgba(34,116,165,.03));
    border: 1px solid rgba(34,116,165,.2);
    border-radius: 0.75rem;
    text-align: center;
}

/* --- Description list (concours detail) -------------------------------- */

.pub-dl { margin: 0; }

.pub-dl__row {
    display: flex;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f0f2f5;
    align-items: baseline;
}

.pub-dl__row:last-child { border-bottom: none; }

.pub-dl__row dt {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 10rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: #374151;
    white-space: nowrap;
}

.pub-dl__row dt .bi {
    flex-shrink: 0;
    font-size: 0.95rem;
    color: var(--brand);
    opacity: 0.85;
}

.pub-dl__row dd {
    flex: 1;
    margin: 0;
    font-size: 0.9rem;
    color: #4a5560;
}

/* --- Blog ---------------------------------------------------------------- */

.pub-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.pub-blog-card {
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.pub-blog-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.pub-blog-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.pub-blog-card__img {
    width: 100%;
    height: 10rem;
    object-fit: cover;
    display: block;
}

.pub-blog-card__body {
    padding: 1rem 1.1rem 1.15rem;
}

.pub-blog-card__date {
    display: block;
    font-size: 0.78rem;
    color: #6c757d;
    margin-bottom: 0.35rem;
}

.pub-blog-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.35;
    color: #1a2b3c;
}

.pub-blog-card__excerpt {
    font-size: 0.88rem;
    color: #4a5560;
    margin: 0 0 0.65rem;
    line-height: 1.5;
}

.pub-blog-card__more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand);
}

.pub-blog-article__header {
    margin-bottom: 1.25rem;
}

.pub-blog-article__date {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.35rem;
}

.pub-blog-article__title {
    margin: 0;
}

/* --- Blog article layout (detail + related) ----------------------------- */

.pub-blog-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 960px) {
    .pub-blog-detail {
        grid-template-columns: minmax(0, 1fr) 15rem;
        gap: 2.5rem;
    }
}

.pub-blog-detail__main {
    min-width: 0;
}

.pub-blog-detail__aside {
    padding: 1rem 1.1rem;
    background: #f8f9fb;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
}

@media (min-width: 960px) {
    .pub-blog-detail__aside {
        position: sticky;
        top: 1rem;
    }
}

.pub-blog-related__heading {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a2b3c;
}

.pub-blog-related {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pub-blog-related__link {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 0.45rem;
    margin: -0.45rem;
    border-radius: 0.5rem;
    transition: background-color 0.15s ease;
}

.pub-blog-related__link:hover {
    background: rgba(34, 116, 165, 0.08);
}

.pub-blog-related__img {
    flex-shrink: 0;
    width: 3.5rem;
    height: 3.5rem;
    object-fit: cover;
    border-radius: 0.4rem;
    display: block;
}

.pub-blog-related__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.pub-blog-related__title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
    color: #1a2b3c;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pub-blog-related__date {
    font-size: 0.75rem;
    color: #6c757d;
}

.pub-blog-related__all {
    display: inline-block;
    margin-top: 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
}

.pub-blog-related__all:hover {
    color: var(--brand-dark);
    text-decoration: underline;
}

@media (max-width: 959px) {
    .pub-blog-related {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.75rem;
        padding-bottom: 0.35rem;
        -webkit-overflow-scrolling: touch;
    }

    .pub-blog-related li {
        flex: 0 0 14rem;
    }

    .pub-blog-related__link {
        flex-direction: column;
        align-items: stretch;
        height: 100%;
        margin: 0;
        padding: 0.65rem;
        background: #fff;
        border: 1px solid #e9ecef;
        border-radius: 0.5rem;
    }

    .pub-blog-related__img {
        width: 100%;
        height: 5.5rem;
    }
}

.pub-blog-article__figure {
    margin: 0 0 1.5rem;
    text-align: center;
}

.pub-blog-article__img {
    width: auto;
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    display: block;
    margin: 0 auto;
}

.pub-blog-article__content p {
    margin-bottom: 1rem;
}

.pub-blog-article__content p:last-child {
    margin-bottom: 0;
}

/* --- Markdown (blog) --------------------------------------------------- */

.pub-markdown__block + .pub-markdown__block,
.pub-markdown__block + .pub-blog-article__figure,
.pub-blog-article__figure + .pub-markdown__block {
    margin-top: 1rem;
}

.pub-markdown h2,
.pub-markdown h3,
.pub-markdown h4 {
    margin: 1.25rem 0 0.5rem;
    line-height: 1.3;
    color: #1a2b3c;
}

.pub-markdown h2 { font-size: 1.35rem; }
.pub-markdown h3 { font-size: 1.15rem; }
.pub-markdown h4 { font-size: 1rem; }

.pub-markdown p {
    margin: 0 0 0.85rem;
}

.pub-markdown p:last-child {
    margin-bottom: 0;
}

.pub-markdown ul,
.pub-markdown ol {
    margin: 0 0 0.85rem 1.25rem;
    padding: 0;
}

.pub-markdown li {
    margin-bottom: 0.35rem;
}

.pub-markdown a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pub-markdown a:hover {
    color: var(--brand-dark);
}

.pub-markdown blockquote {
    margin: 0 0 0.85rem;
    padding: 0.5rem 0.9rem;
    border-left: 3px solid rgba(34, 116, 165, 0.45);
    background: #f8f9fb;
    color: #4a5560;
}

.pub-markdown code {
    font-size: 0.88em;
    padding: 0.1em 0.35em;
    border-radius: 0.25rem;
    background: #eef2f6;
}

.pub-markdown pre {
    margin: 0 0 0.85rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.5rem;
    background: #1e293b;
    color: #e2e8f0;
    overflow-x: auto;
    font-size: 0.85rem;
}

.pub-markdown pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}

.pub-markdown hr {
    border: none;
    border-top: 1px solid #e9ecef;
    margin: 1.25rem 0;
}

/* --- Utilities --------------------------------------------------------- */

.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }

/* --- Nav mobile (hamburger) ------------------------------------------- */

.pub-header__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0.4rem;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0.375rem;
    cursor: pointer;
}

.pub-header__toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 1px;
    transition: opacity 0.15s;
}

/* Active state on nav links */
.pub-header__link[aria-current="page"] {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* --- Responsive -------------------------------------------------------- */

@media (max-width: 768px) {
    .landing-card__actions .btn { flex-basis: 100%; }
    .landing-card__body         { font-size: 0.9rem; }
    .landing-card--auth,
    .landing-card--register     { max-width: 100%; }

    .app-main--landing > .pub-alert {
        width: calc(100% - 1.5rem);
    }

    .col-4 { flex: 1 1 100%; }

    .pub-header {
        flex-wrap: wrap;
        align-items: center;
    }

    .pub-header__toggle {
        display: flex;
    }

    .pub-header__nav {
        flex: 0 0 100%;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        margin: 0;
        border: none;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        visibility: hidden;
        pointer-events: none;
    }

    .pub-header__nav--open {
        max-height: 20rem;
        padding: 0.6rem 0.75rem 0.75rem;
        overflow: visible;
        background: rgba(255, 255, 255, 0.10);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        visibility: visible;
        pointer-events: auto;
    }

    .pub-header__list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
    }

    .pub-header__link {
        display: block;
        width: 100%;
    }
}

.archer-avatar {
    width: 3rem;
    height: 3rem;
    min-width: 3rem;
    font-size: 1.25rem;
}

.avatar-crop-stage {
    position: relative;
    width: 220px;
    height: 220px;
    max-width: 100%;
    overflow: hidden;
    border-radius: 50%;
    background: #e9ecef;
    cursor: grab;
    touch-action: none;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .08);
    user-select: none;
}

.avatar-crop-stage:active {
    cursor: grabbing;
}

.avatar-crop-stage img {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none;
    pointer-events: none;
}
