/* ============================================================
   Nido Classe — Design System
   Charte graphique identique à Nido (palette ocre/crème)
   Light default · Dark via prefers-color-scheme + data-theme
   ============================================================ */

/* ── Tokens light (défaut) ── */
:root {
  --ocre:  #EF9F27;  --sable: #FAC775;
  --creme: #FAEEDA;  --terre: #412402;  --bois:  #633806;

  --bg-base:     #FBF7F1;
  --bg-surface:  #FFFFFF;
  --bg-raised:   #F5EDE0;
  --bg-overlay:  #EDE0CC;

  --text-primary:   #1A1008;
  --text-secondary: #633806;
  --text-muted:     #9A7040;
  --text-disabled:  #C8A878;

  --border-subtle:  rgba(65,36,2,.07);
  --border-default: rgba(65,36,2,.13);
  --border-strong:  rgba(65,36,2,.28);

  --success: #4CAF78;
  --danger:  #E05050;
  --info:    #5B9BD5;

  --shadow-sm: 0 2px 8px rgba(65,36,2,.08);
  --shadow-md: 0 4px 20px rgba(65,36,2,.12);
  --shadow-lg: 0 8px 40px rgba(65,36,2,.16);

  --radius-xs:   6px;  --radius-sm:   10px; --radius-md:   14px;
  --radius-lg:   20px; --radius-xl:   28px; --radius-full: 9999px;

  --tr-fast:   120ms ease;
  --tr-normal: 220ms ease;
  --tr-slow:   380ms ease;
}

/* ── Tokens dark (media query) ── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-base:     #0E0C0A; --bg-surface:  #181410;
    --bg-raised:   #221C14; --bg-overlay:  #2E2418;
    --text-primary:   #F0E8D8; --text-secondary: #C8A878;
    --text-muted:     #8A7060; --text-disabled:  #4A3828;
    --border-subtle:  rgba(239,159,39,.10);
    --border-default: rgba(239,159,39,.18);
    --border-strong:  rgba(239,159,39,.35);
    --shadow-sm: 0 2px 8px rgba(0,0,0,.40);
    --shadow-md: 0 4px 20px rgba(0,0,0,.50);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.60);
  }
}

/* ── Tokens light (forçage manuel) ── */
html[data-theme="light"] {
  --bg-base:     #FBF7F1; --bg-surface:  #FFFFFF;
  --bg-raised:   #F5EDE0; --bg-overlay:  #EDE0CC;
  --text-primary:   #1A1008; --text-secondary: #633806;
  --text-muted:     #9A7040; --text-disabled:  #C8A878;
  --border-subtle:  rgba(65,36,2,.07);
  --border-default: rgba(65,36,2,.13);
  --border-strong:  rgba(65,36,2,.28);
  --shadow-sm: 0 2px 8px rgba(65,36,2,.08);
  --shadow-md: 0 4px 20px rgba(65,36,2,.12);
  --shadow-lg: 0 8px 40px rgba(65,36,2,.16);
}

/* ── Tokens dark (forçage manuel) ── */
html[data-theme="dark"] {
  --bg-base:    #0E0C0A;  --bg-surface:  #181410;
  --bg-raised:  #221C14;  --bg-overlay:  #2E2418;
  --text-primary:   #F0E8D8; --text-secondary: #C8A878;
  --text-muted:     #8A7060; --text-disabled:  #4A3828;
  --border-subtle:  rgba(239,159,39,.10);
  --border-default: rgba(239,159,39,.18);
  --border-strong:  rgba(239,159,39,.35);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.40);
  --shadow-md: 0 4px 20px rgba(0,0,0,.50);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.60);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img  { max-width: 100%; display: block; }
a    { color: var(--ocre); text-decoration: none; }
a:hover { color: var(--sable); }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
textarea { resize: vertical; }

/* ── Layout ── */
#app { min-height: 100vh; display: flex; flex-direction: column; }

