/* ==========================================================================
   Los Salmon — feuille de style
   ========================================================================== */

:root {
    --salmon: #fa8072;
    --salmon-dark: #e2604f;
    --salmon-soft: #ffe3dd;
    --cream: #fff8f3;
    --paper: #ffffff;
    --ink: #3d2a2a;
    --ink-soft: #7d6363;
    --line: #f3dcd4;
    --mint: #6cc4a1;
    --danger: #d64545;
    --radius: 18px;
    --shadow: 0 6px 24px rgba(160, 80, 60, .10);
    --shadow-lift: 0 12px 30px rgba(160, 80, 60, .18);

    --memo-yellow: #fff3a6;
    --memo-pink: #ffd1e3;
    --memo-salmon: #ffc9bd;
    --memo-mint: #c8f0dc;
    --memo-lavender: #e2d6ff;
    --memo-sky: #cfe8ff;

    --avatar-thibaut: #6fa8dc;
    --avatar-carla: #f48fb1;

    --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --hand: 'Caveat', 'Comic Sans MS', cursive;
}

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

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 0%, #ffe9e2 0, transparent 40%),
        radial-gradient(circle at 100% 30%, #fff0e6 0, transparent 35%),
        var(--cream);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--salmon-dark); }
a:hover { color: var(--ink); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.8rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 800; }
p { margin: 0 0 .8em; }
code { background: var(--salmon-soft); padding: .1em .35em; border-radius: 6px; font-size: .9em; }
small, .small { font-size: .85rem; }
.muted { color: var(--ink-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- En-tête & navigation ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .6rem max(1rem, env(safe-area-inset-left));
    background: rgba(255, 248, 243, .88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.brand {
    display: flex;
    align-items: center;
    gap: .4rem;
    text-decoration: none;
    color: var(--ink);
    flex-shrink: 0;
}
.brand-fish { font-size: 1.6rem; display: inline-block; animation: swim 4s ease-in-out infinite; }
.brand-name { font-family: var(--hand); font-size: 1.9rem; font-weight: 700; color: var(--salmon-dark); }
@keyframes swim { 0%, 100% { transform: translateX(0) rotate(0); } 50% { transform: translateX(4px) rotate(-6deg); } }

.mainnav { display: flex; gap: .25rem; flex: 1; justify-content: center; }
.mainnav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .8rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink-soft);
    font-weight: 700;
    font-size: .95rem;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.mainnav a:hover { background: var(--salmon-soft); color: var(--ink); }
.mainnav a.active { background: var(--salmon); color: #fff; }
.mainnav .badge { position: absolute; top: -2px; right: -2px; }

.me { text-decoration: none; flex-shrink: 0; }
.me.active .avatar { box-shadow: 0 0 0 3px var(--salmon); }

.avatar {
    display: inline-grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: var(--salmon);
    color: #fff;
    font-weight: 800;
    vertical-align: middle;
}
.avatar-lg { width: 3rem; height: 3rem; font-size: 1.3rem; }
.avatar-thibaut { background: var(--avatar-thibaut); }
.avatar-carla { background: var(--avatar-carla); }

.badge {
    display: inline-grid;
    place-items: center;
    min-width: 1.3rem;
    height: 1.3rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    vertical-align: middle;
}

/* Mobile : barre de navigation en bas de l'écran */
@media (max-width: 860px) {
    .mainnav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        justify-content: space-around;
        gap: 0;
        padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .96);
        backdrop-filter: blur(10px);
        border-top: 1px solid var(--line);
        box-shadow: 0 -4px 20px rgba(160, 80, 60, .08);
    }
    .mainnav a { flex-direction: column; gap: 0; padding: .3rem .4rem; font-size: .68rem; border-radius: 12px; }
    .mainnav a.active { background: var(--salmon-soft); color: var(--salmon-dark); }
    .nav-icon { font-size: 1.35rem; }
    .mainnav .badge { top: 0; right: 4px; }
    /* backdrop-filter créerait un repère pour la nav « fixed » : on le retire ici */
    .topbar { justify-content: space-between; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--cream); }
    body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
    .mainnav .nav-label { font-size: .6rem; }
}

