/* === Police Marianne (État français) === */
@font-face {
    font-family: 'Marianne';
    src: url('https://cdn.jsdelivr.net/npm/@gouvfr/dsfr@1.12.1/dist/fonts/Marianne-Light.woff2') format('woff2');
    font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Marianne';
    src: url('https://cdn.jsdelivr.net/npm/@gouvfr/dsfr@1.12.1/dist/fonts/Marianne-Regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Marianne';
    src: url('https://cdn.jsdelivr.net/npm/@gouvfr/dsfr@1.12.1/dist/fonts/Marianne-Medium.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Marianne';
    src: url('https://cdn.jsdelivr.net/npm/@gouvfr/dsfr@1.12.1/dist/fonts/Marianne-Bold.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}

/* === Override Bootstrap 5 CSS variables === */
:root {
    --bs-font-sans-serif: 'Marianne', system-ui, -apple-system, sans-serif;

    --bs-primary: #000091;
    --bs-primary-rgb: 0, 0, 145;
    --bs-link-color: #000091;
    --bs-link-color-rgb: 0, 0, 145;
    --bs-link-hover-color: #1212ff;

    --bs-danger: #C9191E;
    --bs-danger-rgb: 201, 25, 30;

    --bs-body-bg: #F5F5F5;

    --bs-border-radius: 0.3rem;
    --bs-border-radius-lg: 0.4rem;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

body > .container {
  flex: 1;
}

.footer {
  width: auto;
  line-height: 1.4;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* === Carte Leaflet responsive === */
#map {
  height: 220px;
  border-radius: 6px;
}

@media (min-width: 576px) {
  #map {
    height: 320px;
  }
}

/* === Dark mode overrides === */
[data-bs-theme="dark"] {
    --bs-body-bg: #1a1a2e;
    --bs-primary: #5b5bd6;
    --bs-primary-rgb: 91, 91, 214;
    --bs-link-color: #8b8bf5;
    --bs-link-color-rgb: 139, 139, 245;
    --bs-link-hover-color: #a5a5ff;
}

/* === Cartes pastel thème-adaptatives === */
.pastel-blue    { background: #eff6ff; border-color: #bfdbfe; }
.pastel-orange  { background: #fff7ed; border-color: #fed7aa; }
.pastel-green   { background: #f0fdf4; border-color: #bbf7d0; }
.pastel-yellow  { background: #fef9c3; border-color: #fde68a; }
.pastel-purple  { background: #fdf4ff; border-color: #e9d5ff; }
.pastel-neutral { background: #f8fafc; border-color: #e2e8f0; }
.pastel-gray    { background: #f8f9fa; border-color: #dee2e6; }

.accent-blue   { color: #1d4ed8; }
.accent-orange { color: #c2410c; }
.accent-green  { color: #15803d; }
.accent-yellow { color: #a16207; }
.accent-purple { color: #7e22ce; }
.accent-brown  { color: #92400e; }
.accent-gray   { color: #495057; }

[data-bs-theme="dark"] .pastel-blue    { background: #1e293b; border-color: #334155; }
[data-bs-theme="dark"] .pastel-orange  { background: #2d1f0e; border-color: #4a3520; }
[data-bs-theme="dark"] .pastel-green   { background: #0f2418; border-color: #1a3a28; }
[data-bs-theme="dark"] .pastel-yellow  { background: #2d2506; border-color: #4a3d10; }
[data-bs-theme="dark"] .pastel-purple  { background: #1f0f2e; border-color: #3a1f55; }
[data-bs-theme="dark"] .pastel-neutral { background: #1e2330; border-color: #2d3548; }
[data-bs-theme="dark"] .pastel-gray    { background: #1e2330; border-color: #2d3548; }

[data-bs-theme="dark"] .accent-blue   { color: #7cacf8; }
[data-bs-theme="dark"] .accent-orange { color: #f0a070; }
[data-bs-theme="dark"] .accent-green  { color: #6bcb8b; }
[data-bs-theme="dark"] .accent-yellow { color: #e0c060; }
[data-bs-theme="dark"] .accent-purple { color: #c084fc; }
[data-bs-theme="dark"] .accent-brown  { color: #e0a050; }
[data-bs-theme="dark"] .accent-gray   { color: #9ca3af; }

/* === Chevron collapsible === */
.collapsed .chevron-icon {
    transform: rotate(-90deg);
}