/* Castographie – Design System */
/* Police chargée via <link> dans chaque page HTML pour de meilleures performances */

:root {
  color-scheme: light;
  --white: #ffffff;
  --black: #000000;
  --gray-light: #f5f5f5;
  --gray-medium: #d3d3d3;
  --gray-dark: #333333;
  --green-active: #16a34a;
  --text: #1a1a1a;
  --muted: #666666;
  --border: rgba(0,0,0,0.1);
  --radius: 8px;
  font-family: 'Advent Pro', system-ui, sans-serif;
  font-weight: 400;
}

/* Reset */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; background: var(--white); color: var(--text); }
body { font-family: 'Advent Pro', system-ui, sans-serif; line-height: 1.6; }
h1, h2, h3, h4, .brand-title, .brand-subtitle, .main-nav a, .button, .section-kicker { font-family: 'Advent Pro', system-ui, sans-serif; }
a { color: var(--text); text-decoration: none; }
button, input, textarea, select { font: inherit; }

/* Header */
.site-header { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 1rem; 
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  min-width: 0;
  flex: 1;
}
.brand-title { 
  display: inline-block; 
  font-size: clamp(1.8rem, 3.3vw, 2.8rem); 
  font-weight: 700; 
  letter-spacing: 0.08rem;
  color: var(--text); 
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.brand-subtitle { 
  margin: 0; 
  color: var(--muted); 
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  letter-spacing: 0.03rem;
  white-space: nowrap;
}
.main-nav { 
  display: flex; 
  flex-wrap: nowrap; 
  align-items: center; 
  gap: 0.25rem;
  flex-shrink: 0;
}
.main-nav a { 
  padding: 0.5rem 0.8rem; 
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease; 
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}
.main-nav a:hover {
  background: var(--gray-light);
  color: var(--black);
}

.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle {
  background: var(--gray-light);
  color: var(--black);
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  background: var(--white, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  min-width: 160px;
  z-index: 100;
  flex-direction: column;
  padding: 0.4rem 0;
}
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a {
  padding: 0.55rem 1rem;
  border-radius: 0;
  font-size: 0.9rem;
  display: block;
}
.nav-dropdown-menu a:hover { background: var(--gray-light); }

/* Pages */
.page-home, .page-about, .page-form, .page-explore, .page-detail, .page-admin, .page-profile {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Profile page */
.profile-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.profile-section { padding-top: 1.5rem; }
.profile-section:first-child { padding-top: 0; }
.profile-section-border { border-top: 1px solid var(--border); margin-top: 1.5rem; }

.profile-hint { color: var(--muted); font-size: 0.88rem; margin-bottom: 1rem; margin-top: 0; }

.status-badge {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid;
  white-space: nowrap;
}

.my-post-item {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
.my-post-item:last-child { border-bottom: none; }

.my-post-preview { flex-shrink: 0; }

.my-post-thumb {
  width: 100px;
  height: 76px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
}
.my-post-thumb-empty {
  width: 100px;
  height: 76px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--gray-light);
}

.my-post-body { flex: 1; min-width: 0; }

.my-post-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.my-post-title { font-weight: 600; }

.my-post-meta { font-size: 0.85rem; color: var(--muted); margin-top: 0.2rem; }

.my-post-desc {
  font-size: 0.9rem;
  color: var(--gray-dark);
  margin: 0.35rem 0 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.my-post-actions { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.my-post-actions .btn-delete { border-color: #ef4444; color: #ef4444; }
.my-post-actions .btn-delete:hover { background: #ef4444; color: #fff; border-color: #ef4444; }

.edit-form-container {
  margin-top: 0.75rem;
  padding: 1rem;
  background: var(--gray-light);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Diff table for edit requests */
.diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 0.75rem;
}
.diff-table th {
  text-align: left;
  padding: 0.4rem 0.6rem;
  background: var(--gray-light);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 500;
}
.diff-table td {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  vertical-align: top;
}
.diff-label { color: var(--muted); white-space: nowrap; font-weight: 500; }
.diff-before { color: #b00020; text-decoration: line-through; }
.diff-after  { color: #1a7340; font-weight: 500; }

@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; }
}

/* Hero Section */
.hero { 
  display: grid; 
  gap: 2rem; 
  grid-template-columns: 1fr;
  align-items: center; 
  margin: 1.5rem 0 2.5rem;
  padding: 2rem 0;
}
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    padding: 2.5rem 0;
  }
}
.hero-content h1 { 
  font-size: clamp(2.3rem, 4vw, 3.8rem); 
  margin: 0 0 1rem; 
  color: var(--text);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.hero-content p { 
  font-size: 1.02rem; 
  max-width: 42rem; 
  color: var(--muted);
  line-height: 1.8;
}
.hero-actions { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 1rem; 
  margin-top: 1.5rem;
}
.hero-visual-card {
  min-height: 360px;
  background: linear-gradient(140deg, #121212, #2a2a2a);
  color: var(--white);
  border-radius: 24px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}
.hero-carousel {
  padding: 0;
  overflow: hidden;
  position: relative;
}
.hero-carousel-placeholder {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 360px;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: block;
  text-decoration: none;
}
.hero-slide.active { opacity: 1; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.25rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}
.hero-dots {
  position: absolute;
  bottom: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.45rem;
  z-index: 2;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, transform 0.25s;
}
.hero-dot.active {
  background: #fff;
  transform: scale(1.25);
}
.hero-visual-badge {
  display: inline-flex;
  align-self: flex-start;
  background: rgba(255,255,255,0.12);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.04rem;
  text-transform: uppercase;
}
.hero-visual-line {
  height: 1px;
  background: rgba(255,255,255,0.18);
  margin: 1.25rem 0;
}
.hero-visual-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.hero-visual-meta span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.92rem;
}

/* Buttons */
.button { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  border: 1px solid var(--black);
  color: var(--black); 
  background: var(--white); 
  border-radius: 4px; 
  padding: 0.8rem 1.2rem; 
  transition: all 0.2s ease; 
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
}
.button:hover { 
  background: var(--black);
  color: var(--white);
}
.button-primary { 
  background: var(--black); 
  color: var(--white); 
  border: 1px solid var(--black);
}
.button-primary:hover { 
  background: var(--gray-dark);
  border-color: var(--gray-dark);
}
.button-small { 
  padding: 0.6rem 1rem; 
  font-size: 0.85rem;
}
.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Home Showcase */
.home-showcase {
  display: grid;
  gap: 1.5rem;
  margin: 1rem 0 2rem;
}
@media (min-width: 900px) {
  .home-showcase {
    grid-template-columns: 0.95fr 1.05fr;
    align-items: start;
  }
}
.showcase-text {
  padding: 0.2rem 0 0;
}
.section-kicker {
  margin: 0 0 0.6rem;
  color: var(--green-active);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}
.showcase-text h2,
.home-cta h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  font-weight: 700;
  line-height: 1.2;
}
.showcase-text p,
.home-cta p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}
.feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.3rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.feature-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}
.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.home-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 2rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--gray-light);
}

.hero-tag {
  display: inline-block;
  background: rgba(34,197,94,0.12);
  color: var(--green-active);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04rem;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-highlights {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 1.75rem;
}
.hero-highlights div {
  padding: 1rem;
  background: var(--gray-light);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.hero-highlights strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1rem;
}
.hero-highlights span {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-photo {
  min-height: 400px;
  background: linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.02)),
              radial-gradient(circle at 20% 20%, rgba(34,197,94,0.15), transparent 28%),
              var(--gray-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 1rem;
  text-align: center;
  padding: 1.5rem;
}
.hero-photo span {
  max-width: 18rem;
  color: var(--muted);
  line-height: 1.6;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--black);
  color: var(--black);
  background: var(--white);
  border-radius: 4px;
  padding: 0.95rem 1.4rem;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
}
.form-row { 
  margin-bottom: 1rem; 
  display: flex; 
  flex-direction: column; 
  gap: 0.4rem;
}
.form-row label { 
  font-size: 0.9rem; 
  color: var(--text);
  font-weight: 500;
}
input, textarea, select {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 0.75rem 0.9rem;
  font-size: 1rem; /* 16px min — évite le zoom automatique iOS Safari */
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--black);
  outline-offset: 2px;
  border-color: var(--black);
}
textarea { 
  min-height: 120px; 
  resize: vertical;
}
.checkbox-row label { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text); }
.coordinate-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.field-hint {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Author choice radios */
.author-choice-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.author-choice-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.author-choice-item:hover {
  border-color: var(--text);
  background: var(--gray-light);
}
.author-choice-item input[type="radio"] {
  flex-shrink: 0;
  accent-color: var(--text);
  width: 1rem;
  height: 1rem;
}
.author-choice-label {
  flex: 1;
  font-weight: 500;
  font-size: 0.95rem;
}
.author-choice-preview {
  color: var(--muted);
  font-size: 0.88rem;
  font-style: italic;
}
.author-choice-item--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.author-choice-item--disabled:hover {
  border-color: var(--border);
  background: transparent;
}

/* Pre-filled field (organisation) */
.prefilled-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--gray-light);
}
.prefilled-value {
  flex: 1;
  color: var(--text);
}
.link-modifier {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: underline;
  white-space: nowrap;
  flex-shrink: 0;
}
.link-modifier:hover { color: var(--text); }
.map-picker {
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 260px;
  margin-bottom: 0.8rem;
  overflow: hidden;
  background: linear-gradient(135deg, #f7f7f7, #ececec);
  position: relative;
}
.map-picker .leaflet-container {
  width: 100%;
  height: 100%;
  min-height: 260px;
  font-family: inherit;
}

/* Explorer — panneau latéral lieu */
.ep-header {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1;
}
#epSummary {
  flex: 1;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sélecteur contribution */
.ep-contrib-bar {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--gray-light);
}
.ep-contrib-select {
  width: 100%;
}

