:root {
  --bg:        #F7F4EF;
  --surface:   #FFFFFF;
  --surface-2: #FCFAF6;
  --ink:       #3A3733;
  --muted:     #8A847B;
  --line:      #E7E0D6;
  --accent:    #A9907E;
  --shadow:    0 6px 24px rgba(58, 55, 51, 0.06);
  --shadow-sm: 0 2px 10px rgba(58, 55, 51, 0.05);
  --radius:    18px;
  --radius-sm: 12px;
  --focus-ring: 0 0 0 3px rgba(169, 144, 126, 0.22);
  --fav:       #C99A3D;   /* étoile favori : ambre doux Japandi */
  --fav-soft:  #F7EFDD;   /* fond de l'état actif */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 244, 239, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  font-size: 26px;
  color: var(--accent);
  line-height: 1;
}
.brand-text { display: flex; flex-direction: column; }
.brand-title { font-family: "Fraunces", serif; font-size: 18px; }
.brand-sub { font-size: 12px; color: var(--muted); }
.nav { display: flex; gap: 8px; }
.nav-link {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.18s ease;
}
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-link.active { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 28px; text-align: center; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.1; }
.hero p { color: var(--muted); max-width: 560px; margin: 14px auto 0; font-size: 17px; }

/* ---------- Catégories en grille (3 par ligne) ---------- */
.cat-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-bottom: 64px;
  align-items: start;
}
@media (max-width: 900px) { .cat-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cat-list { grid-template-columns: 1fr; } }
.cat-panel-row { grid-column: 1 / -1; }

.cat-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.cat-block:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-block.open { box-shadow: var(--shadow); border-color: var(--cat-color, var(--accent)); }
.cat-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 16px 18px 16px 22px;
}
.cat-head::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: var(--cat-color, var(--accent));
}
.cat-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--cat-color, var(--surface-2));
  font-size: 24px;
  flex-shrink: 0;
}
.cat-info { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cat-name { font-family: "Fraunces", serif; font-size: 18px; color: var(--ink); line-height: 1.2; }
.cat-desc {
  font-size: 12.5px; color: var(--muted); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cat-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cat-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent);
  font-weight: 700; font-size: 12.5px;
}
.chevron { font-size: 22px; color: var(--muted); line-height: 1; transition: transform 0.22s ease; }
.cat-block.open .chevron { transform: rotate(90deg); }
.cat-panel {
  border: 1px solid var(--cat-color, var(--line));
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 22px;
}
.empty-note { color: var(--muted); font-size: 14px; padding: 8px 2px; }

/* ---------- Catégories en onglets (catégorie ouverte) ----------
 * Les catégories passent sur une seule ligne, collée sous le header, pour
 * rester en vue pendant qu'on parcourt les activités. */
.cat-tabs {
  position: sticky;
  top: var(--header-h, 64px);
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0;
  margin: 0 0 20px;
  background: rgba(247, 244, 239, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.cat-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.cat-tab:hover { color: var(--ink); border-color: var(--cat-color, var(--accent)); }
.cat-tab-emoji { font-size: 16px; line-height: 1; }
.cat-tab-count {
  background: var(--surface-2);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
}
.cat-tab.active {
  color: var(--ink);
  border-color: var(--cat-color, var(--accent));
  box-shadow: inset 0 -3px 0 0 var(--cat-color, var(--accent)), var(--shadow-sm);
}
.cat-tab.active .cat-tab-count { background: var(--cat-color, var(--accent)); color: #fff; }
.cat-tab--all { color: var(--accent); font-family: inherit; }
.cat-tab--all:hover { color: var(--ink); border-color: var(--accent); }

/* ---------- Carte des sorties par région ---------- */
.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 440px) 1fr;
  gap: 28px;
  align-items: start;
  padding-bottom: 64px;
}
@media (max-width: 820px) { .map-layout { grid-template-columns: 1fr; } }

.map-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  position: sticky;
  top: calc(var(--header-h, 64px) + 12px);
}
@media (max-width: 820px) { .map-wrap { position: static; } }