/* ── Header ── */
.app-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 16px; height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  box-shadow: var(--shadow-sm);
  gap: 8px;
}
.header-left {
  display: flex; align-items: center; gap: 8px;
  min-width: 0; flex: 1;
}
.header-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.app-title {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-primary); text-decoration: none;
  flex-shrink: 0;
}
.app-title:hover { opacity: .85; }
.header-logo { height: 42px; width: auto; display: block; max-width: 200px; }
.header-title-sep { width: 1px; height: 18px; background: var(--border-default); flex-shrink: 0; }
.header-page-title {
  font-size: .85rem; font-weight: 600; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header-back-btn { margin-right: 2px; }
.badge-superadmin {
  font-size: .7rem; font-weight: 700; color: var(--ocre);
  padding: 2px 8px; border: 1.5px solid var(--ocre);
  border-radius: var(--radius-full); white-space: nowrap;
}

.btn-icon {
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: background var(--tr-fast), color var(--tr-fast);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.btn-icon:hover { background: var(--bg-raised); color: var(--text-primary); }
.btn-icon svg { pointer-events: none; }
.btn-logout:hover { background: rgba(224,80,80,.10); color: var(--danger); }

@media (max-width: 600px) {
  .app-header { padding: 0 10px; height: 52px; }
  .header-logo { height: 36px; max-width: 140px; }
  .header-page-title { display: none; }
  .header-title-sep  { display: none; }
}

.header-sep { width: 1px; height: 18px; background: var(--border-default); margin: 0 2px; flex-shrink: 0; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-raised); border: 1px solid var(--border-strong);
  color: var(--text-primary); padding: 10px 20px;
  border-radius: var(--radius-full); font-size: .88rem;
  box-shadow: var(--shadow-md); z-index: 500;
  opacity: 0; transition: transform .25s ease, opacity .25s ease;
  pointer-events: none; white-space: nowrap; max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast-success { background: rgba(76,175,120,.12); border-color: rgba(76,175,120,.35); color: var(--success); }
.toast-error   { background: rgba(224,80,80,.10);  border-color: rgba(224,80,80,.35);  color: var(--danger);  }
.toast-info    { background: var(--bg-raised); border-color: var(--border-strong); color: var(--text-primary); }

/* ── Auth pages ── */
.auth-page  { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; background: var(--bg-base); }
.auth-card  {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  padding: 36px 28px; width: 100%; max-width: 420px;
}
.auth-logo  { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 16px; }
.auth-logo img { height: clamp(80px, 25vw, 160px); width: auto; max-width: 85%; }
.auth-logo .logo-emoji { font-size: 3rem; line-height: 1; }
.auth-logo h1  { font-size: 1.8rem; font-weight: 500; letter-spacing: .5px; color: var(--text-primary); }
.auth-title { font-size: 1.2rem; font-weight: 600; text-align: center; margin-bottom: 4px; color: var(--text-primary); }
.auth-subtitle { text-align: center; color: var(--text-muted); font-size: .9rem; margin-bottom: 20px; }
.auth-links { text-align: right; margin-top: 8px; font-size: .82rem; }
.auth-sep { border: none; border-top: 1px solid var(--border-default); margin: 20px 0; }
.auth-alt { text-align: center; font-size: .88rem; margin-top: 10px; color: var(--text-muted); }
.center-link { text-align: center; margin-top: 18px; font-size: .88rem; color: var(--text-muted); }

/* ── Formulaires ── */
label { display: block; font-size: .82rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 4px; margin-top: 14px; }
input[type=text], input[type=email], input[type=password], input[type=url], textarea, select {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: .95rem; font-family: inherit;
  background: var(--bg-overlay); color: var(--text-primary);
  transition: border-color var(--tr-fast); outline: none;
}
input::placeholder, textarea::placeholder { color: var(--text-disabled); }
input:focus, textarea:focus { border-color: var(--ocre); box-shadow: 0 0 0 3px rgba(239,159,39,.12); }
.req, .required { color: var(--danger); }
.small { font-size: .8rem; color: var(--text-muted); }

/* Messages */
.error-msg   { color: var(--danger); font-size: .88rem; margin-top: 8px; }
.success-msg { color: var(--success); font-size: .9rem; background: rgba(76,175,120,.1); border: 1px solid rgba(76,175,120,.25); padding: 12px; border-radius: var(--radius-sm); margin-top: 12px; }
.code-ok  { color: var(--success); font-size: .82rem; padding: 4px 8px; background: rgba(76,175,120,.1); border-radius: var(--radius-xs); margin-top: 4px; }
.code-err { color: var(--danger);  font-size: .82rem; padding: 4px 8px; background: rgba(224,80,80,.07); border-radius: var(--radius-xs); margin-top: 4px; }

/* ── Boutons ── */
.btn-primary {
  display: block; width: 100%; margin-top: 18px;
  padding: 13px; border: none; border-radius: var(--radius-full);
  background: var(--ocre); color: var(--terre);
  font-size: .95rem; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background var(--tr-fast), transform var(--tr-fast);
}
.btn-primary:hover:not(:disabled) { background: var(--sable); }
.btn-primary:active:not(:disabled) { transform: scale(.98); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary.small { display: inline-block; width: auto; padding: 8px 18px; font-size: .85rem; margin-top: 0; }

.btn-secondary {
  display: block; width: 100%; margin-top: 10px;
  padding: 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-full); background: transparent;
  color: var(--text-secondary); font-size: .95rem; cursor: pointer; font-family: inherit;
  transition: background var(--tr-fast);
}
.btn-secondary:hover { background: var(--bg-raised); }

.btn-sm {
  padding: 6px 14px; border: 1px solid var(--border-default);
  border-radius: var(--radius-full); background: var(--bg-raised);
  color: var(--text-secondary); cursor: pointer; font-size: .82rem; font-family: inherit;
  transition: background var(--tr-fast);
}
.btn-sm:hover { background: var(--bg-overlay); color: var(--text-primary); }

.btn-sm-danger {
  padding: 6px 14px; border: 1px solid rgba(224,80,80,.3);
  border-radius: var(--radius-full); background: rgba(224,80,80,.08);
  color: var(--danger); cursor: pointer; font-size: .82rem; font-family: inherit;
  transition: background var(--tr-fast);
}
.btn-sm-danger:hover { background: rgba(224,80,80,.16); }

.btn-back { background: none; border: none; cursor: pointer; color: var(--ocre); font-size: .9rem; padding: 0 0 10px; display: inline-flex; align-items: center; gap: 4px; font-family: inherit; }

.btn-success { padding: 6px 12px; border: none; border-radius: var(--radius-full); background: rgba(76,175,120,.15); color: var(--success); cursor: pointer; font-size: .82rem; font-weight: 600; transition: background var(--tr-fast); font-family: inherit; }
.btn-success:hover { background: rgba(76,175,120,.25); }

.btn-danger { padding: 6px 12px; border: none; border-radius: var(--radius-full); background: rgba(224,80,80,.12); color: var(--danger); cursor: pointer; font-size: .82rem; font-weight: 600; transition: background var(--tr-fast); font-family: inherit; }
.btn-danger:hover { background: rgba(224,80,80,.22); }

.btn-approve { padding: 6px 12px; border: none; border-radius: var(--radius-full); background: rgba(76,175,120,.15); color: var(--success); cursor: pointer; font-size: .82rem; font-weight: 600; transition: background var(--tr-fast); font-family: inherit; }
.btn-approve:hover { background: rgba(76,175,120,.25); }
.btn-reject  { padding: 6px 12px; border: none; border-radius: var(--radius-full); background: rgba(224,80,80,.12); color: var(--danger); cursor: pointer; font-size: .82rem; font-weight: 600; transition: background var(--tr-fast); font-family: inherit; }
.btn-reject:hover  { background: rgba(224,80,80,.22); }

.btn-delete     { background: none; border: none; cursor: pointer; opacity: .35; color: var(--danger); transition: opacity var(--tr-fast); padding: 4px; }
.btn-delete:hover { opacity: 1; }
.btn-icon-sm { background: none; border: none; padding: 3px 6px; border-radius: var(--radius-xs); font-size: .85rem; color: var(--text-muted); transition: background var(--tr-fast); }
.btn-icon-sm:hover { background: var(--bg-raised); color: var(--text-primary); }
.btn-icon-sm.danger:hover { background: rgba(224,80,80,.1); color: var(--danger); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ── Dashboard ── */
.dashboard-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.dashboard-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--bg-surface); border-bottom: 1px solid var(--border-subtle); }
.columns-container {
  display: flex; gap: 16px; padding: 16px; overflow-x: auto; flex: 1; align-items: flex-start;
}
.columns-container::-webkit-scrollbar { height: 6px; }
.columns-container::-webkit-scrollbar-track { background: transparent; }
.columns-container::-webkit-scrollbar-thumb { background: var(--bg-overlay); border-radius: 3px; }
.col-add-wrap { display: flex; align-items: flex-start; padding-top: 0; }

.dashboard-col {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); width: 300px; min-width: 280px; flex-shrink: 0;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.col-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border-subtle);
}
.col-name { font-weight: 700; font-size: .92rem; color: var(--text-primary); }
.col-actions { display: flex; gap: 2px; }
.col-posts { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px; flex: 1; min-height: 60px; }

