:root {
    --ink: #f2f8fc;
    --muted: #a4b8c7;
    --paper: #06111d;
    --paper-deep: #091827;
    --surface: rgba(12, 29, 45, .9);
    --surface-strong: #0d2235;
    --line: rgba(128, 205, 255, .2);
    --line-strong: rgba(128, 205, 255, .42);
    --water: #41c8ff;
    --water-light: #a3e8ff;
    --water-soft: rgba(65, 200, 255, .14);
    --fire: #ff6843;
    --fire-light: #ffc064;
    --fire-soft: rgba(255, 104, 67, .15);
    --nat: var(--water);
    --nat-soft: var(--water-soft);
    --meli: var(--fire);
    --meli-soft: var(--fire-soft);
    --white: #fff;
    --error: #ff8c8c;
    --success: #6ee7b7;
    --shadow: 0 28px 80px rgba(0, 0, 0, .42);
    --glow-water: 0 0 34px rgba(65, 200, 255, .2);
    --glow-fire: 0 0 34px rgba(255, 104, 67, .2);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--paper);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 10%, rgba(255, 91, 48, .17), transparent 28rem),
        radial-gradient(circle at 92% 84%, rgba(51, 193, 255, .18), transparent 34rem),
        linear-gradient(145deg, #030a12 0%, var(--paper) 48%, #081a2a 100%);
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    background:
        radial-gradient(circle at 18% 74%, rgba(255, 186, 84, .06) 0 2px, transparent 3px),
        radial-gradient(circle at 74% 18%, rgba(123, 221, 255, .08) 0 2px, transparent 3px);
    background-size: 84px 84px, 112px 112px;
    content: "";
    pointer-events: none;
}

button,
input,
textarea {
    font: inherit;
}

button,
.button-secondary,
.file-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 11px 19px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #03111d;
    background: linear-gradient(135deg, var(--water-light), var(--water));
    box-shadow: 0 8px 24px rgba(65, 200, 255, .14);
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, opacity .18s ease;
}

@media (hover: hover) {
    button:hover,
    .button-secondary:hover,
    .file-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 32px rgba(65, 200, 255, .24);
    }
}

button:disabled {
    opacity: .5;
    cursor: wait;
    transform: none;
}

button:focus-visible,
.button-secondary:focus-visible,
.file-button:focus-within {
    outline: 3px solid var(--fire-light);
    outline-offset: 3px;
}

.button-secondary,
.file-button {
    color: var(--ink);
    border-color: var(--line-strong);
    background: rgba(6, 21, 34, .74);
    box-shadow: none;
}

input[type="password"],
input[type="text"],
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    background: rgba(3, 14, 24, .72);
    outline: none;
    caret-color: var(--water);
}

input[type="password"] {
    min-height: 48px;
    padding: 10px 13px;
}

input[type="text"] {
    min-height: 48px;
    padding: 10px 13px;
}

textarea {
    min-height: 148px;
    padding: 15px;
    resize: vertical;
    line-height: 1.6;
}

input:focus,
textarea:focus {
    border-color: var(--water);
    box-shadow: 0 0 0 3px rgba(65, 200, 255, .14), var(--glow-water);
}

.eyebrow {
    margin: 0 0 9px;
    color: var(--fire-light);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.form-message {
    min-height: 1.3em;
    margin: 11px 0 0;
    color: var(--muted);
    font-size: .88rem;
}

.form-message.is-error,
.notice.is-error {
    color: var(--error);
}

.form-message.is-success {
    color: var(--success);
}

/* Accueil et installation */

.login-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-shell {
    width: min(100%, 460px);
}

.login-card {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 7vw, 48px);
    border: 1px solid var(--line-strong);
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(15, 38, 58, .96), rgba(6, 20, 33, .96));
    box-shadow: var(--shadow), var(--glow-water), var(--glow-fire);
}