/* Info contribution */
.ep-contrib-info {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.ep-contrib-title { font-size: 0.95rem; }
.ep-contrib-meta  { font-size: 0.82rem; color: var(--muted); display: flex; flex-direction: column; gap: 0.15rem; }
.ep-contrib-desc  { font-size: 0.88rem; color: var(--text); margin: 0.25rem 0 0; line-height: 1.5; }

/* Grille fichiers */
.ep-file-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}
.ep-file-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.ep-file-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.12); }
.ep-file-thumb {
  aspect-ratio: 4 / 3;
  background: var(--gray-light);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ep-file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-doc-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 2rem;
  color: var(--muted);
  padding: 0.75rem;
}
.ep-doc-name { font-size: 0.72rem; text-align: center; word-break: break-all; line-height: 1.3; }
.ep-file-card-label {
  padding: 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.ep-file-card-title { font-size: 0.82rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-file-card-date  { font-size: 0.75rem; color: var(--muted); }

/* Vue détail fichier */
.ep-visual {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--gray-light);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ep-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-doc-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 3.5rem;
  color: var(--muted);
  padding: 2rem;
}
.ep-doc-icon span:last-child { font-size: 0.85rem; text-align: center; }
.ep-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
}
.ep-nav-counter { font-size: 0.85rem; color: var(--muted); }
.ep-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ep-info-title  { font-size: 1rem; font-weight: 600; margin: 0; }
.ep-info-meta   { font-size: 0.85rem; color: var(--muted); display: flex; flex-direction: column; gap: 0.2rem; }
.ep-info-desc   { font-size: 0.9rem; line-height: 1.6; margin: 0; }
.ep-info-kw     { font-size: 0.8rem; color: var(--muted); margin: 0; }
.ep-info-actions { padding-top: 0.5rem; border-top: 1px solid var(--border); }