/* Boutons colonnes */
.btn-add-col {
  background: var(--bg-surface); border: 2px dashed var(--border-default);
  color: var(--text-muted); border-radius: var(--radius-md);
  padding: 12px 20px; font-size: .88rem; font-weight: 600;
  width: 220px; transition: all var(--tr-fast);
}
.btn-add-col:hover { background: var(--bg-raised); border-color: var(--ocre); color: var(--ocre); }
.btn-add-post {
  background: none; border: 1px dashed var(--border-default);
  color: var(--text-muted); border-radius: var(--radius-sm);
  padding: 8px; width: 100%; font-size: .82rem;
  transition: all var(--tr-fast); margin-top: 4px;
}
.btn-add-post:hover { background: var(--bg-raised); border-color: var(--ocre); color: var(--ocre); }

/* ── Posts ── */
.post-card {
  background: var(--bg-raised); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: 12px 14px;
  transition: box-shadow var(--tr-fast), border-color var(--tr-fast);
}
.post-card:hover { box-shadow: var(--shadow-sm); border-color: var(--border-default); }
.post-title { font-weight: 700; font-size: .9rem; margin-bottom: 6px; color: var(--text-primary); }
.post-content { font-size: .85rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 8px; white-space: pre-wrap; }
.post-photo { border-radius: var(--radius-xs); margin: 8px 0; max-height: 200px; width: 100%; object-fit: cover; }
.post-photo-preview { border-radius: var(--radius-xs); margin: 8px 0; max-height: 150px; object-fit: cover; }
.post-links { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.post-link {
  font-size: .82rem; color: var(--ocre);
  display: inline-flex; align-items: center; gap: 4px;
}
.post-link:hover { color: var(--sable); text-decoration: underline; }
.post-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--border-subtle);
}
.post-date { font-size: .72rem; color: var(--text-disabled); }
.post-actions { display: flex; gap: 2px; }
.post-event-date {
  display: inline-block; font-size: .78rem; font-weight: 600;
  color: var(--ocre); margin-bottom: 6px;
}
.drag-handle {
  float: right; margin-left: 8px; color: var(--text-disabled);
  cursor: grab; font-size: 1.1rem; line-height: 1; user-select: none;
}
.drag-handle:active { cursor: grabbing; }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 16px; }
.modal-box {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-xl); padding: 28px 24px;
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; color: var(--text-primary); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* Sélecteur de couleur */
.color-picker { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.color-swatch { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; transition: transform var(--tr-fast); cursor: pointer; }
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.selected { border-color: var(--bg-surface); box-shadow: 0 0 0 3px var(--ocre); }

/* Liens dans les posts */
.link-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.link-label { flex: 1; }
.link-url { flex: 2; }

/* ── Admin panel ── */
.admin-wrap { max-width: 760px; margin: 0 auto; padding: 28px 24px; }
.admin-section {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 24px 28px; margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.admin-section h2 {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 18px;
  color: var(--text-primary); display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}
.admin-section h2 .section-action { font-size: .82rem; font-weight: 500; }

.join-code-display {
  display: flex; align-items: center; gap: 12px;
  background: rgba(239,159,39,.08); border: 1px solid rgba(239,159,39,.2);
  border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 16px;
}
.join-code-label { font-size: .82rem; color: var(--text-muted); }
.join-code {
  font-size: 28px; font-weight: 800; letter-spacing: 6px;
  color: var(--ocre); font-family: monospace;
}

/* Partage */
.share-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.btn-share {
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: var(--radius-sm); padding: 9px 16px;
  font-weight: 600; font-size: .88rem; cursor: pointer;
  border: none; text-decoration: none;
  transition: opacity var(--tr-fast), transform var(--tr-fast);
}
.btn-share:active { transform: scale(.96); }
.btn-share-wa, .btn-share-mail, .btn-share-copy {
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: var(--radius-sm); padding: 9px 16px;
  font-weight: 600; font-size: .88rem; cursor: pointer;
  border: none; text-decoration: none; font-family: inherit;
  transition: opacity var(--tr-fast), transform var(--tr-fast);
}
.btn-share-wa:active, .btn-share-mail:active, .btn-share-copy:active { transform: scale(.96); }
.btn-share-wa   { background: #25D366; color: #fff; }
.btn-share-wa:hover { opacity: .9; color: #fff; }
.btn-share-mail { background: var(--bg-raised); color: var(--text-primary); border: 1px solid var(--border-default); }
.btn-share-mail:hover { background: var(--bg-overlay); color: var(--text-primary); }
.btn-share-copy { background: var(--bg-raised); color: var(--text-primary); border: 1px solid var(--border-default); }
.btn-share-copy:hover { background: var(--bg-overlay); }

.invite-msg-details { margin-top: 10px; }
.invite-msg-details summary { cursor: pointer; font-size: .82rem; color: var(--ocre); }
.invite-msg-details textarea { margin-top: 8px; }

/* Parents */
.parent-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border-subtle);
  gap: 10px; flex-wrap: wrap;
}
.parent-row:last-child { border-bottom: none; }
.parent-info { display: flex; flex-direction: column; gap: 2px; }
.parent-name { font-weight: 600; font-size: .9rem; color: var(--text-primary); }
.parent-email { font-size: .78rem; color: var(--text-muted); }
.parent-actions { display: flex; gap: 6px; }
.empty-msg { color: var(--text-muted); font-size: .88rem; text-align: center; padding: 16px 0; }

/* ── Nido Photos banner ── */
.nido-photos-banner {
  display: flex; align-items: stretch;
  background: linear-gradient(90deg, rgba(239,159,39,.12) 0%, rgba(250,199,117,.06) 100%);
  border-bottom: 1px solid rgba(239,159,39,.25);
}

/* Input hint */
.input-hint { font-size: .75rem; color: var(--text-muted); margin-top: 4px; margin-bottom: 0; line-height: 1.4; }

/* ── No class / pending ── */
.no-class-page { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.no-class-card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-xl); padding: 40px 32px;
  text-align: center; max-width: 400px; box-shadow: var(--shadow-md);
}
.no-class-icon { font-size: 48px; margin-bottom: 16px; }
.no-class-card h2 { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.no-class-card p { color: var(--text-muted); margin-bottom: 20px; font-size: .9rem; }
.pending-page { flex: 1; display: flex; flex-direction: column; }
.pending-msg { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 40px; text-align: center; }
.pending-icon { font-size: 48px; }

/* ── Tabs (mobile) ── */
.col-tabs {
  display: flex; overflow-x: auto; gap: 4px;
  padding: 10px 16px 0; background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}
.col-tabs::-webkit-scrollbar { display: none; }
.col-tab {
  padding: 8px 14px; font-size: .82rem; font-weight: 600;
  color: var(--text-muted); background: none; border: none;
  border-bottom: 3px solid transparent; white-space: nowrap;
  cursor: pointer; transition: color var(--tr-fast), border-color var(--tr-fast);
  font-family: inherit;
}
.col-tab.active { color: var(--ocre); border-bottom-color: var(--ocre); }
.col-tab-add {
  margin-left: auto; flex-shrink: 0;
  font-size: 1.1rem; font-weight: 400; color: var(--ocre);
  padding: 8px 16px; border-left: 1px solid var(--border-subtle);
}
.col-tab-add:hover { background: rgba(239,159,39,.08); }

/* ── Pull-to-refresh ── */
.ptr-indicator {
  height: 0; overflow: hidden; opacity: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-surface); border-bottom: 1px solid var(--border-subtle);
  transition: height .2s ease, opacity .2s ease;
}
.ptr-ready .ptr-spinner { border-top-color: var(--ocre); }
.ptr-loading .ptr-spinner {
  border-top-color: var(--ocre);
  animation: spin .7s linear infinite;
}
.ptr-spinner {
  width: 26px; height: 26px;
  border: 3px solid var(--border-default);
  border-top-color: var(--text-muted);
  border-radius: 50%;
}

/* ── Loading ── */
.loading-page { flex: 1; display: flex; align-items: center; justify-content: center; }
.loading { text-align: center; padding: 40px; color: var(--text-muted); }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border-default);
  border-top-color: var(--ocre);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Photo upload ── */