.france-map { width: 100%; height: auto; display: block; }
.region-path {
  fill: var(--region-color, var(--surface-2));
  fill-opacity: 0.5;               /* régions sans sortie : teinte pastel douce */
  stroke: var(--surface);
  stroke-width: 1.5;
  cursor: pointer;
  transition: fill-opacity 0.15s ease, filter 0.15s ease;
}
.region-path:hover { fill-opacity: 0.8; }
.region-path.has-acts { fill-opacity: 1; }        /* régions avec sorties : couleur pleine */
.region-path.has-acts:hover { filter: brightness(0.95); }
.region-path.selected { fill-opacity: 1; stroke: var(--ink); stroke-width: 2.2; filter: brightness(0.93); }
.region-badge { pointer-events: none; }
.region-badge circle { fill: var(--ink); }
.region-badge-num { fill: #fff; font-size: 15px; font-weight: 700; font-family: "Nunito", sans-serif; }

.map-credit { color: var(--muted); font-size: 11px; opacity: 0.85; margin: 10px 4px 2px; text-align: center; }
.map-panel { min-width: 0; }
.map-hint {
  color: var(--muted);
  background: var(--surface-2);
  border: 1px dashed var(--line);
  padding: 16px 18px;
  border-radius: 12px;
}
.region-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.region-head h2 { font-size: 24px; }
.map-panel .cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); padding-bottom: 0; }