.login-card::before {
    position: absolute;
    width: 190px;
    height: 190px;
    top: -120px;
    right: -80px;
    border-radius: 50%;
    background: rgba(255, 104, 67, .2);
    box-shadow: 0 0 65px rgba(255, 104, 67, .24);
    content: "";
    pointer-events: none;
}

.login-card > * {
    position: relative;
}

.login-card > label,
.textarea-label {
    display: block;
    margin: 0 0 8px;
    color: var(--water-light);
    font-size: .79rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.password-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.install-card h1 {
    margin: 0 0 28px;
    font: 800 clamp(2rem, 8vw, 3rem)/1.05 "Trebuchet MS", Arial, sans-serif;
    letter-spacing: -.04em;
}

.install-card > input {
    margin-bottom: 20px;
}

.install-card > button {
    width: 100%;
    margin-top: 4px;
}

/* Administration */

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1320px;
    margin: 0 auto;
    padding: 34px 28px 26px;
    border-bottom: 1px solid var(--line);
}

.admin-header h1,
.section-heading h2 {
    margin: 0;
    font: 800 clamp(2rem, 5vw, 3.35rem)/1 "Trebuchet MS", Arial, sans-serif;
    letter-spacing: -.045em;
}

.admin-header h1 {
    background: linear-gradient(90deg, var(--fire-light), var(--fire) 38%, var(--water-light) 68%, var(--water));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.admin-main {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 30px 28px 56px;
}

.notice {
    display: none;
    margin-bottom: 20px;
    padding: 13px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--surface-strong);
}

.notice.is-visible {
    display: block;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(4, 16, 27, .7);
}

.admin-tab {
    flex: 1;
    color: var(--muted);
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.admin-tab.is-active {
    color: #03111d;
    background: linear-gradient(135deg, var(--fire-light), var(--fire) 45%, var(--water));
    box-shadow: 0 8px 25px rgba(65, 200, 255, .14);
}

.admin-panel {
    min-width: 0;
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.person-settings {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .2);
}

.person-settings[data-person="nat"] {
    border-color: rgba(65, 200, 255, .28);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .2), var(--glow-water);
}

.person-settings[data-person="meli"] {
    border-color: rgba(255, 104, 67, .3);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .2), var(--glow-fire);
}

.person-settings::after {
    position: absolute;
    width: 140px;
    height: 140px;
    right: -70px;
    bottom: -90px;
    border-radius: 50%;
    background: var(--nat-soft);
    filter: blur(8px);
    content: "";
    pointer-events: none;
}

.person-settings[data-person="meli"]::after {
    background: var(--meli-soft);
}

.person-settings > * {
    position: relative;
    z-index: 1;
}

.person-preview {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 21px;
}

.person-preview h2 {
    margin: 0 0 5px;
    font-size: 1.55rem;
    line-height: 1.1;
}