.post-photo-wrap { position: relative; display: inline-block; }
.btn-remove-photo {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,.55); color: #fff; border: none;
  border-radius: 50%; width: 22px; height: 22px; cursor: pointer;
  font-size: .75rem; display: flex; align-items: center; justify-content: center;
}

/* ── Responsive ── */
@media (max-width: 767px) {
  .columns-container { padding: 12px; gap: 0; overflow: visible; }
  .dashboard-col { width: 100%; min-width: unset; }
  .col-add-wrap { display: none; }
  .admin-wrap { padding: 14px 12px; }
  .admin-section { padding: 18px 16px; }
  .modal-box { padding: 20px 16px; }
  .auth-card { padding: 28px 20px; }
  .share-buttons { flex-direction: column; }
  .join-code { font-size: 22px; letter-spacing: 4px; }
}
@media (min-width: 768px) {
  .col-tabs { display: none; }
}

/* ── Toggle switch (iOS style) ── */
.switch {
  position: relative; display: inline-block;
  width: 44px; height: 24px; flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  transition: background var(--tr-normal);
}
.switch-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px;
  left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%;
  transition: transform var(--tr-normal);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .switch-slider { background: var(--ocre); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

.toggle-row {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--border-subtle);
}
.toggle-row label:first-child { margin: 0; flex: 1; }