/* File slots in contribution form */
.file-slot {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--gray-light);
  margin-bottom: 0.75rem;
}
.file-slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.file-slot-header strong {
  font-size: 0.95rem;
}
.file-slots-add {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.file-slots-count {
  font-size: 0.85rem;
  color: var(--muted);
}

.map-error {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.9);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  color: var(--muted);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  font-size: 0.95rem;
  z-index: 1000;
}

.form-message { margin-top: 1rem; color: #d32f2f; }
.small-text { color: var(--muted); margin-top: 1rem; }

/* Explore Page */
.page-explore {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filters-topbar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}

.filters-topbar-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filters-topbar .view-toggle {
  margin-bottom: 0;
  flex-shrink: 0;
}

.filters-toggle-btn {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.filters-toggle-btn:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.filters-topbar-controls .active-filters {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.filters-expanded {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.filter-reset-group {
  display: flex;
  align-items: flex-end;
}

.filters-panel { 
  background: var(--white); 
  border: 1px solid var(--border); 
  border-radius: var(--radius); 
  padding: 1.2rem;
  height: fit-content;
  position: sticky;
  top: 1rem;
  max-width: 260px;
}
.filters-panel h2 { 
  margin-top: 0; 
  margin-bottom: 0.9rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}
.filter-group { 
  margin-bottom: 1.2rem; 
  display: flex; 
  flex-direction: column; 
  gap: 0.6rem;
}
.filter-group label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03rem;
  font-weight: 500;
}
.filter-group input[type="text"],
.filter-group input[type="date"],
.filter-group select {
  width: 100%;
  font-size: 0.92rem;
  padding: 0.65rem 0.8rem;
}

/* Active filters display */
.active-filters { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.filter-tag { 
  display: inline-flex; 
  align-items: center; 
  gap: 0.5rem; 
  background: var(--green-active); 
  color: var(--white); 
  padding: 0.5rem 0.75rem; 
  border-radius: 4px; 
  font-size: 0.85rem;
  font-weight: 500;
}
.filter-tag button { 
  background: none; 
  border: none; 
  color: var(--white); 
  cursor: pointer; 
  font-weight: bold; 
  padding: 0;
  display: flex;
  align-items: center;
}
.filter-tag button:hover {
  opacity: 0.8;
}

.view-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.view-toggle + .active-filters {
  margin-top: 0.5rem;
}
.view-toggle button {
  flex: 1;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}
.view-toggle button.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.explore-main { 
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.view-map {
  height: 500px;
  min-height: 500px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #f0f0f0;
}

.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 3px;
}

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--gray-light);
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item-doc {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.5rem;
  text-align: center;
}

/* Lightbox galerie */
.glb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}
.glb-overlay.open { display: flex; }
.glb-box {
  background: #fff;
  border-radius: var(--radius);
  max-width: 860px;
  width: 95vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.glb-visual {
  flex: 0 0 auto;
  max-height: 55vh;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}
.glb-visual img { max-width: 100%; max-height: 55vh; object-fit: contain; display: block; }
.glb-doc { padding: 2rem; text-align: center; color: #fff; font-size: 2rem; }
.glb-info {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.glb-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Detail Page */
.detail-article {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}
.detail-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.detail-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0;
}
.detail-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
}
.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.6rem 1.5rem;
  font-size: 0.88rem;
  padding: 0.75rem 1rem;
  background: var(--gray-light);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.detail-meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.detail-meta-label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04rem;
}

/* Carrousel */
.detail-visual {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--gray-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.detail-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
#detailDocIcon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--muted);
  padding: 2rem;
}
.detail-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.15s;
}
.detail-nav-btn:hover { background: rgba(0,0,0,0.8); }
.detail-nav-btn.prev  { left: 0.75rem; }
.detail-nav-btn.next  { right: 0.75rem; }
.detail-nav-counter {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.78rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  z-index: 2;
  pointer-events: none;
}

/* Infos spécifiques fichier */
.detail-file-info {
  background: var(--gray-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.88rem;
}
.detail-file-row {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.detail-file-row.full p { margin: 0.2rem 0 0; line-height: 1.6; color: var(--muted); }

/* Sections (téléchargements, notes, carte) */
.detail-section { display: flex; flex-direction: column; gap: 0.5rem; }
.detail-section-title { font-size: 0.9rem; font-weight: 600; margin: 0; text-transform: uppercase; letter-spacing: 0.04rem; }
.detail-notes { display: flex; flex-direction: column; gap: 0.5rem; }
.detail-note {
  padding: 0.75rem;
  background: var(--gray-light);
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.6;
}
.detail-note p { margin: 0 0 0.25rem; }
.detail-note-meta { font-size: 0.8rem; color: var(--muted); }
.detail-map {
  min-height: 250px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f0f0f0;
  border: 1px solid var(--border);
}

/* Admin Page */
.admin-list { 
  display: grid; 
  gap: 1rem;
}
.admin-item { 
  border: 1px solid var(--border); 
  border-radius: var(--radius); 
  padding: 1.5rem; 
  display: grid; 
  gap: 1rem; 
  background: var(--white);
}
.admin-item-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}
.admin-item-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}
.admin-item-meta {
  color: var(--muted);
  font-size: 0.85rem;
}
.admin-item-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.admin-item-actions button {
  padding: 0.6rem 1rem;
}

.admin-item-description {
  color: var(--black);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.admin-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Moderator management */
.moderator-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}
.moderator-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.moderator-item-info span { font-size: 0.85rem; color: var(--muted); }

/* Featured posts */
.featured-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}
.featured-thumb {
  width: 56px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.featured-thumb-empty {
  width: 56px;
  height: 44px;
  background: var(--gray-light);
  border-radius: 4px;
  flex-shrink: 0;
}
.featured-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.featured-item-body strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.featured-active {
  background: #f59e0b20;
  border-color: #f59e0b;
  color: #b45309;
}
.btn-carousel-active {
  background: #dcfce720;
  border-color: #16a34a;
  color: #15803d;
}

/* Keyword management */
.keyword-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.5rem;
}
.keyword-item-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.keyword-pill {
  background: var(--gray-light);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
  font-size: 0.88rem;
  font-weight: 500;
}
.keyword-count {
  color: var(--muted);
  font-size: 0.82rem;
  flex: 1;
}
.keyword-item-btns {
  display: flex;
  gap: 0.4rem;
}
.keyword-rename-form,
.keyword-merge-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.kw-rename-input {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.6rem;
  font: inherit;
  font-size: 0.9rem;
  width: 200px;
}
.kw-merge-select {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.6rem;
  font: inherit;
  font-size: 0.9rem;
}
.keyword-hint {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
  width: 100%;
}
.keyword-translation-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.45rem;
  flex-wrap: wrap;
}
.kw-translation-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.kw-translation-input {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.3rem 0.55rem;
  font: inherit;
  font-size: 0.85rem;
  width: 220px;
}
.kw-translation-save {
  font-size: 0.8rem;
}
.kw-translation-toggle {
  font-size: 0.78rem;
}
.kw-translation-toggle em {
  font-style: normal;
  font-weight: 600;
}

