@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Condensed:wght@600;700&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    --ink: #1c3661;
    --paper: #f4f6f8;
    --paper-hot: #ffffff;
    --line: #e2e8f0;
    --text: #0f172a;
    --muted: #475569;
    --teal: #0d9488;
    --teal-bright: #14b8a6;
    --cyan: #70c8f2;
    --danger: #b42318;
    --success: #16794d;
    --radius: 12px;
    --font: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
    --display: 'IBM Plex Sans Condensed', 'IBM Plex Sans', sans-serif;
    --tmz-bg: var(--paper);
    --tmz-surface: var(--paper-hot);
    --tmz-line: var(--line);
    --tmz-text: var(--text);
    --tmz-text-secondary: var(--muted);
    --tmz-muted: var(--muted);
    --tmz-accent: var(--teal);
    --tmz-accent-light: var(--teal-bright);
    --tmz-accent-soft: #ecfdf5;
    --tmz-accent-strong: #0f766e;
    --tmz-accent-glow: rgba(13, 148, 136, 0.18);
    --tmz-danger: var(--danger);
    --tmz-success: var(--success);
    --tmz-radius: var(--radius);
    --tmz-radius-sm: 8px;
    --tmz-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    --tmz-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
}

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

html, body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

body.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #07101c;
    position: relative;
}

.app-shell__scene {
    position: fixed;
    inset: -4%;
    z-index: 0;
    pointer-events: none;
    background-color: #07101c;
    background-size: cover;
    background-position: center 46%;
    background-repeat: no-repeat;
}

.app-shell__scene::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(6, 12, 24, 0.82) 0%,
            rgba(6, 12, 24, 0.38) 16%,
            rgba(6, 12, 24, 0.22) 42%,
            rgba(6, 12, 24, 0.28) 68%,
            rgba(6, 12, 24, 0.72) 100%
        ),
        radial-gradient(
            ellipse 80% 55% at 50% 110%,
            rgba(13, 148, 136, 0.22),
            transparent 58%
        );
}

.portail-main::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0.4rem;
    width: min(36rem, calc(100% + 3rem));
    height: min(22rem, 62%);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(
        ellipse 70% 75% at 50% 30%,
        rgba(255, 255, 255, 0.16) 0%,
        rgba(255, 255, 255, 0.04) 48%,
        transparent 74%
    );
}

.app-shell__header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(7, 14, 26, 0.55);
    backdrop-filter: blur(18px) saturate(1.35);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(4, 10, 20, 0.28);
}

.app-shell__inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.7rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.app-shell__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: #f8fafc;
    min-width: 0;
}

.app-shell__mark {
    width: 0.55rem;
    height: 0.55rem;
    background: linear-gradient(135deg, var(--teal-bright), var(--teal));
    transform: rotate(45deg);
    flex-shrink: 0;
}

.app-shell__brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.app-shell__wordmark {
    font-family: var(--display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.app-shell__wordmark .ti { color: #5eead4; }

.app-shell__byline {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.72);
    letter-spacing: 0.02em;
}

.app-shell__context {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #99f6e4;
}

.portail-main {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    max-width: 32rem;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

.portail-main:has(#main-content.choose),
.portail-main:has(#main-content.col.l12) {
    max-width: 72rem;
}

.portail-main:has(#main-content.legal) {
    max-width: 48rem;
}

.portail-main:has(#main-content.gate-status) {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#main-content {
    position: relative;
    z-index: 1;
}

#main-content.gate-status {
    width: 100%;
}

#main-content.gate-status .card-content {
    text-align: center;
    padding: 2.15rem 1.6rem 1.85rem;
}

#main-content.gate-status .gate-heading {
    margin-bottom: 0.45rem;
}

#main-content.gate-status .gate-lede {
    margin: 0;
}

#main-content.gate-status .progress {
    margin: 1.35rem auto 0;
    max-width: 11rem;
}

#main-content.gate-status .collection {
    text-align: left;
}

.card-subtitle {
    padding: 0.55rem 1.45rem 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
}