/* ── Photo upload zone ── */
.photo-upload-zone {
  position: relative; cursor: pointer;
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-md); min-height: 110px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 6px; overflow: hidden;
  transition: border-color var(--tr-fast), background var(--tr-fast);
}
.photo-upload-zone:hover {
  border-color: var(--ocre);
  background: rgba(239,159,39,.04);
}
.photo-zone-placeholder {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; color: var(--text-muted); font-size: .82rem;
  text-align: center; padding: 20px; pointer-events: none;
}
.photo-zone-placeholder svg { opacity: .4; }
.photo-zone-preview {
  width: 100%; max-height: 200px;
  object-fit: cover; display: block;
}
.btn-remove-photo-zone {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,.6); color: #fff;
  border: none; border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .8rem; z-index: 1;
}
.btn-remove-photo-zone:hover { background: var(--danger); }

/* ── Colonne date : badge + archive ── */
.col-date-badge { font-size: .85rem; opacity: .7; margin-left: 4px; }
.empty-col-msg {
  color: var(--text-disabled); font-size: .82rem;
  text-align: center; padding: 20px 8px; font-style: italic;
}
.archive-section {
  border-top: 1px dashed var(--border-default);
  margin-top: 8px; padding-top: 4px;
}
.archive-summary {
  cursor: pointer; font-size: .78rem; font-weight: 600;
  color: var(--text-muted); padding: 6px 4px;
  user-select: none; list-style: none; display: flex; align-items: center; gap: 6px;
}
.archive-summary::-webkit-details-marker { display: none; }
.archive-section[open] .archive-summary { color: var(--text-secondary); }
.archive-posts { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.archive-post {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs); overflow: hidden;
  background: var(--bg-overlay);
}
.archive-post-summary {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; cursor: pointer; list-style: none; user-select: none;
}
.archive-post-summary::-webkit-details-marker { display: none; }
.archive-post-date {
  font-size: .73rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0;
}
.archive-post-title {
  font-size: .82rem; font-weight: 600; color: var(--text-secondary);
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.archive-actions { display: flex; gap: 2px; flex-shrink: 0; }
.archive-post-body {
  padding: 8px 12px 10px;
  border-top: 1px solid var(--border-subtle);
}

/* ── PWA install banner ── */
.pwa-install-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(90deg, rgba(91,127,191,.1) 0%, rgba(91,127,191,.05) 100%);
  border-bottom: 1px solid rgba(91,127,191,.2);
}
.pwa-banner-icon { font-size: 1.2rem; flex-shrink: 0; }
.pwa-banner-text { font-size: .85rem; color: var(--text-primary); flex: 1; }
.btn-pwa-install {
  padding: 6px 14px; background: var(--ocre); color: var(--terre);
  border: none; border-radius: var(--radius-full); font-size: .82rem;
  font-weight: 600; cursor: pointer; white-space: nowrap; font-family: inherit;
}
.btn-pwa-install:hover { background: var(--sable); }
.pwa-banner-close { color: var(--text-muted); flex-shrink: 0; }