/* File moderation cards */
.admin-files-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0;
}
.file-moderation-card {
  width: 190px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--gray-light);
}
.file-moderation-preview {
  width: 100%;
  height: 130px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eee;
}
.file-moderation-preview .admin-preview-img {
  width: 100%;
  height: 130px;
  border-radius: 0;
  border: none;
}
.file-moderation-preview .admin-preview-pdf {
  flex-direction: column;
  height: 100%;
  border: none;
  border-radius: 0;
  background: transparent;
}
.file-moderation-name {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.35rem 0.5rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-moderation-actions {
  display: flex;
  gap: 0.35rem;
  padding: 0.4rem 0.5rem;
}
.file-moderation-actions .button {
  flex: 1;
  font-size: 0.78rem;
  padding: 0.3rem 0.4rem;
}
.file-reject-form {
  padding: 0.4rem 0.5rem 0.5rem;
}
.file-reject-reason {
  width: 100%;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.3rem;
  resize: vertical;
}
.file-status {
  font-size: 0.8rem;
  padding: 0.3rem 0.5rem 0.4rem;
  font-weight: 500;
}
.file-status--approved {
  color: #16a34a;
}
.file-status--rejected {
  color: #ef4444;
}
.file-status--rejected em {
  font-weight: 400;
  font-style: italic;
  display: block;
  font-size: 0.76rem;
  margin-top: 0.1rem;
}

.admin-preview-img {
  width: 180px;
  height: 130px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
  cursor: zoom-in;
  transition: opacity 0.2s;
}
.admin-preview-img:hover { opacity: 0.85; }

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem 1rem;
}