.row.flex { gap: 0.85rem; }
.row.flex > .col { margin-bottom: 0; }

@media (min-width: 601px) {
    .col.m4 { width: 33.333%; }
    .col.m6 { width: 50%; }
    .col.m8 { width: 66.666%; }
}

@media (min-width: 993px) {
    .col.l3 { width: 25%; }
    .col.l4 { width: 33.333%; }
    .col.l6 { width: 50%; }
    .col.l12 { width: 100%; }
    .col.xl4 { width: 33.333%; }
}

.lang-switch {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lang-switch a {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    overflow: hidden;
    transition: border-color 0.12s ease, transform 0.12s ease, background 0.12s ease;
}

.lang-switch a:hover {
    border-color: rgba(94, 234, 212, 0.7);
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.lang-switch .flag-icon { width: 1.15rem; height: 0.85rem; }
.lang-switch .eus { font-size: 0.55rem; font-weight: 800; color: #f8fafc; }

.page-footer {
    position: relative;
    z-index: 20;
    margin-top: auto;
    padding: 0.7rem 1.5rem;
    background: rgba(7, 14, 26, 0.62);
    backdrop-filter: blur(18px) saturate(1.35);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.75rem;
    font-weight: 500;
}

.footer-copyright {
    max-width: 72rem;
    margin: 0 auto;
    text-align: center;
    line-height: 1.7;
}

.page-footer a {
    color: #5eead4;
    text-decoration: none;
    font-weight: 700;
}

.page-footer a:hover { text-decoration: underline; color: #ccfbf1; }

/* ── Auth stack ── */
.gate-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gate-stack > * {
    animation: rise 0.55s cubic-bezier(.2,.8,.2,1) both;
}

.gate-stack > *:nth-child(1) { animation-delay: 0.04s; }
.gate-stack > *:nth-child(2) { animation-delay: 0.1s; }
.gate-stack > *:nth-child(3) { animation-delay: 0.16s; }
.gate-stack > *:nth-child(4) { animation-delay: 0.22s; }
.gate-stack > *:nth-child(5) { animation-delay: 0.28s; }

.gate-heading,
.card-title {
    margin: 0 0 1.1rem;
    font-family: var(--display);
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.gate-lede {
    margin: -0.4rem 0 1.2rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.gate-links {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 1.15rem;
}

.gate-links a {
    color: var(--tmz-accent-strong);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
}

.gate-links a:hover { text-decoration: underline; }

.gate-or,
.else-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 2.4rem;
    margin: 0.15rem 0 0.85rem;
}

.gate-or::before,
.else-wrapper .line {
    content: '';
    position: absolute;
    inset: 50% 0 auto;
    height: 1px;
    background: rgba(255, 255, 255, 0.18);
}

.gate-or span,
.else-wrapper .word {
    position: relative;
    z-index: 1;
    background: rgba(7, 14, 26, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 0.12rem 0.7rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.else-wrapper .wordwrapper { position: relative; z-index: 1; }
.else-wrapper.horizontal { width: 100%; }

.gate-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.gate-actions .btn { width: 100%; }

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

@keyframes gate-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* ── Materialize mapping ── */
.container { width: 100%; margin: 0 auto; }

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

.row .col {
    padding: 0;
    margin-bottom: 0.85rem;
    width: 100%;
    max-width: 100%;
}

.gate-stack .row .col { margin-bottom: 0.4rem; }

.card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius);
    box-shadow:
        0 22px 50px rgba(4, 10, 22, 0.42),
        0 0 0 1px rgba(13, 148, 136, 0.08);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.card-content { padding: 1.45rem 1.45rem 1.2rem; }
.card-action {
    padding: 0 1.45rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.card-image {
    min-height: 7rem;
    background-size: cover;
    background-position: center;
}

.card-image .card-title {
    display: block;
    padding: 1rem 1.2rem 0;
    color: #fff;
    text-shadow: 0 1px 8px rgba(14, 28, 51, 0.55);
}

.input-field {
    position: relative;
    margin: 0.85rem 0 0.2rem;
    display: flex;
    flex-direction: column;
}

.input-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.input-field input,
.input-field textarea,
.input-field select,
input.form-control,
select.form-control,
textarea.form-control,
textarea.materialize-textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    padding: 0.72rem 0.85rem;
    font-size: 1rem;
    font-family: inherit;
}

.input-field .prefix ~ input,
.input-field .prefix ~ textarea {
    padding-right: 2.7rem;
}

.input-field .prefix {
    position: absolute;
    right: 0.65rem;
    bottom: 0.7rem;
    left: auto;
    top: auto;
    color: var(--muted);
    font-size: 1.25rem;
    cursor: pointer;
    user-select: none;
}

.input-field input:focus,
.form-control:focus {
    outline: 2px solid rgba(13, 148, 136, 0.28);
    outline-offset: 1px;
    border-color: var(--teal);
}

.gate-form .input-field:has(> button) { margin-top: 1.35rem; }

.btn,
.waves-effect.btn,
button.btn,
a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.78rem 1.15rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.92rem;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, var(--teal-bright) 0%, var(--teal) 100%);
    border: none;
    box-shadow: 0 4px 20px var(--tmz-accent-glow);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease;
}

.btn:hover,
a.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    color: #fff;
}

.gate-form button.btn {
    width: 100%;
}

.gate-form button.btn .material-icons { display: none; }

.btn.white-text { color: #fff; }

.btn.white,
a.btn.white {
    background: transparent;
    color: var(--tmz-accent-strong);
    border: 1px solid var(--line);
    box-shadow: none;
}

.btn-flat,
.btn.btn-flat,
a.btn-flat {
    background: transparent;
    color: var(--tmz-accent-strong);
    box-shadow: none;
    border: 1px solid transparent;
}

.btn-floating {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border-radius: 999px;
}

.btn-large { padding: 0.85rem 1.45rem; font-size: 0.95rem; }

.light-blue, .light-blue.darken-3, .blue, .blue.darken-3 {
    background: linear-gradient(135deg, var(--teal-bright) 0%, var(--teal) 100%) !important;
    color: #fff !important;
}

.light-blue-text, .text-darken-3, a.light-blue-text {
    color: var(--tmz-accent-strong) !important;
}

.tolower { text-transform: none; font-weight: 600; }
.padding-left-10 { padding-left: 0; }
.right { float: none; margin-left: auto; }
.valign-bottom { vertical-align: middle; }
.center, center { text-align: center; }

.logout .gate-form + .gate-form button.btn {
    background: var(--paper-hot);
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: none;
}

#toast-container {
    position: fixed;
    z-index: 2000;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: min(24rem, calc(100vw - 2rem));
}

.toast {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: var(--text);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--tmz-shadow-lg);
    animation: rise 0.25s ease;
}

.toast.red { background: var(--danger); }
.toast.green { background: var(--success); }

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(14, 28, 51, 0.5);
    padding: 1rem;
}

.modal.open, .modal:target { display: flex; }

.modal-content, .modal .modal-content {
    background: var(--paper-hot);
    border-radius: var(--radius);
    padding: 1.25rem;
    max-width: 32rem;
    width: 100%;
}

.sidenav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(22rem, 92vw);
    background: var(--paper-hot);
    border-left: 1px solid var(--line);
    z-index: 90;
    overflow: auto;
    transform: translateX(100%);
    transition: transform 0.2s ease;
    padding: 1rem;
}