/* ── Mode lecture (vue parent) ── */
.btn-mode-toggle { color: var(--text-muted); }
.btn-mode-toggle.mode-view-active { color: var(--ocre); background: rgba(239,159,39,.1); }
.mode-view-banner {
  text-align: center; padding: 8px 16px; font-size: .8rem; font-weight: 600;
  color: var(--ocre); background: rgba(239,159,39,.08);
  border-bottom: 1px solid rgba(239,159,39,.2);
}

/* ── Drag amélioré ── */
.draggable-post { cursor: default; transition: box-shadow var(--tr-fast), transform var(--tr-fast); }
.draggable-post.dragging { opacity: .4; transform: scale(.97); box-shadow: var(--shadow-md); }
.draggable-post.drag-over { outline: 2px solid var(--ocre); outline-offset: 3px; background: rgba(239,159,39,.05); }

/* ── Mode colonne — radio ── */
.col-mode-options {
  display: flex; flex-direction: column; gap: 8px;
}
.col-mode-option {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-default);
  cursor: pointer; transition: border-color var(--tr-fast), background var(--tr-fast);
}
.col-mode-option:hover { border-color: var(--ocre); background: rgba(239,159,39,.05); }
.col-mode-option input[type=radio] { margin-top: 3px; accent-color: var(--ocre); flex-shrink: 0; }
.col-mode-option input[type=radio]:checked ~ .col-mode-option-body { color: var(--text-primary); }
.col-mode-option:has(input:checked) { border-color: var(--ocre); background: rgba(239,159,39,.07); }
.col-mode-option-body { display: flex; flex-direction: column; gap: 2px; }
.col-mode-option-icon { font-size: 1rem; }
.col-mode-option-label { font-weight: 600; font-size: .9rem; }
.col-mode-option-desc { font-size: .78rem; color: var(--text-muted); font-weight: 400; }