/* ---------- Mise en page ---------- */

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.5rem 1rem 2rem;
    flex: 1;
}
.footer { text-align: center; color: var(--ink-soft); font-size: .85rem; padding: 1.5rem 1rem; }

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem 1rem;
    margin-bottom: 1.2rem;
}
.page-head h1 { margin: 0; display: flex; align-items: center; gap: .6rem; }
.page-head p { margin: 0; flex-basis: 100%; }
.section-title { margin-top: 1.5rem; }
.back { text-decoration: none; font-weight: 700; }

.card {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    border: 1px solid #fbebe5;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .8rem; }
.card-head h2 { margin: 0; }
.card-link { display: inline-block; margin-top: .6rem; font-weight: 700; text-decoration: none; font-size: .92rem; }
details.card > summary { list-style: none; cursor: pointer; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary:not(.btn) { font-weight: 800; }
details.card[open] > summary { margin-bottom: 1rem; }
details.card:not([open]) { background: transparent; box-shadow: none; border: 0; padding: 0; }
details.card:not([open]) > summary:not(.btn) { background: var(--paper); padding: .8rem 1.2rem; border-radius: var(--radius); box-shadow: var(--shadow); }

.two-cols { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.two-cols .card { margin: 0; }
.grid-2 { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: .9rem; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.row > input[type=text] { flex: 1; min-width: 160px; }
.row-center { justify-content: center; }

/* ---------- Formulaires & boutons ---------- */

.field { display: flex; flex-direction: column; gap: .3rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-weight: 700; font-size: .92rem; }
.field small { font-weight: 400; color: var(--ink-soft); }

input[type=text], input[type=password], input[type=date], input[type=time], select, textarea {
    width: 100%;
    font: inherit;
    color: inherit;
    padding: .65rem .85rem;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: #fffdfb;
    transition: border-color .15s, box-shadow .15s;
    min-height: 2.8rem;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--salmon); box-shadow: 0 0 0 4px var(--salmon-soft); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .6rem 1.1rem;
    border: 2px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .1s, background .15s, border-color .15s, box-shadow .15s;
    min-height: 2.6rem;
}
.btn:hover { border-color: var(--salmon); color: var(--ink); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--salmon); border-color: var(--salmon); color: #fff; box-shadow: 0 4px 14px rgba(250, 128, 114, .35); }
.btn-primary:hover { background: var(--salmon-dark); border-color: var(--salmon-dark); color: #fff; }
.btn-danger { background: #fff; border-color: #f2c3c3; color: var(--danger); }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-small { padding: .3rem .8rem; min-height: 2.1rem; font-size: .88rem; }
.btn-big { padding: .9rem 1.6rem; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    font-size: 1.05rem;
    cursor: pointer;
    text-decoration: none;
    color: var(--ink);
    transition: background .15s, transform .1s;
}
.icon-btn:hover { background: rgba(0, 0, 0, .06); }
.icon-btn:active { transform: scale(.9); }
.icon-btn-quiet { opacity: .45; }
.icon-btn-quiet:hover { opacity: 1; }

.toggle { display: flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 600; }
.toggle input { width: 1.2rem; height: 1.2rem; accent-color: var(--salmon); }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem; }
.chips form { margin: 0; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .9rem;
    border-radius: 999px;
    background: var(--paper);
    border: 2px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
}
.chip small { color: var(--ink-soft); }
.chip:hover { border-color: var(--salmon); color: var(--ink); }
.chip.active { background: var(--salmon); border-color: var(--salmon); color: #fff; }
.chip.active small { color: #ffe9e5; }

.flash {
    padding: .8rem 1rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    font-weight: 700;
    background: #e5f7ee;
    color: #23714f;
    border: 1px solid #bfe9d3;
    transition: opacity .4s, transform .4s;
}
.flash-error { background: #fdeaea; color: #a33030; border-color: #f5c6c6; }
.flash.is-hiding { opacity: 0; transform: translateY(-6px); }

.empty { text-align: center; padding: 2.5rem 1rem; color: var(--ink-soft); }
.empty-icon { font-size: 3.5rem; margin-bottom: .5rem; }

.progress { display: inline-block; width: 100%; height: 8px; border-radius: 99px; background: var(--salmon-soft); overflow: hidden; vertical-align: middle; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--salmon), #ffb199); border-radius: 99px; }
.progress-lg { height: 12px; margin-bottom: 1rem; }
.progress-line { display: flex; align-items: center; gap: .5rem; }

.danger-zone { margin-top: 1rem; }

/* ---------- Pages invité (connexion / installation) ---------- */

body.guest { justify-content: center; align-items: center; padding: 1.5rem 1rem; overflow-x: hidden; }
.guest-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    background: var(--paper);
    border-radius: 28px;
    box-shadow: var(--shadow-lift);
    padding: 2rem 1.6rem;
    text-align: center;
}
.guest-logo { font-size: 3.2rem; animation: swim 4s ease-in-out infinite; }
.guest-title { font-family: var(--hand); font-size: 3rem; color: var(--salmon-dark); margin: 0; }
.guest-subtitle { color: var(--ink-soft); margin-bottom: 1.5rem; }
.guest-card form { text-align: left; }
.who { border: 0; padding: 0; margin: 0; }
.who legend { font-weight: 800; margin-bottom: .6rem; width: 100%; text-align: center; }
.who-choices { display: flex; gap: .8rem; justify-content: center; }
.who-choice { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .9rem .5rem; border: 2px solid var(--line); border-radius: 18px; cursor: pointer; font-weight: 800; transition: border-color .15s, background .15s, transform .15s; }
.who-choice input { position: absolute; opacity: 0; pointer-events: none; }
.who-choice:hover { transform: translateY(-2px); }
.who-choice:has(input:checked) { border-color: var(--salmon); background: var(--salmon-soft); }
.who-choice:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--salmon-soft); }

.bubbles { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.bubbles span { position: absolute; bottom: -3rem; font-size: 1.8rem; opacity: .5; animation: rise 14s linear infinite; }
.bubbles span:nth-child(1) { left: 8%; animation-delay: 0s; }
.bubbles span:nth-child(2) { left: 25%; animation-delay: 3s; font-size: 2.4rem; }
.bubbles span:nth-child(3) { left: 45%; animation-delay: 6s; }
.bubbles span:nth-child(4) { left: 65%; animation-delay: 1.5s; }
.bubbles span:nth-child(5) { left: 80%; animation-delay: 8s; font-size: 2.2rem; }
.bubbles span:nth-child(6) { left: 92%; animation-delay: 4.5s; }
@keyframes rise { to { transform: translateY(-115vh) rotate(25deg); } }
@media (prefers-reduced-motion: reduce) {
    .bubbles, .brand-fish, .guest-logo { animation: none; }
    .bubbles { display: none; }
}

/* ---------- Accueil ---------- */

.hero { text-align: center; margin: .5rem 0 1.8rem; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: .2rem; }
.hero-sub { color: var(--ink-soft); margin: 0; font-weight: 600; }
.together { display: inline-block; margin-top: .8rem; padding: .4rem 1rem; border-radius: 999px; background: var(--paper); box-shadow: var(--shadow); font-weight: 600; }
.together strong { color: var(--salmon-dark); font-size: 1.15em; }
.wave { display: inline-block; animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.2); } 30% { transform: scale(1); } }

.dash { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); align-items: start; }
.dash .card { margin: 0; }
.subhead { font-size: 1rem; margin-top: 1.4rem; }

.polaroid { margin: 0 auto 1rem; background: #fff; padding: .7rem .7rem 0; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); transform: rotate(-1.5deg); max-width: 380px; }
.polaroid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.polaroid figcaption { font-family: var(--hand); font-size: 1.5rem; text-align: center; padding: .4rem 0 .6rem; min-height: 2.6rem; }
.polaroid figcaption small { display: block; font-family: var(--font); font-size: .8rem; color: var(--ink-soft); }
.thumb-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: .35rem; }
.thumb-strip img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

.memo-mini-list { display: flex; flex-direction: column; gap: .6rem; }
.memo-mini { display: block; padding: .7rem .9rem; border-radius: 4px 14px 14px 14px; text-decoration: none; color: var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .06); transition: transform .15s; }
.memo-mini:hover { transform: translateX(3px); color: var(--ink); }
.memo-mini .memo-text { font-family: var(--hand); font-size: 1.35rem; line-height: 1.2; display: block; }
.memo-mini .memo-meta { font-size: .8rem; color: var(--ink-soft); }

.idea-spot { text-align: center; padding: .4rem 0; }
.idea-spot-cat { margin: 0; font-weight: 700; color: var(--ink-soft); font-size: .9rem; }
.idea-spot-title { font-family: var(--hand); font-size: 2rem; line-height: 1.1; margin: .2rem 0 .6rem; color: var(--salmon-dark); }
.idea-spot .row { justify-content: center; }

.mini-projects { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.mini-projects a { text-decoration: none; font-weight: 700; color: var(--ink); }

/* ---------- Évènements à venir ---------- */

.upcoming { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.up-item { display: flex; align-items: center; gap: .8rem; padding: .55rem; border-radius: 14px; background: #fffaf7; border: 1px solid #fbebe5; }
.up-item.is-soon { background: #fff4ef; border-color: #ffd5ca; }
.up-item.is-now { background: var(--salmon-soft); border-color: var(--salmon); }
.up-date { flex-shrink: 0; width: 3.2rem; text-align: center; background: #fff; border-radius: 12px; padding: .25rem 0; box-shadow: 0 2px 6px rgba(0, 0, 0, .06); text-decoration: none; color: var(--ink); }
.up-day { display: block; font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.up-month { display: block; font-size: .72rem; text-transform: uppercase; color: var(--salmon-dark); font-weight: 800; }
.up-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.up-title { font-weight: 800; text-decoration: none; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.up-title small { color: var(--ink-soft); font-weight: 600; }
.up-when { font-size: .82rem; color: var(--ink-soft); }
.countdown { flex-shrink: 0; font-size: .78rem; font-weight: 800; padding: .25rem .6rem; border-radius: 999px; background: #fff; color: var(--salmon-dark); border: 1px solid #ffd5ca; }
.is-now .countdown { background: var(--salmon); color: #fff; border-color: var(--salmon); }

/* ---------- Mots doux ---------- */

.memo-yellow { background: var(--memo-yellow); }
.memo-pink { background: var(--memo-pink); }
.memo-salmon { background: var(--memo-salmon); }
.memo-mint { background: var(--memo-mint); }
.memo-lavender { background: var(--memo-lavender); }
.memo-sky { background: var(--memo-sky); }

.memo-composer textarea { font-family: var(--hand); font-size: 1.5rem; line-height: 1.25; border-style: dashed; }
.composer-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem; margin-top: .8rem; }
.swatches { display: flex; gap: .45rem; }
.swatch { width: 2rem; height: 2rem; border-radius: 50%; cursor: pointer; border: 2px solid rgba(0, 0, 0, .08); transition: transform .15s; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch:hover { transform: scale(1.12); }
.swatch:has(input:checked) { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--salmon); }

.memo-wall { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); padding: .5rem 0; }
.memo {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    padding: 1.3rem 1.1rem .6rem;
    box-shadow: 0 10px 18px -8px rgba(80, 40, 30, .35), 0 2px 4px rgba(0, 0, 0, .05);
    transform: rotate(var(--tilt, 0deg));
    transition: transform .2s, box-shadow .2s;
    border-radius: 2px 2px 2px 26px / 2px 2px 2px 14px;
    scroll-margin-top: 90px;
}
.memo::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    width: 80px;
    height: 22px;
    transform: translateX(-50%) rotate(-2deg);
    background: rgba(255, 255, 255, .55);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.memo.is-pinned::before { display: none; }
.memo:hover, .memo:target { transform: rotate(0) scale(1.03); box-shadow: 0 16px 28px -10px rgba(80, 40, 30, .4); z-index: 2; }
.memo .pin { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 1.6rem; }
.memo-text { font-family: var(--hand); font-size: 1.6rem; line-height: 1.2; flex: 1; margin: 0 0 .8rem; word-wrap: break-word; overflow-wrap: anywhere; }
.memo-foot { display: flex; align-items: center; justify-content: space-between; gap: .3rem; flex-wrap: wrap; }
.memo-meta { font-size: .8rem; color: rgba(61, 42, 42, .7); font-weight: 600; }
.memo-actions { display: flex; }
.memo-actions form { margin: 0; }
.memo-actions .icon-btn { width: 1.9rem; height: 1.9rem; font-size: .95rem; }
.new-tag { position: absolute; top: .5rem; right: .5rem; background: var(--danger); color: #fff; font-size: .65rem; font-weight: 800; text-transform: uppercase; padding: .15rem .45rem; border-radius: 99px; letter-spacing: .03em; }

/* ---------- Photos ---------- */

.upload-card summary { margin-bottom: 0; }
.upload-form { margin-top: 1rem; }
.dropzone { position: relative; display: block; border: 3px dashed #f5c4b8; border-radius: 18px; padding: 1.6rem 1rem; text-align: center; cursor: pointer; background: #fffaf7; transition: background .15s, border-color .15s; }
.dropzone:hover, .dropzone.is-over { background: var(--salmon-soft); border-color: var(--salmon); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone-text { font-weight: 700; }
.dropzone-text small { font-weight: 400; color: var(--ink-soft); }
.upload-progress { display: flex; flex-direction: column; gap: .4rem; font-weight: 700; }
.upload-progress[hidden] { display: none; }
.upload-progress .progress { margin: 0; }
.upload-progress .progress > span { transition: width .2s; }

.photo-grid { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (max-width: 520px) { .photo-grid { grid-template-columns: repeat(3, 1fr); gap: .3rem; } }
.photo-tile { padding: 0; border: 0; background: var(--salmon-soft); border-radius: 12px; overflow: hidden; cursor: zoom-in; aspect-ratio: 1; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.photo-tile:hover img { transform: scale(1.06); }
.pager { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 1.4rem; }
.album-settings { margin-top: 2rem; }
.album-settings form { margin-top: .8rem; }

.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(20, 10, 10, .94); color: #fff; }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox::backdrop { background: rgba(20, 10, 10, .9); }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; padding-top: max(.7rem, env(safe-area-inset-top)); }
.lb-meta { font-size: .85rem; opacity: .85; }
.lb-actions { display: flex; gap: .2rem; }
.lb-actions form { margin: 0; }
.lightbox .icon-btn { color: #fff; }
.lightbox .icon-btn:hover { background: rgba(255, 255, 255, .15); }
.lb-img { grid-row: 2; justify-self: center; align-self: center; max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; user-select: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; z-index: 2; }
.lb-nav:hover { background: rgba(255, 255, 255, .3); }
.lb-prev { left: .6rem; }
.lb-next { right: .6rem; }
.lb-caption { display: flex; gap: .5rem; padding: .7rem 1rem; padding-bottom: max(.7rem, env(safe-area-inset-bottom)); max-width: 700px; width: 100%; justify-self: center; }
.lb-caption input { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; font-family: var(--hand); font-size: 1.3rem; }
.lb-caption input::placeholder { color: rgba(255, 255, 255, .5); }

/* ---------- Projets ---------- */

.kanban { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); align-items: start; margin-top: 1.2rem; }
.kanban-col { background: rgba(255, 255, 255, .55); border: 2px dashed var(--line); border-radius: var(--radius); padding: 1rem; }
.kanban-col h2 small { color: var(--ink-soft); font-weight: 600; }
.project-card { display: flex; gap: .7rem; padding: .9rem; margin-top: .6rem; background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); color: var(--ink); }
.project-emoji { font-size: 1.8rem; line-height: 1; }
.project-body { display: flex; flex-direction: column; gap: .25rem; flex: 1; min-width: 0; }
.grid-title { display: grid; grid-template-columns: 80px 1fr; gap: .8rem; }
.field-emoji input { text-align: center; font-size: 1.4rem; padding: .4rem; }
.prose { white-space: normal; }

.checklist { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .3rem; }
.checklist li { display: flex; align-items: center; gap: .6rem; padding: .3rem .2rem; border-radius: 10px; }
.checklist li:hover { background: #fffaf7; }
.checklist form { margin: 0; }
.check-label { flex: 1; }
.is-done .check-label, .idea.is-done strong { text-decoration: line-through; color: var(--ink-soft); }
.check { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 8px; border: 2px solid #f0b8aa; background: #fff; color: #fff; font-weight: 800; cursor: pointer; padding: 0; font-size: .9rem; }
.check:hover { border-color: var(--salmon); }
.is-done .check { background: var(--mint); border-color: var(--mint); }

/* ---------- Idées ---------- */

.ideas-top { text-align: center; margin-bottom: 1.2rem; }
.picked { text-align: center; border: 2px solid var(--salmon); animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); }
.picked-label { margin: 0; color: var(--ink-soft); font-weight: 700; }
.picked-title { font-family: var(--hand); font-size: 2.4rem; color: var(--salmon-dark); line-height: 1.1; margin: .2rem 0 .4rem; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.idea-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
@media (max-width: 520px) { .idea-list { grid-template-columns: 1fr; } }
.idea { display: flex; align-items: flex-start; gap: .7rem; background: var(--paper); border-radius: 14px; padding: .8rem; box-shadow: var(--shadow); }
.idea form { margin: 0; }
.idea-body { flex: 1; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.idea-actions { display: flex; align-items: center; }
.idea.is-done { opacity: .75; }

/* ---------- Calendrier ---------- */

.cal-layout { display: grid; gap: 1.2rem; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
@media (max-width: 960px) { .cal-layout { grid-template-columns: 1fr; } }
.cal-layout .card { margin: 0; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.cal-head h2 { margin: 0; font-size: 1.4rem; }
.cal-head .icon-btn { font-size: 1.6rem; background: var(--salmon-soft); }
.cal-today-link { text-align: center; margin: 0 0 .5rem; font-size: .88rem; font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: .75rem; font-weight: 800; text-transform: uppercase; color: var(--ink-soft); padding: .3rem 0; }
.cal-day { min-height: 92px; background: #fffaf7; border-radius: 10px; padding: .25rem; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-day.is-out { opacity: .45; }
.cal-day.is-today { background: var(--salmon-soft); box-shadow: inset 0 0 0 2px var(--salmon); }
.cal-num { align-self: flex-start; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; font-weight: 800; font-size: .85rem; text-decoration: none; color: var(--ink); }
.cal-num:hover { background: var(--salmon); color: #fff; }
.is-today .cal-num { background: var(--salmon); color: #fff; }
.cal-ev { display: flex; gap: 2px; align-items: center; font-size: .72rem; line-height: 1.25; padding: 2px 4px; border-radius: 6px; background: #fff; border-left: 3px solid var(--salmon); text-decoration: none; color: var(--ink); white-space: nowrap; overflow: hidden; }
.cal-ev:hover { background: var(--salmon); color: #fff; }
.cal-ev-title { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
    .cal-grid { gap: 2px; }
    .cal-day { min-height: 54px; padding: 2px; align-items: center; }
    .cal-num { align-self: center; width: 1.5rem; height: 1.5rem; font-size: .8rem; }
    .cal-ev { padding: 0; border: 0; background: none; font-size: .8rem; }
    .cal-ev-title { display: none; }
    .cal-day.has-events { background: #fff; }
}

.emoji-picker { display: flex; flex-wrap: wrap; gap: .35rem; }
.emoji-picker label { cursor: pointer; }
.emoji-picker input { position: absolute; opacity: 0; pointer-events: none; }
.emoji-picker span { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; font-size: 1.4rem; border-radius: 12px; border: 2px solid var(--line); background: #fff; transition: transform .1s; }
.emoji-picker span:hover { transform: scale(1.08); }
.emoji-picker input:checked + span { border-color: var(--salmon); background: var(--salmon-soft); }
.emoji-picker input:focus-visible + span { box-shadow: 0 0 0 4px var(--salmon-soft); }
.event-form { max-width: 720px; }

/* ---------- Compte ---------- */

.copy-row { display: flex; gap: .5rem; margin-bottom: .6rem; }
.copy-row input { font-size: .8rem; font-family: ui-monospace, monospace; }