/* ---------- Activity list ---------- */
.crumb {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 28px 0 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.crumb:hover { color: var(--ink); }
.section-head { padding: 4px 0 26px; }
.section-head h1 { font-size: clamp(26px, 4vw, 36px); }
.section-head p { color: var(--muted); margin-top: 8px; max-width: 620px; }

.filters { display: flex; gap: 8px; margin: 0 0 24px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 7px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  padding-bottom: 64px;
}
/* ---------- Carte activité (recto/verso, flip 3D) ---------- */
.act-card {
  position: relative;
  border-radius: var(--radius);
  perspective: 1400px;
}
.act-card--flippable { cursor: pointer; }
.act-card--flippable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
/* Conteneur pivotant : les deux faces occupent la même cellule de grille, donc
 * la carte prend la hauteur de la face la plus haute (aucun saut de layout). */
.card-inner {
  display: grid;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0.15, 0.2, 1);
}
.act-card.flipped .card-inner { transform: rotateY(180deg); }
.card-front,
.card-back {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.card-back { transform: rotateY(180deg); }
/* La face masquée reste hors du flux d'interaction (double garde avec [inert]). */
.card-front[inert],
.card-back[inert] { pointer-events: none; }
.card-front .act-actions { margin-top: auto; }
/* Contexte de positionnement pour l'étoile favori (ancrée au recto). */
.card-front { position: relative; }
/* Bouton étoile « favori » : coin haut-droit du recto, au-dessus du média. */
.fav-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.fav-btn:hover { color: var(--fav); border-color: var(--fav); transform: scale(1.08); }
.fav-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.fav-btn.is-fav { color: var(--fav); border-color: var(--fav); background: var(--fav-soft); }
.fav-star { display: block; }
@media (prefers-reduced-motion: reduce) {
  .fav-btn { transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease; }
  .fav-btn:hover { transform: none; }
}
.card-back h3 { color: var(--muted); font-size: 17px; }
.card-back .desc { margin-bottom: 4px; }
.card-back .flip-hint { margin-top: auto; }
/* Indice discret invitant au retournement. */
.flip-hint {
  margin: 12px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: uppercase;
}
.act-card--flippable:hover .flip-hint { color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .card-inner { transition: none !important; }
}
.act-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.tag {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
}
.tag.maison { background: #EDF1E8; color: #5d7150; }
.tag.sortie { background: #E7EEF2; color: #4a6b7a; }
.tag.meta { background: var(--surface-2); color: var(--muted); }
.act-card h3 { font-size: 19px; margin-bottom: 8px; line-height: 1.25; }
.act-card .desc { color: var(--muted); font-size: 14.5px; }
.act-meta { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.act-meta strong { color: var(--ink); font-weight: 600; }
.materials { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.materials span {
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 8px;
  color: var(--muted);
}
.source {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}
.source a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.verified {
  display: inline-block;
  background: #EDF1E8;
  color: #5d7150;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 8px;
  white-space: nowrap;
}
.act-actions { margin-top: 16px; }
.btn-add {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-add:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Planning ---------- */
.planning-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
  padding-bottom: 64px;
}
.day-col {
  background: var(--surface);
  border: 1px solid var(--day-color, var(--line));
  border-top: 4px solid var(--day-color, var(--accent));
  border-radius: var(--radius-sm);
  padding: 12px 12px 14px;
}
.day-col h3 {
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 12px;
  text-align: center;
  background: var(--day-color, var(--surface-2));
  border-radius: 999px;
  padding: 7px 8px;
}
/* Une couleur pastel douce par jour, pour égayer la semaine. */
.planning-grid .day-col:nth-child(1) { --day-color: #EAC7C2; }
.planning-grid .day-col:nth-child(2) { --day-color: #EAD9AE; }
.planning-grid .day-col:nth-child(3) { --day-color: #C9DEC6; }
.planning-grid .day-col:nth-child(4) { --day-color: #BFD6DE; }
.planning-grid .day-col:nth-child(5) { --day-color: #D8CCE4; }
.planning-grid .day-col:nth-child(6) { --day-color: #F0D3B8; }
.planning-grid .day-col:nth-child(7) { --day-color: #E6C6D2; }
.slot { margin-bottom: 12px; }
.slot:last-of-type { margin-bottom: 0; }
.slot-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin: 0 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
}
.slot-empty { font-size: 12.5px; color: var(--line); text-align: center; margin: 6px 0; }
.add-rest {
  width: 100%;
  border: 1px dashed var(--line);
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px;
  border-radius: 9px;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.15s ease;
}
.add-rest:hover { color: var(--ink); border-color: var(--accent); }
.slot-actions { display: flex; flex-wrap: nowrap; gap: 6px; margin-top: 6px; }
.slot-actions .add-act,
.slot-actions .add-rest {
  flex: 1 1 0;
  width: auto;
  min-width: 0;          /* autorise le rétrécissement sous la largeur du contenu */
  margin-top: 0;
  white-space: nowrap;   /* le libellé ne repasse pas à la ligne */
  padding: 6px 4px;      /* plus compact dans les colonnes de jour étroites */
}
.add-act {
  border: 1px dashed var(--accent);
  background: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.add-act:hover { color: #fff; background: var(--accent); border-style: solid; }
.plan-item.repos {
  border-left-color: #cdbfae;
  background: #f3ede3;
  color: #8a7660;
  font-style: italic;
}
.plan-item {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--cat-color, var(--accent));
  border-radius: 10px;
  padding: 9px 26px 9px 10px;
  margin-bottom: 8px;
  font-size: 12.5px;
  line-height: 1.35;
}
.plan-item .x {
  position: absolute;
  top: 4px; right: 6px;
  border: none; background: none;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  line-height: 1;
}
.plan-item .x:hover { color: #c0564b; }
.plan-clear {
  margin: 4px 0 64px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
}
.plan-clear:hover { color: #c0564b; border-color: #e3c4c0; }

/* ---------- Navigation du planning (allégée : menus + bande de semaines) ---------- */
.planning-nav { margin: 0 0 18px; }
.plan-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.plan-select {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--accent);
}
.plan-select select {
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; cursor: pointer; min-width: 190px;
}
.plan-select select:focus { outline: none; border-color: var(--accent); background: var(--surface); }

.week-strip {
  display: flex; gap: 8px; overflow-x: auto;
  margin-top: 14px; padding-bottom: 4px;
  scrollbar-width: thin;
}
.week-tab {
  flex: 0 0 auto;
  display: inline-flex; flex-direction: column; gap: 1px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
  font-family: inherit; font-weight: 700; padding: 6px 13px;
  border-radius: 12px; cursor: pointer; line-height: 1.15; white-space: nowrap;
  transition: all 0.15s ease;
}
.week-tab:hover { color: var(--ink); border-color: var(--accent); }
.week-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.week-num { font-size: 12px; }
.week-dates { font-size: 11px; font-weight: 600; opacity: 0.85; }
.week-banner {
  font-family: "Fraunces", serif; font-size: 16px; color: var(--ink);
  margin: 16px 0 18px;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(58, 55, 51, 0.34);
  display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%; max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}
.modal-close {
  position: absolute; top: 14px; right: 16px;
  border: none; background: none; font-size: 24px;
  color: var(--muted); cursor: pointer; line-height: 1;
}
.modal h3 { font-size: 20px; }
.modal-activity { color: var(--accent); font-weight: 700; margin: 6px 0 4px; }
.modal-week { color: var(--muted); font-size: 13px; font-weight: 600; margin: 0 0 14px; }
.modal-week:empty { display: none; }
.modal-label { font-size: 13px; color: var(--muted); margin: 16px 0 10px; }
.modal-label:first-of-type { margin-top: 4px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-confirm {
  width: 100%;
  margin-top: 22px;
  border: none;
  background: var(--ink);
  color: #fff;
  font-family: inherit; font-weight: 700; font-size: 15px;
  padding: 13px; border-radius: var(--radius-sm); cursor: pointer;
  transition: opacity 0.15s ease;
}
.modal-confirm:hover { opacity: 0.92; }

/* ---------- Modale « choisir une activité » (recherche depuis un créneau) ---------- */
.modal--pick { max-width: 440px; }
.pick-target { color: var(--accent); font-weight: 700; margin: 6px 0 14px; }
.pick-target:empty { display: none; }
.pick-search {
  width: 100%;
  font-family: inherit; font-size: 14px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 14px;
}
.pick-search:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.pick-results {
  margin-top: 14px;
  max-height: 46vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
  scrollbar-width: thin;
}
.pick-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  border: 1px solid var(--line);
  border-left: 4px solid var(--cat-color, var(--accent));
  background: var(--surface-2);
  border-radius: 10px; padding: 9px 11px; cursor: pointer;
  font-family: inherit; transition: all 0.15s ease;
}
.pick-item:hover { border-color: var(--cat-color, var(--accent)); background: var(--surface); box-shadow: var(--shadow-sm); }
.pick-emoji { font-size: 18px; line-height: 1; flex: 0 0 auto; }
.pick-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pick-title { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.pick-meta { font-size: 11.5px; color: var(--muted); }
.pick-empty { color: var(--muted); font-size: 13px; text-align: center; margin: 20px 0; }

/* ---------- Footer & misc ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0 50px; margin-top: 20px; }
.site-footer p { color: var(--muted); font-size: 13px; margin: 4px 0; }
.footer-ai { font-size: 12px; opacity: 0.8; margin-top: 6px; }
.footer-links { margin: 8px 0; }
.footer-links a {
  color: var(--accent); font-weight: 700; font-size: 13px;
  text-decoration: underline; text-underline-offset: 2px;
}
.footer-links a:hover { color: var(--ink); }
.footer-copy { color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.loading { color: var(--muted); padding: 60px 0; text-align: center; }
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff;
  padding: 12px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none; z-index: 60;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

@media (max-width: 760px) {
  .planning-grid { grid-template-columns: 1fr; }
  .day-col { min-height: auto; }
  .nav-link { padding: 8px 12px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- Bouton « + Activité » (nav) ---------- */
.nav-add {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.nav-add:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Authentification ---------- */
.nav-auth { display: inline-flex; align-items: center; gap: 8px; }
.nav-login { background: var(--ink); color: #fff; border-color: var(--ink); cursor: pointer; }
.nav-login:hover { opacity: 0.92; }
.nav-logout { border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.nav-logout:hover { color: #c0564b; border-color: #e3c4c0; }

/* ---------- Menu déroulant utilisateur (👤 prénom) ---------- */
.user-menu { position: relative; display: inline-flex; }
.user-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: 13px; font-weight: 700; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
  max-width: 200px;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.user-chip .user-name {
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-chip .user-menu-caret { font-size: 10px; color: var(--muted); transition: transform 0.18s ease; }
.user-chip:hover { background: var(--surface-2); border-color: var(--accent); }
.user-chip[aria-expanded="true"] { background: var(--surface-2); border-color: var(--accent); }
.user-chip[aria-expanded="true"] .user-menu-caret { transform: rotate(180deg); }
.user-menu-list {
  position: absolute; right: 0; top: calc(100% + 8px);
  margin: 0; padding: 6px; list-style: none;
  min-width: 180px; z-index: 30;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.user-menu-list[hidden] { display: none; }
.user-menu-item {
  display: block; width: 100%; text-align: left;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink);
  background: none; border: none; cursor: pointer;
  padding: 9px 12px; border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}
.user-menu-item:hover, .user-menu-item:focus-visible { background: var(--surface-2); outline: none; }
.user-menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.user-menu-logout { color: var(--muted); }
.user-menu-logout:hover, .user-menu-logout:focus-visible { color: #c0564b; background: #f7e7e4; }
.auth-tabs {
  display: flex; gap: 6px; margin: 8px 0 16px;
  background: var(--surface-2); padding: 4px; border-radius: 999px;
}
.auth-tab {
  flex: 1; border: none; background: none;
  font-family: inherit; font-weight: 700; font-size: 13.5px; color: var(--muted);
  padding: 9px; border-radius: 999px; cursor: pointer;
}
.auth-tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.auth-error {
  color: #b0473d; font-size: 13px;
  background: #f7e7e4; border: 1px solid #e3c4c0;
  padding: 9px 12px; border-radius: 10px; margin: 12px 0 0;
}
.guest-note {
  font-size: 13.5px; color: var(--muted);
  background: var(--surface-2); border: 1px dashed var(--line);
  padding: 11px 15px; border-radius: 12px; margin: 0 0 22px;
}
.guest-note a { color: var(--accent); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.guest-note strong { color: var(--ink); }

/* ---------- Tag perso + suppression ---------- */
.tag.custom { background: #f0e7d8; color: #9a7b46; }
.btn-del {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-del:hover { color: #c0564b; border-color: #e3c4c0; }

/* ---------- Média (Instagram / image / vidéo) ---------- */
.act-media {
  margin: 0 0 14px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #faf8f4;
}
.act-media img, .act-media video {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: cover;
}
.act-media--ig { border: none; background: transparent; }
.act-media--ig .instagram-media {
  margin: 0 auto !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}
/* Crédit d'image discret (attribution CC-BY, etc.) sous l'illustration. */
.act-credit {
  margin: 0;
  padding: 4px 9px;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--muted);
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  text-align: right;
}
.act-credit a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.act-credit a:hover { color: var(--ink); }
/* Placeholder Japandi : teinte pastel de la catégorie (voile clair) + emoji. */
.act-media--ph {
  display: flex; align-items: center; justify-content: center;
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--cat-color, var(--accent));
}
.act-media--ph::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(255, 253, 250, 0.74);
}
.act-media--ph span { position: relative; font-size: 42px; line-height: 1; opacity: 0.8; }

/* ---------- Formulaire d'ajout ---------- */
.modal-form { max-width: 540px; max-height: 88vh; overflow-y: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.field {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 12.5px; color: var(--muted); font-weight: 600;
}
.field.full { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 14px; font-weight: 400; color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); background: var(--surface);
}
.form-hint {
  font-size: 12.5px; color: var(--muted);
  margin: 14px 0 0; background: var(--surface-2);
  padding: 10px 12px; border-radius: 10px;
}

/* ---------- Favoris dans « Ma semaine » ---------- */
.planning-favs { margin: 6px 0 28px; }
.planning-favs-title { font-size: 20px; color: var(--ink); margin: 0 0 4px; }
.planning-favs-hint { color: var(--muted); font-size: 14px; margin: 0 0 14px; }

/* ---------- Actions planning ---------- */
.plan-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 64px; }
.plan-actions .plan-clear { margin: 0; }
.plan-print {
  border: none;
  background: var(--ink);
  color: #fff;
  font-family: inherit; font-weight: 700; font-size: 13px;
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
}
.plan-print:hover { opacity: 0.92; }
.plan-save {
  border: none;
  background: #5d7150;
  color: #fff;
  font-family: inherit; font-weight: 700; font-size: 13px;
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
}
.plan-save:hover { opacity: 0.92; }

/* ---------- Instagram (suivre le projet) ---------- */
.ig-follow {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit; font-weight: 700; font-size: 14px;
  padding: 10px 18px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}
a.ig-follow { cursor: pointer; }
a.ig-follow:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.ig-follow--soon { color: var(--muted); border-style: dashed; box-shadow: none; cursor: default; }
.ig-logo { flex-shrink: 0; display: block; }

/* ---------- Page « À propos » ---------- */
.about-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px 26px; margin-bottom: 22px;
}
.about-title { font-size: 20px; margin-bottom: 12px; }
.about-section p { color: var(--muted); font-size: 15px; margin: 0 0 12px; }
.about-section p:last-child { margin-bottom: 0; }

/* ---------- Formulaire de contact (« À propos ») ---------- */
.contact-form { margin: 6px 0 22px; }
.contact-form .field textarea { min-height: 96px; }
.contact-form .modal-confirm { width: auto; padding: 12px 34px; margin-top: 16px; }
/* Honeypot anti-spam : masqué hors écran, non focusable — invisible pour un humain. */
.contact-hp {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}
.contact-offline { font-style: italic; }

/* ---------- Profil (bloc-note) ---------- */
/* La page profil prend l'allure d'un bloc-note : papier chaud, reliure à
 * spirale sur le bord gauche, filet de marge, et deux feuillets nettement
 * séparés (Informations générales / Semaines sauvegardées). */
.profile-notebook {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 30px 30px 56px;
  margin-bottom: 28px;
  overflow: hidden;
}
/* Anneaux de reliure (spirale) percés dans le papier, sur le bord gauche */
.profile-notebook::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 20px;
  width: 10px;
  background-image: radial-gradient(circle at center, var(--bg) 0 3.5px, transparent 4.5px);
  background-size: 10px 28px;
  background-repeat: repeat-y;
  pointer-events: none;
}
/* Filet de marge vertical façon cahier */
.profile-notebook::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 42px;
  width: 1px;
  background: var(--accent);
  opacity: 0.3;
  pointer-events: none;
}

.profile-section {
  position: relative;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}
/* Séparation nette des deux feuillets du bloc-note */
.profile-section + .profile-section {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px dashed var(--line);
}
.profile-title {
  font-size: 21px;
  margin: 0 0 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.profile-title + * { margin-top: 16px; }
.profile-sub {
  font-size: 12.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--accent);
  margin: 18px 0 10px;
}
.profile-hint { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.profile-section .form-grid { margin-top: 14px; }

/* Champs posés sur le papier : fond clair pour ressortir + focus bien visible */
.profile-section .field input,
.profile-section .field select,
.profile-section .field textarea,
.profile-section .child-row input,
.profile-section .save-week-row input {
  background: var(--surface);
}
.profile-section .field input:focus,
.profile-section .field select:focus,
.profile-section .field textarea:focus,
.profile-section .child-row input:focus,
.profile-section .save-week-row input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: var(--focus-ring);
}

.child-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.child-row .child-name { flex: 2; }
.child-row .child-age { flex: 1; }
.child-row input {
  font-family: inherit; font-size: 14px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 11px; min-width: 0;
}
.child-row input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.child-del {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: 18px; line-height: 1;
  border-radius: 10px; cursor: pointer; transition: all 0.15s ease;
}
.child-del:hover { color: #c0564b; border-color: #e3c4c0; }

.btn-secondary {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-family: inherit; font-weight: 700; font-size: 13.5px;
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  transition: all 0.15s ease;
}
.btn-secondary:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.save-week-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.save-week-row input {
  flex: 1; min-width: 200px;
  font-family: inherit; font-size: 14px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
}
.save-week-row input:focus { outline: none; border-color: var(--accent); background: var(--surface); }

.weeks-list { display: flex; flex-direction: column; gap: 10px; }
.week-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.week-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.week-name {
  font-family: "Fraunces", serif; font-size: 16px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.week-meta { font-size: 12.5px; color: var(--muted); }
.week-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-del-inline {
  border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: 15px;
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
  transition: all 0.15s ease;
}
.btn-del-inline:hover { color: #c0564b; border-color: #e3c4c0; }

/* Liste des favoris dans « Mon profil » (même gabarit que les semaines). */
.fav-list { display: flex; flex-direction: column; gap: 10px; }
.fav-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.fav-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fav-title {
  font-family: "Fraunces", serif; font-size: 16px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fav-cat { font-size: 12.5px; color: var(--muted); }
.fav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

@media (max-width: 600px) {
  .profile-notebook { padding: 22px 18px 22px 42px; }
  .profile-notebook::before { left: 12px; }
  .profile-notebook::after { left: 30px; }
  .week-card { flex-direction: column; align-items: stretch; }
  .week-actions { justify-content: space-between; }
  .fav-card { flex-direction: column; align-items: stretch; }
  .fav-actions { justify-content: space-between; }
}

/* ---------- Tableau d'administration (#/admin, réservé à l'admin) ---------- */
.admin-board { display: grid; gap: 20px; margin-bottom: 40px; }
.admin-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
}
.admin-panel-title {
  font-family: "Fraunces", serif; font-size: 20px; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.admin-count {
  font-family: "Nunito", sans-serif; font-size: 13px; font-weight: 700;
  color: var(--accent); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
}
.admin-panel-hint { color: var(--muted); font-size: 14px; margin: 6px 0 16px; }
.admin-panel .modal-confirm { width: auto; padding: 12px 28px; margin-top: 0; }
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.admin-row-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.admin-row-title {
  font-family: "Fraunces", serif; font-size: 16px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-row-meta { font-size: 12.5px; color: var(--muted); }
.admin-row .btn-del-inline { flex-shrink: 0; }
@media (max-width: 600px) {
  .admin-row { flex-direction: column; align-items: stretch; }
}

.print-only { display: none; }

/* ---------- Impression PDF du planning ---------- */
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  .site-header, .site-footer, .hero, .toast, .modal-overlay,
  .plan-actions, .slot-actions, .plan-item .x, .slot-empty, .guest-note, .planning-nav, .fav-btn, .planning-favs { display: none !important; }
  .act-media--ph { display: none !important; }
  .act-card { break-inside: avoid; }
  /* Impression : on déplie recto + verso (pas de flip, aucune face masquée). */
  .card-inner { display: block !important; transform: none !important; }
  .card-front, .card-back {
    transform: none !important;
    -webkit-backface-visibility: visible !important;
    backface-visibility: visible !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .flip-hint { display: none !important; }
  .act-media img { max-height: 160px; }
  .act-credit { font-size: 8px; }
  body { background: #fff; color: #000; }
  .wrap { max-width: none; padding: 0; }
  .section-head { padding: 0 0 8px; }
  .section-head p { display: none; }
  .print-only { display: block; }
  .print-head {
    font-family: "Fraunces", serif; font-size: 18px;
    margin-bottom: 10px; padding-bottom: 8px;
    border-bottom: 2px solid #000;
  }
  .planning-grid { grid-template-columns: repeat(7, 1fr); gap: 6px; }
  .day-col { border: 1px solid #999; box-shadow: none; break-inside: avoid; padding: 8px 7px; }
  .day-col h3 { font-size: 11px; }
  .slot-label { font-size: 9px; }
  .plan-item { box-shadow: none; font-size: 11px; padding: 7px 8px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