/* ── Todo list ── */
.todo-list { gap: 6px !important; }
.todo-item {
  background: var(--bg-surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  padding: 10px 12px; transition: opacity var(--tr-fast), background var(--tr-fast);
}
.todo-item.todo-done {
  opacity: .6; background: var(--bg-raised);
}
.todo-label {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer; width: 100%;
}
.todo-checkbox {
  margin-top: 3px; width: 18px; height: 18px;
  accent-color: var(--ocre); cursor: pointer; flex-shrink: 0;
}
.todo-text {
  font-size: .9rem; font-weight: 500; line-height: 1.4;
  transition: text-decoration var(--tr-fast);
}
.todo-done .todo-text { text-decoration: line-through; color: var(--text-muted); }
.todo-detail {
  margin-top: 6px; margin-left: 28px;
  font-size: .82rem; color: var(--text-muted); line-height: 1.5;
}
.todo-links { margin-left: 28px; margin-top: 6px; }

.nido-photos-banner-link {
  display: flex; align-items: center; gap: 12px; flex: 1;
  padding: 12px 16px; text-decoration: none; color: var(--text-primary);
  transition: background var(--tr-fast);
}
.nido-photos-banner-link:hover { background: rgba(239,159,39,.08); }
.nido-photos-banner-icon { font-size: 1.4rem; flex-shrink: 0; }
.nido-photos-banner strong { display: block; font-size: .9rem; font-weight: 700; color: var(--ocre); }
.nido-photos-banner small { display: block; font-size: .75rem; color: var(--text-muted); }
.nido-photos-banner-arrow { margin-left: auto; font-size: 1.1rem; color: var(--ocre); flex-shrink: 0; }
.nido-banner-close {
  flex-shrink: 0; padding: 0 14px;
  color: var(--text-muted); border-radius: 0;
  border-left: 1px solid rgba(239,159,39,.2);
}
.nido-banner-close:hover { background: rgba(239,159,39,.08); color: var(--text-primary); }

/* ── Profil parent ── */
.profile-class-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border-subtle);
}
.profile-class-row:last-child { border-bottom: none; }
.profile-class-row.profile-class-active { background: rgba(239,159,39,.04); margin: 0 -16px; padding: 12px 16px; border-radius: var(--radius-sm); }
.profile-class-info { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.profile-class-name { font-weight: 600; font-size: .95rem; }
.profile-class-current { font-size: .8rem; color: var(--ocre); font-weight: 600; }
.profile-album-link { font-size: .82rem; color: var(--info); text-decoration: none; }
.profile-album-link:hover { text-decoration: underline; }
.badge-approved { font-size: .75rem; color: var(--success); font-weight: 600; }
.badge-pending  { font-size: .75rem; color: var(--text-muted); font-weight: 600; }