.person-preview p,
.section-heading-actions p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.image-placeholder {
    display: grid;
    flex: 0 0 96px;
    width: 96px;
    height: 96px;
    place-items: center;
    overflow: hidden;
    border: 3px solid var(--line-strong);
    border-radius: 50%;
    color: var(--muted);
    background: var(--paper-deep);
    font-size: 1.05rem;
    font-weight: 800;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.public-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.person-nat .public-image img {
    transform: scale(1.35);
    transform-origin: center top;
}

.person-meli .public-image img {
    transform: translateY(-12%) scale(.92);
    transform-origin: center top;
}

[data-person="nat"] .image-placeholder {
    border-color: var(--nat);
    box-shadow: var(--glow-water);
}

[data-person="meli"] .image-placeholder {
    border-color: var(--meli);
    box-shadow: var(--glow-fire);
}

.upload-form {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.file-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.anecdotes-section {
    margin-top: 58px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 25px;
}

.section-heading-actions {
    display: flex;
    max-width: 560px;
    align-items: flex-end;
    flex-direction: column;
    gap: 12px;
}

.section-heading-actions p {
    max-width: 560px;
    text-align: right;
}

.anecdotes-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.anecdote-editor {
    padding: 24px;
    border: 1px solid rgba(65, 200, 255, .25);
    border-top: 4px solid var(--nat);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(13, 34, 53, .94), rgba(7, 23, 37, .94));
    box-shadow: 0 18px 45px rgba(0, 0, 0, .2);
}

.anecdote-editor.editor-meli {
    border-color: rgba(255, 104, 67, .25);
    border-top-color: var(--meli);
}

.editor-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.editor-heading h3 {
    margin: 7px 0 0;
    font-size: 1.45rem;
    line-height: 1.1;
}

.person-badge {
    display: inline-block;
    padding: 5px 9px;
    border: 1px solid rgba(65, 200, 255, .34);
    border-radius: 999px;
    color: var(--water-light);
    background: var(--nat-soft);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.editor-meli .person-badge {
    color: var(--fire-light);
    border-color: rgba(255, 104, 67, .38);
    background: var(--meli-soft);
}

.switch-label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: .82rem;
    white-space: nowrap;
}

.active-input {
    width: 18px;
    height: 18px;
    accent-color: var(--water);
}

.editor-meli .active-input {
    accent-color: var(--meli);
}

.public-url {
    overflow: hidden;
    margin: 12px 0 18px;
    color: #7793a6;
    font-family: Consolas, monospace;
    font-size: .74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.anecdote-detail-media {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    margin: 0 0 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(3, 14, 24, .46);
}

.anecdote-detail-preview {
    display: grid;
    width: 150px;
    height: 110px;
    place-items: center;
    overflow: hidden;
    border: 1px dashed var(--line-strong);
    border-radius: 10px;
    color: var(--muted);
    background: var(--paper-deep);
    font-size: .76rem;
    text-align: center;
}

.anecdote-detail-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.anecdote-detail-label {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
}

.anecdote-detail-upload {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.anecdote-detail-remove {
    min-height: 40px;
    margin-top: 8px;
    padding-block: 8px;
}

.editor-meli .save-button {
    color: #210703;
    background: linear-gradient(135deg, var(--fire-light), var(--fire));
    box-shadow: 0 8px 24px rgba(255, 104, 67, .14);
}

/* Pages libres */

.pages-heading {
    margin-top: 8px;
}

.content-pages-list {
    display: grid;
    gap: 24px;
}

.content-page-editor {
    padding: clamp(20px, 4vw, 30px);
    border: 1px solid rgba(255, 192, 100, .26);
    border-top: 4px solid transparent;
    border-radius: 20px;
    background:
        linear-gradient(var(--surface-strong), var(--surface-strong)) padding-box,
        linear-gradient(90deg, var(--fire), var(--water)) border-box;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .24);
}

.content-page-badge {
    color: var(--fire-light);
    border-color: rgba(255, 192, 100, .35);
    background: var(--fire-soft);
}

.content-page-heading {
    overflow-wrap: anywhere;
}

.content-page-title {
    margin-bottom: 22px;
}

.rich-text-field {
    margin-bottom: 22px;
}

.rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    background: rgba(3, 14, 24, .88);
}

.rich-toolbar button {
    min-width: 42px;
    min-height: 36px;
    padding: 7px 11px;
    color: var(--ink);
    border-color: var(--line);
    border-radius: 8px;
    background: var(--surface-strong);
    box-shadow: none;
}

.rich-editor {
    min-height: 230px;
    padding: 18px;
    overflow-wrap: anywhere;
    border: 1px solid var(--line);
    border-radius: 0 0 12px 12px;
    color: var(--ink);
    background: rgba(3, 14, 24, .72);
    line-height: 1.65;
    outline: none;
}

.rich-editor:focus {
    border-color: var(--water);
    box-shadow: 0 0 0 3px rgba(65, 200, 255, .14);
}

.rich-editor:empty::before {
    color: #6f899b;
    content: "Saisissez le contenu de la page…";
    pointer-events: none;
}

.rich-editor h2,
.rich-editor h3 {
    margin: 1.2em 0 .55em;
    color: var(--fire-light);
    line-height: 1.2;
}

.rich-editor a {
    color: var(--water-light);
}

.content-page-media {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(3, 14, 24, .42);
}

.content-page-image-preview {
    display: grid;
    width: 220px;
    height: 150px;
    place-items: center;
    overflow: hidden;
    border: 1px dashed var(--line-strong);
    border-radius: 12px;
    color: var(--muted);
    background: var(--paper-deep);
}

.content-page-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.content-page-upload-form {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.content-page-qr {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid rgba(65, 200, 255, .25);
    border-radius: 14px;
    background: rgba(3, 14, 24, .56);
}

.content-page-qr canvas {
    display: block;
    width: 180px;
    max-width: 100%;
    height: auto;
    border: 8px solid #fff;
}

.content-page-url {
    overflow-wrap: anywhere;
    color: var(--muted);
    font-family: Consolas, monospace;
    font-size: .78rem;
    line-height: 1.5;
}

.danger-button {
    color: #ffd4d4;
    border-color: rgba(255, 91, 91, .45);
    background: rgba(116, 24, 24, .35);
    box-shadow: none;
}

.empty-state {
    padding: 44px 20px;
    border: 1px dashed var(--line-strong);
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
}

/* Page d’anecdote */

.anecdote-page {
    display: grid;
    place-items: center;
    padding: clamp(18px, 5vw, 60px);
}

.anecdote-page.person-nat {
    background:
        radial-gradient(circle at 50% 8%, rgba(65, 200, 255, .24), transparent 30rem),
        radial-gradient(circle at 8% 90%, rgba(255, 104, 67, .08), transparent 22rem),
        linear-gradient(160deg, #030b13, #071a2a);
}

.anecdote-page.person-meli {
    background:
        radial-gradient(circle at 50% 8%, rgba(255, 104, 67, .26), transparent 30rem),
        radial-gradient(circle at 90% 92%, rgba(65, 200, 255, .08), transparent 22rem),
        linear-gradient(160deg, #0e0808, #0a1621);
}

.public-card {
    position: relative;
    width: min(100%, 680px);
    overflow: hidden;
    padding: clamp(32px, 7vw, 68px);
    border: 1px solid rgba(65, 200, 255, .36);
    border-radius: 30px;
    background:
        linear-gradient(150deg, rgba(15, 41, 62, .96), rgba(5, 18, 30, .98));
    box-shadow: var(--shadow), var(--glow-water);
    text-align: center;
}

.person-meli .public-card {
    border-color: rgba(255, 104, 67, .4);
    box-shadow: var(--shadow), var(--glow-fire);
}

.public-card::before {
    position: absolute;
    width: 260px;
    height: 260px;
    top: -180px;
    left: -100px;
    border-radius: 50%;
    background: rgba(65, 200, 255, .2);
    box-shadow: 0 0 70px rgba(65, 200, 255, .2);
    content: "";
    pointer-events: none;
}

.person-meli .public-card::before {
    background: rgba(255, 104, 67, .22);
    box-shadow: 0 0 70px rgba(255, 104, 67, .2);
}

.public-card::after {
    position: absolute;
    width: 180px;
    height: 180px;
    right: -125px;
    bottom: -110px;
    border: 1px solid rgba(255, 104, 67, .3);
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(255, 104, 67, .12);
    content: "";
    pointer-events: none;
}

.person-meli .public-card::after {
    border-color: rgba(65, 200, 255, .3);
    box-shadow: 0 0 50px rgba(65, 200, 255, .12);
}

.public-card > * {
    position: relative;
    z-index: 1;
}

.public-kicker {
    margin: 0 0 26px;
    color: var(--water-light);
    font-size: clamp(1.55rem, 6vw, 2.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.035em;
}

.person-meli .public-kicker {
    color: var(--fire-light);
}

.public-image {
    display: grid;
    width: clamp(180px, 55vw, 290px);
    aspect-ratio: 1;
    place-items: center;
    margin: 0 auto 25px;
    overflow: hidden;
    border: 6px solid var(--nat);
    border-radius: 50%;
    color: var(--water-light);
    background: var(--paper-deep);
    box-shadow: 0 0 0 5px rgba(65, 200, 255, .1), 0 0 42px rgba(65, 200, 255, .3);
    font-size: 1.8rem;
    font-weight: 900;
}

.person-meli .public-image {
    color: var(--fire-light);
    border-color: var(--meli);
    box-shadow: 0 0 0 5px rgba(255, 104, 67, .1), 0 0 42px rgba(255, 104, 67, .3);
}

.public-person {
    margin: 0 0 8px;
    color: var(--water-light);
    font-size: .8rem;
    font-weight: 900;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.person-meli .public-person {
    color: var(--fire-light);
}

.public-card h1 {
    margin: 0;
    font-size: clamp(1.25rem, 4vw, 1.9rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.04em;
}

.ornament {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 160px;
    margin: 26px auto;
}

.ornament::before,
.ornament::after {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--water));
    content: "";
}

.ornament::after {
    background: linear-gradient(90deg, var(--water), transparent);
}

.person-meli .ornament::before {
    background: linear-gradient(90deg, transparent, var(--fire));
}

.person-meli .ornament::after {
    background: linear-gradient(90deg, var(--fire), transparent);
}

.ornament span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--water);
    box-shadow: 0 0 16px var(--water);
}

.person-meli .ornament span {
    background: var(--fire);
    box-shadow: 0 0 16px var(--fire);
}

.public-content {
    margin: 0 auto;
    max-width: 560px;
    color: #deebf3;
    font-size: clamp(1.18rem, 3.8vw, 1.55rem);
    line-height: 1.7;
    white-space: pre-line;
}

.detail-photo-button {
    margin-top: 28px;
}

.person-meli .detail-photo-button {
    color: #210703;
    background: linear-gradient(135deg, var(--fire-light), var(--fire));
    box-shadow: 0 8px 24px rgba(255, 104, 67, .18);
}

.modal-open {
    overflow: hidden;
}

.detail-photo-modal {
    position: fixed;
    z-index: 1000;
    display: grid;
    inset: 0;
    place-items: center;
    overflow: auto;
    padding:
        max(18px, env(safe-area-inset-top))
        max(18px, env(safe-area-inset-right))
        max(18px, env(safe-area-inset-bottom))
        max(18px, env(safe-area-inset-left));
    background: rgba(1, 7, 13, .88);
    backdrop-filter: blur(10px);
}

.detail-photo-dialog {
    position: relative;
    width: min(100%, 980px);
    max-height: calc(100dvh - 36px);
    padding: clamp(18px, 4vw, 34px);
    overflow: auto;
    border: 1px solid var(--line-strong);
    border-radius: 24px;
    background:
        radial-gradient(circle at 0 0, rgba(255, 104, 67, .14), transparent 20rem),
        radial-gradient(circle at 100% 100%, rgba(65, 200, 255, .14), transparent 22rem),
        var(--surface-strong);
    box-shadow: var(--shadow), var(--glow-water), var(--glow-fire);
}

.detail-photo-title {
    margin: 0 52px 18px;
    color: var(--fire-light);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .18em;
    text-align: center;
    text-transform: uppercase;
}

.detail-photo-dialog img {
    display: block;
    width: 100%;
    max-height: calc(100dvh - 150px);
    object-fit: contain;
    border-radius: 14px;
    background: rgba(3, 14, 24, .64);
}

.detail-photo-close {
    position: absolute;
    z-index: 1;
    width: 44px;
    min-height: 44px;
    top: 12px;
    right: 12px;
    padding: 0;
    border-color: var(--line-strong);
    border-radius: 50%;
    color: var(--ink);
    background: rgba(3, 14, 24, .82);
    box-shadow: none;
    font-size: 1.8rem;
    line-height: 1;
}

.error-card p:last-child {
    color: var(--muted);
}

/* Page publique libre */

.content-public-page {
    display: grid;
    place-items: center;
    padding: clamp(16px, 5vw, 60px);
}

.content-public-card {
    position: relative;
    width: min(100%, 860px);
    overflow: hidden;
    padding: clamp(28px, 7vw, 68px);
    border: 1px solid var(--line-strong);
    border-radius: 30px;
    background:
        radial-gradient(circle at 0 0, rgba(255, 104, 67, .16), transparent 23rem),
        radial-gradient(circle at 100% 100%, rgba(65, 200, 255, .14), transparent 25rem),
        linear-gradient(150deg, rgba(15, 41, 62, .97), rgba(5, 18, 30, .99));
    box-shadow: var(--shadow), var(--glow-water), var(--glow-fire);
}

.content-public-kicker {
    margin: 0 0 12px;
    color: var(--fire-light);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .22em;
    text-align: center;
    text-transform: uppercase;
}

.content-public-card > h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(2rem, 7vw, 4rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
    text-align: center;
}

.content-public-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 190px;
    margin: 28px auto;
}

.content-public-separator::before,
.content-public-separator::after {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--fire));
    content: "";
}

