/* Styles globaux partagés par toutes les pages */

:root {
  --bg: #0e0e0c;
  --surface: #171714;
  --fg: #f3efe7;
  --muted: rgba(243, 239, 231, 0.68);
  --line: rgba(243, 239, 231, 0.14);
  --accent: #d9b27c;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --pad: clamp(1.25rem, 5vw, 4rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Notifications Django */
.notif {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem var(--pad);
    display: flex;
    justify-content: flex-end;
    z-index: 1000;
    pointer-events: none;
}

.notif__list {
    width: min(30rem, 100%);
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notif__item {
    position: relative;
    width: 100%;
    padding: 1rem 3.25rem 1rem 1.25rem;

    background: rgba(23, 23, 20, 0.96);
    color: var(--fg);

    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 6px;

    font-family: var(--font-sans);
    font-size: 0.9rem;
    text-align: left;

    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);

    pointer-events: auto;
}

/* Bouton de fermeture */
.notif__close {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);

    width: 2rem;
    height: 2rem;

    display: grid;
    place-items: center;

    border: none;
    border-radius: 50%;
    background: transparent;

    color: var(--muted);
    font-family: var(--font-sans);
    font-size: 1.5rem;
    line-height: 1;

    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.notif__close:hover {
    color: var(--fg);
    background: rgba(243, 239, 231, 0.1);
}

.notif__close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Types de notifications */
.notif__item--success {
    border-left-color: #8aaa8a;
}

.notif__item--error {
    border-left-color: #c87972;
}

.notif__item--warning {
    border-left-color: var(--accent);
}

.notif__item--info {
    border-left-color: #8daabd;
}

/* Adaptation mobile */
@media (max-width: 760px) {
    .notif {
        padding: 0.75rem;
    }

    .notif__list {
        width: 100%;
    }
}

img {
  display: block;
  max-width: 100%;
}

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

ul,
ol {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
}

.skip-link:focus {
  top: 1rem;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  letter-spacing: 0.02em;
}

.logo em {
  color: var(--accent);
}

/* Header */
.header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--pad);
}

.nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--fg);
}

.nav .nav__cta {
  color: var(--bg);
  background: var(--accent);
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
}

.nav .nav__cta:hover {
  color: var(--bg);
  background: var(--fg);
}

.menu-toggle,
.menu-button {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.9rem 1.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
}

.btn--primary:hover {
  background: var(--fg);
}

.btn--ghost {
  border: 1px solid var(--line);
  color: var(--fg);
}

.btn--ghost:hover {
  border-color: var(--fg);
}

/* Sections */
.section {
  padding: clamp(4rem, 10vw, 8rem) var(--pad);
  border-top: 1px solid var(--line);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.section__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.05;
  text-wrap: balance;
}

.link {
  display: inline-flex;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.link:hover {
  border-color: var(--accent);
}

/* Active nav */
.nav a[aria-current="page"],
.footer nav a[aria-current="page"] {
  color: var(--fg);
}

/* Titres et chapôs d'introduction partagés (À propos, Contact) */
.intro__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.intro__title em {
  color: var(--accent);
}

.intro__lead {
  margin-top: 1.75rem;
  max-width: 40rem;
  font-size: 1.2rem;
  color: color-mix(in srgb, var(--muted), white 70%);
  text-wrap: pretty;
}

@media (max-width: 760px) {
  .intro__lead {
    font-size: 1.05rem;
  }
}

/* Champs de formulaire partagés */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 50%, calc(100% - 0.9rem) 50%;
  background-size: 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

.field textarea {
  resize: vertical;
  min-height: 9rem;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(243, 239, 231, 0.3);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field--check {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
}

.field--check input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.field--check label {
  font-size: 0.875rem;
  letter-spacing: 0;
  text-transform: none;
}

/* Footer */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2.5rem var(--pad);
  border-top: 1px solid var(--line);
}

.footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer nav a,
.footer__copy {
  font-size: 0.85rem;
  color: var(--muted);
}

.footer nav a:hover,
.footer__copy a:hover {
  color: var(--fg);
}

.footer__copy a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 760px) {
  .menu-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 2.75rem;
    height: 2.75rem;
    cursor: pointer;
    position: relative;
    z-index: 30;
  }

  .menu-button span {
    display: block;
    width: 1.5rem;
    height: 1px;
    margin: 0 auto;
    background: var(--fg);
    transition: transform 0.3s ease;
  }

  .menu-toggle:checked + .menu-button span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .menu-toggle:checked + .menu-button span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .menu-toggle:focus-visible + .menu-button {
    outline: 2px solid var(--accent);
  }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .menu-toggle:checked ~ .nav {
    opacity: 1;
    visibility: visible;
  }

  .nav ul {
    flex-direction: column;
    gap: 1.75rem;
  }

  .nav a {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--fg);
  }

  .nav .nav__cta {
    font-family: var(--font-sans);
    font-size: 1rem;
  }
}

/* États vides et erreurs */
.empty-state {
  padding: 3rem 0;
  color: var(--muted);
  text-align: center;
}

.errorlist {
  padding: 0;
  color: #c87972;
  font-size: 0.85rem;
  list-style: none;
}

.errorlist.nonfield {
  margin-bottom: 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