.lightbox-box {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  max-width: min(90vw, 680px);
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.lightbox-img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  display: block;
  background: #111;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.lightbox-close:hover { opacity: 1; }

.admin-preview-pdf {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--black);
  text-decoration: none;
  background: var(--white);
}
.admin-preview-pdf:hover { background: #f5f5f5; }

.admin-preview-pdf-icon {
  background: var(--black);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.admin-item-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.4rem 1.5rem;
  font-size: 0.88rem;
  color: var(--black);
}

.admin-detail-label {
  color: var(--muted);
  margin-right: 0.3rem;
}

.admin-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.site-footer { 
  text-align: center; 
  padding: 2rem 1.5rem; 
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* Form styles */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.checkbox-row input[type="checkbox"] {
  width: auto;
}
.checkbox-row label {
  font-size: 0.9rem;
  color: var(--text);
}

/* Responsive */
@media(max-width: 900px) {
  .view-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media(max-width: 600px) {
  .site-header { 
    flex-direction: column; 
    align-items: stretch;
    padding: 1rem;
  }
  .brand-title {
    font-size: 1.25rem;
  }
  .main-nav { 
    justify-content: flex-start;
    gap: 0.25rem;
  }
  .main-nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
  .page-home, .page-about, .page-form, .page-explore, .page-detail, .page-admin {
    padding: 1rem;
  }
  .hero-actions {
    flex-direction: column;
  }
  .button {
    width: 100%;
  }
  .view-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .filters-panel {
    grid-column: 1 / -1;
    padding: 1rem;
  }
}

/* ── Messagerie ──────────────────────────────────────────────────────────────── */

.page-messages { display:flex; flex-direction:column; height:calc(100dvh - var(--header-height,64px) - 48px); padding:0; }

.msg-layout {
  display:grid;
  grid-template-columns: 300px 1fr;
  flex:1;
  overflow:hidden;
  border-top:1px solid var(--border);
}

.msg-sidebar {
  border-right:1px solid var(--border);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:#fafafa;
}
.msg-sidebar-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:1rem 1rem 0.75rem;
  border-bottom:1px solid var(--border);
}
.msg-sidebar-header h2 { margin:0; font-size:1.1rem; }

.conv-list { flex:1; overflow-y:auto; }

.conv-item {
  padding:0.75rem 1rem;
  border-bottom:1px solid var(--border);
  cursor:pointer;
  transition:background 0.15s;
}
.conv-item:hover { background:#f0f0f0; }
.conv-item.active { background:#e8e8e8; }
.conv-item.unread .conv-item-subject { font-weight:600; }

.conv-item-header { display:flex; justify-content:space-between; align-items:baseline; gap:0.5rem; margin-bottom:0.15rem; }
.conv-item-participants { font-size:0.82rem; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conv-item-date { font-size:0.75rem; color:var(--muted); flex-shrink:0; }
.conv-item-subject { font-size:0.9rem; display:flex; align-items:center; gap:0.35rem; }
.conv-item-preview { font-size:0.78rem; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:0.1rem; }
.conv-badge {
  display:inline-flex; align-items:center; justify-content:center;
  background:#000; color:#fff; border-radius:999px;
  font-size:0.7rem; font-weight:600; min-width:1.1rem; height:1.1rem; padding:0 0.25rem;
}

.msg-content {
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.msg-placeholder {
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
}

.msg-thread-header {
  padding:1rem 1.25rem;
  border-bottom:1px solid var(--border);
  background:#fafafa;
}
.msg-thread-subject { margin:0; font-size:1rem; }
.msg-thread-participants { margin:0.1rem 0 0; font-size:0.82rem; color:var(--muted); }

.msg-thread {
  flex:1;
  overflow-y:auto;
  padding:1rem 1.25rem;
  display:flex;
  flex-direction:column;
  gap:0.75rem;
}

.msg-bubble-wrap { display:flex; }
.msg-bubble-wrap.mine { justify-content:flex-end; }
.msg-bubble-wrap.theirs { justify-content:flex-start; }

.msg-bubble {
  max-width:70%;
  padding:0.6rem 0.85rem;
  border-radius:12px;
  font-size:0.9rem;
  line-height:1.5;
}
.mine .msg-bubble { background:#000; color:#fff; border-bottom-right-radius:3px; }
.theirs .msg-bubble { background:#f0f0f0; color:var(--text); border-bottom-left-radius:3px; }

.msg-bubble-meta { font-size:0.72rem; margin-bottom:0.25rem; opacity:0.6; }

.msg-reply-form {
  padding:0.75rem 1.25rem 1rem;
  border-top:1px solid var(--border);
  background:#fafafa;
}
.msg-reply-form textarea {
  width:100%;
  padding:0.5rem 0.75rem;
  border:1px solid var(--border);
  border-radius:var(--radius);
  font:inherit;
  font-size:0.9rem;
  resize:vertical;
}

/* Modal nouvelle conv */
.msg-modal-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,0.45); z-index:500;
  display:flex; align-items:center; justify-content:center;
}
.msg-modal {
  background:#fff; border-radius:var(--radius); padding:1.75rem;
  width:100%; max-width:480px; margin:1rem;
  box-shadow:0 8px 32px rgba(0,0,0,0.18);
}
.msg-modal h3 { margin:0 0 1.25rem; }

/* Badge nav */
.msg-nav-badge {
  display:inline-flex; align-items:center; justify-content:center;
  background:#ef4444; color:#fff; border-radius:999px;
  font-size:0.65rem; font-weight:700; min-width:1rem; height:1rem;
  padding:0 0.2rem; margin-left:0.3rem; vertical-align:middle;
}

@media (max-width: 640px) {
  .msg-layout { grid-template-columns:1fr; }
  .msg-sidebar { border-right:none; border-bottom:1px solid var(--border); max-height:40vh; }
}

.conv-type-btn.active { background:#000; color:#fff; border-color:#000; }

.conv-unread-dot {
  display:inline-block;
  width:8px; height:8px;
  border-radius:50%;
  background:#ef4444;
  margin-right:0.35rem;
  flex-shrink:0;
  vertical-align:middle;
}
.msg-thread-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}

/* ── Activités ───────────────────────────────────────────────────────────────── */
.activity-card {
  display:flex;
  gap:1rem;
  padding:1rem 0;
  border-bottom:1px solid var(--border);
}
.activity-card:last-child { border-bottom:none; }
.activity-date {
  flex-shrink:0;
  font-size:0.82rem;
  color:var(--muted);
  width:160px;
  padding-top:0.15rem;
  font-style:italic;
}
.activity-body { flex:1; min-width:0; }
.activity-title { margin:0 0 0.2rem; font-size:1rem; font-weight:600; }
.activity-location { font-size:0.82rem; color:var(--muted); margin-bottom:0.3rem; }
.activity-desc { margin:0; font-size:0.9rem; color:var(--gray-dark); }
@media (max-width:600px) {
  .activity-card { flex-direction:column; gap:0.35rem; }
  .activity-date { width:auto; }
}

/* ── Lang toggle ─────────────────────────────────────────────────────────────── */
.lang-toggle {
  background: none;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  opacity: 0.7;
  transition: opacity 0.15s;
  align-self: center;
}
.lang-toggle:hover { opacity: 1; }

/* ── Accessibilité : focus ───────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}

/* ── Skip link ───────────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--black, #1a1a1a);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 9999;
  font-size: 0.9rem;
  border-radius: 0 0 4px 0;
  text-decoration: none;
  transition: top 0.1s;
}
.skip-link:focus {
  top: 0;
}