.content-public-separator::after {
    background: linear-gradient(90deg, var(--water), transparent);
}

.content-public-separator span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fire), var(--water));
    box-shadow: 0 0 18px rgba(255, 192, 100, .45);
}

.content-public-image {
    display: block;
    width: 100%;
    max-height: 520px;
    margin: 0 auto 34px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(3, 14, 24, .5);
}

.content-public-body {
    color: #deebf3;
    font-size: clamp(1.08rem, 3vw, 1.3rem);
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.content-public-body h2,
.content-public-body h3 {
    margin: 1.45em 0 .55em;
    color: var(--fire-light);
    line-height: 1.2;
}

.content-public-body h2 {
    font-size: clamp(1.55rem, 5vw, 2.35rem);
}

.content-public-body h3 {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
}

.content-public-body p,
.content-public-body ul,
.content-public-body ol,
.content-public-body blockquote {
    margin: 0 0 1.15em;
}

.content-public-body a {
    color: var(--water-light);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.content-public-body blockquote {
    padding: 4px 0 4px 18px;
    border-left: 3px solid var(--fire);
    color: var(--muted);
}

.content-public-error {
    text-align: center;
}

.content-public-error > p:last-child {
    color: var(--muted);
}

[hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .people-grid,
    .anecdotes-list {
        grid-template-columns: 1fr;
    }

    .admin-main {
        max-width: 760px;
    }

    .admin-header,
    .section-heading {
        align-items: flex-start;
    }

    .section-heading {
        flex-direction: column;
        gap: 12px;
    }

    .section-heading-actions {
        align-items: flex-start;
    }

    .section-heading-actions p {
        text-align: left;
    }
}

@media (max-width: 600px) {
    body {
        background:
            radial-gradient(circle at 5% 4%, rgba(255, 91, 48, .14), transparent 18rem),
            radial-gradient(circle at 100% 90%, rgba(51, 193, 255, .16), transparent 22rem),
            var(--paper);
    }

    .login-page {
        padding: 16px;
    }

    .login-card {
        padding: 26px 20px;
        border-radius: 19px;
    }

    .password-row {
        grid-template-columns: 1fr;
    }

    .password-row button {
        width: 100%;
    }

    input[type="password"],
    input[type="text"],
    textarea {
        font-size: 16px;
    }

    .admin-header {
        align-items: flex-start;
        padding: 24px 18px 20px;
    }

    .admin-header h1 {
        font-size: clamp(1.8rem, 9vw, 2.45rem);
    }

    .admin-header .button-secondary {
        flex: 0 0 auto;
        min-height: 42px;
        padding: 9px 11px;
        font-size: .76rem;
    }

    .admin-main {
        padding: 20px 16px 40px;
    }

    .person-settings,
    .anecdote-editor {
        padding: 18px;
        border-radius: 16px;
    }

    .person-preview {
        align-items: flex-start;
    }

    .image-placeholder {
        flex-basis: 78px;
        width: 78px;
        height: 78px;
    }

    .upload-form > * {
        flex: 1 1 145px;
    }

    .anecdotes-section {
        margin-top: 42px;
    }

    .editor-heading {
        flex-direction: column;
    }

    .editor-actions > * {
        width: 100%;
    }

    .anecdote-detail-media {
        grid-template-columns: 1fr;
    }

    .anecdote-detail-preview {
        width: 100%;
        height: 180px;
    }

    .anecdote-detail-upload > *,
    .anecdote-detail-remove {
        width: 100%;
    }

    .section-heading-actions,
    .section-heading-actions > button {
        width: 100%;
    }

    .admin-tabs {
        position: sticky;
        z-index: 10;
        top: 0;
        margin-inline: -4px;
        background: rgba(3, 13, 23, .96);
    }

    .content-page-media,
    .content-page-qr {
        grid-template-columns: 1fr;
    }

    .content-page-image-preview {
        width: 100%;
        height: 190px;
    }

    .content-page-upload-form > * {
        width: 100%;
    }

    .content-page-qr canvas {
        margin: 0 auto;
    }

    .content-public-page {
        display: block;
        padding:
            max(14px, env(safe-area-inset-top))
            max(14px, env(safe-area-inset-right))
            max(14px, env(safe-area-inset-bottom))
            max(14px, env(safe-area-inset-left));
    }

    .content-public-card {
        min-height: calc(100dvh - 28px);
        padding: 30px 19px;
        border-radius: 22px;
    }

    .content-public-image {
        margin-bottom: 26px;
        border-radius: 14px;
    }

    .content-public-body {
        line-height: 1.65;
    }

    .anecdote-page {
        display: block;
        padding:
            max(14px, env(safe-area-inset-top))
            max(14px, env(safe-area-inset-right))
            max(14px, env(safe-area-inset-bottom))
            max(14px, env(safe-area-inset-left));
    }

    .public-card {
        width: 100%;
        min-height: calc(100dvh - 28px);
        padding: 32px 19px;
        border-radius: 22px;
    }

    .public-kicker {
        margin-bottom: 22px;
    }

    .public-image {
        width: min(66vw, 230px);
        margin-bottom: 22px;
        border-width: 5px;
    }

    .ornament {
        margin-block: 22px;
    }

    .public-content {
        line-height: 1.6;
    }

    .detail-photo-button {
        width: 100%;
        margin-top: 24px;
    }

    .detail-photo-dialog {
        padding: 18px 12px 12px;
        border-radius: 18px;
    }

    .detail-photo-title {
        margin-bottom: 14px;
    }
}

@media (max-width: 380px) {
    .admin-header {
        flex-direction: column;
        gap: 16px;
    }

    .admin-header .button-secondary {
        width: 100%;
    }

    .person-preview {
        flex-direction: column;
    }

    .public-card {
        padding-inline: 16px;
    }

    .public-image {
        width: min(62vw, 205px);
    }
}

@media (max-height: 720px) and (min-width: 601px) {
    .anecdote-page {
        align-items: start;
        padding-block: 24px;
    }

    .public-card {
        padding-block: 38px;
    }

    .public-image {
        width: 220px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