.sidenav.open, .sidenav.sidenav-fixed { transform: none; }

.collapsible { list-style: none; padding: 0; margin: 0; }
.collapsible-header {
    cursor: pointer;
    font-weight: 700;
    font-family: var(--display);
    padding: 0.9rem 0 0.55rem;
    border-bottom: 1px solid var(--line);
}
.collapsible-body { display: none; padding: 0.75rem 0 1.15rem; }
.collapsible > li.active .collapsible-body { display: block; }
.lbl-ou { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 1.35rem;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--tmz-accent-strong); }

.alert { margin: 0; padding: 0; }

.card-franceconnect p {
    position: relative;
    width: 100%;
    margin: 0.4rem 0;
}

a.btn-franceconnect {
    display: flex;
    justify-content: center;
    width: 100%;
}

a.btn-franceconnect .visuel {
    width: 230px;
    height: 60px;
    background-image: url("../storage/img/providers/franceconnect-bg.jpg");
    background-size: cover;
    background-position: 0 0;
    display: inline-block;
}

a.btn-franceconnect:hover .visuel { background-position: 0 100%; }
a.fs-link:hover { text-decoration: underline; }

/* ── Choix logiciel ── */
.choose-board {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.choose-board__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius);
    box-shadow: 0 22px 50px rgba(4, 10, 22, 0.42);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.choose-board__title {
    margin: 0;
    font-family: var(--display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.choose-board__lede {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.choose-board__logout {
    flex-shrink: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--tmz-accent-strong);
    text-decoration: none;
    padding-top: 0.2rem;
}

.choose-board__logout:hover { text-decoration: underline; }

.choose-board__admin {
    font-size: 0.85rem;
    font-weight: 600;
}

.choose-search {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0 0.9rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 10px;
    box-shadow: 0 16px 36px rgba(4, 10, 22, 0.32);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.choose-search .material-icons {
    color: var(--muted);
    font-size: 1.2rem;
}

.choose-search input {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 0.78rem 0;
    font: inherit;
    font-size: 1rem;
    color: var(--text);
}

.choose-search input:focus { outline: none; }

.choose-empty {
    margin: 0;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 8px;
    color: var(--muted);
    font-weight: 600;
    box-shadow: 0 12px 28px rgba(4, 10, 22, 0.28);
}

.choose-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

.choose-tile {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(4, 10, 22, 0.38);
    min-width: 0;
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.choose-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 48px rgba(4, 10, 22, 0.48);
}

.choose-tile[hidden] { display: none; }

.choose-tile__mark {
    height: 4.6rem;
    display: grid;
    place-items: center;
    position: relative;
    background: var(--tmz-accent-soft);
    overflow: hidden;
}

.choose-tile__mark::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            -18deg,
            transparent 0 11px,
            rgba(28, 54, 97, 0.05) 11px 12px
        );
    pointer-events: none;
}

.choose-tile__glyph {
    position: relative;
    z-index: 1;
    font-size: 2.35rem;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.choose-tile__diamond {
    position: relative;
    z-index: 1;
    width: 1.15rem;
    height: 1.15rem;
    background: linear-gradient(135deg, var(--teal-bright), var(--teal));
    transform: rotate(45deg);
}

.choose-tile__mark[data-mark="camping"] { background: #ccfbf1; }
.choose-tile__mark[data-mark="chenil"] { background: #99f6e4; }
.choose-tile__mark[data-mark="cantine"] { background: #ecfdf5; }
.choose-tile__mark[data-mark="salle"] { background: #e8eef6; }
.choose-tile__mark[data-mark="cimetiere"] { background: #e2e8f0; }
.choose-tile__mark[data-mark="agenda"] { background: #f0fdfa; }
.choose-tile__mark[data-mark="port"] { background: #e0f2fe; }
.choose-tile__mark[data-mark="taxe"] { background: #d9e2ef; }
.choose-tile__mark[data-mark="association"] { background: #e8eef6; }
.choose-tile__mark[data-mark="courrier"] { background: #ecfdf5; }
.choose-tile__mark[data-mark="facturation"] { background: #e8eef6; }
.choose-tile__mark[data-mark="voyage"] { background: #ccfbf1; }
.choose-tile__mark[data-mark="tlpe"] { background: #d9e2ef; }
.choose-tile__mark[data-mark="admin"] { background: #e2e8f0; }
.choose-tile__mark[data-mark="default"] { background: var(--tmz-accent-soft); }

.choose-tile__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.75rem 0.9rem 0.9rem;
    flex: 1;
}

.choose-tile__name {
    margin: 0;
    font-family: var(--display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1.25;
}

.choose-tile__meta {
    margin: 0 0 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    line-height: 1.4;
    word-break: break-word;
}

.choose-tile__dot {
    margin: 0 0.2rem;
    font-weight: 700;
    color: var(--line);
}

.choose-tile .gate-form { margin-top: auto; }

.choose-tile .input-field {
    margin: 0;
}

.choose-tile .gate-form button.btn {
    width: auto;
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    border-radius: 8px;
    box-shadow: none;
}

.choose-tile .gate-form button.btn .material-icons {
    display: none;
}

@media (min-width: 640px) {
    .choose-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .choose-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .portail-main { padding-top: 1.35rem; }
    .choose-board__head { flex-direction: column; }
}

.input-field input.invalid {
    border-color: var(--danger);
}

span.validator {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    margin: 0.15rem 0;
}

span.validator .material-icons {
    font-size: 1.05rem;
    vertical-align: -0.2rem;
    margin-right: 0.25rem;
}

span.validator.success { color: var(--success); }
span.validator.fail { color: var(--danger); }

#errors li { color: var(--danger); font-weight: 600; }

.indicatif_new_pwd {
    display: inline-block;
    margin-left: 0.4rem;
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ink);
    word-break: break-all;
}

.input-field .prefix.material-icons.watchable { color: var(--teal); }
.input-field .prefix.material-icons:not(.watchable)::after {
    content: '/';
    position: absolute;
    right: 0.05rem;
    top: -0.55rem;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--muted);
    transform: rotate(28deg);
    pointer-events: none;
}

.progress {
    height: 0.35rem;
    margin: 1rem 0;
    overflow: hidden;
    border-radius: 999px;
    background: var(--line);
}

.progress .indeterminate {
    width: 40%;
    height: 100%;
    background: linear-gradient(135deg, var(--teal-bright), var(--teal));
    animation: slide 1.1s ease-in-out infinite;
}

@keyframes slide {
    from { transform: translateX(-120%); }
    to { transform: translateX(280%); }
}

.collection {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
}

.collection-item {
    padding: 0.75rem 0;
}

.collection-item.avatar {
    display: grid;
    grid-template-columns: 2.4rem 1fr;
    gap: 0.7rem;
    align-items: start;
}

.collection-item .circle {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--tmz-accent-soft);
    color: var(--tmz-accent-strong);
    font-size: 1.15rem;
}

.collection-item .title {
    margin: 0;
    font-family: var(--display);
    font-weight: 700;
    color: var(--ink);
}

nav#messages {
    position: relative;
    z-index: 2;
    margin: 0.75rem auto 0;
    max-width: 40rem;
    padding: 0 1.25rem;
    background: transparent;
}

nav#messages .collection-item {
    background: rgba(255, 255, 255, 0.94);
    border-radius: var(--radius);
    padding: 0.9rem 1rem;
    box-shadow: 0 16px 36px rgba(4, 10, 22, 0.32);
}

.fake-pulse {
    animation: pulse 1.4s ease-out infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.45); }
    70% { box-shadow: 0 0 0 10px rgba(13, 148, 136, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
}

.gate-busy {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 80;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(4, 10, 20, 0.55);
    backdrop-filter: blur(10px) saturate(1.2);
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
    cursor: wait;
}

body.is-busy .gate-busy,
.gate-busy:not([hidden]) {
    display: flex;
}

.gate-busy__panel {
    width: min(22rem, 100%);
    padding: 1.35rem 1.4rem 1.2rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 22px 50px rgba(4, 10, 22, 0.42);
    text-align: center;
}

.gate-busy__panel p {
    margin: 0.85rem 0 0;
    font-family: var(--display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
}

.gate-busy .progress {
    margin: 0 auto;
    max-width: 11rem;
}

.error-title {
    margin: 0 0 1rem;
    text-align: center;
    font-family: var(--display);
    font-size: clamp(4rem, 18vw, 9rem);
    font-weight: 700;
    letter-spacing: -0.06em;
    color: #fff;
    text-shadow: 0 12px 40px rgba(4, 10, 22, 0.55);
}

