/* Repris de _old/public/styles/scss/pages/_home.scss */

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Regular.woff2') format('woff2'),
  url('../fonts/Poppins-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica';
  src: url('../fonts/Helvetica-Bold.woff2') format('woff2'),
  url('../fonts/Helvetica-Bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/*######################################################*/
/*################### THÈME CLAIR / SOMBRE #############*/
/*######################################################*/

/* Le thème est posé sur <html data-theme="..."> par le script en tête de
   base.html.twig (choix enregistré, sinon préférence du système). */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #000000;
  --muted: #6b6b6b;
  --ghost: #999999;
  --border: #e0e0e0;
  --surface: #f2f2f2;
  --danger: #c62828;
  --intro-pattern: url('../images/bg-try.png');
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --fg: #ffffff;
  --muted: #999999;
  --ghost: #999999;
  --border: #333333;
  --surface: #222222;
  --danger: #ff6b6b;
  /* Même motif que bg-try.png (point de 5px dans une tuile 27x23), en sombre */
  --intro-pattern: radial-gradient(circle at 13.5px 11.5px, #1c1c1c 2.5px, transparent 3px);
}

/* Sans JavaScript : on suit simplement la préférence du système */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #000000;
    --fg: #ffffff;
    --muted: #999999;
    --ghost: #999999;
    --border: #333333;
    --surface: #222222;
    --danger: #ff6b6b;
    --intro-pattern: radial-gradient(circle at 13.5px 11.5px, #1c1c1c 2.5px, transparent 3px);
  }
}

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

body {
  overflow-x: hidden;
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--fg);
}

/* Changement de thème : cercle qui s'ouvre depuis le bouton (View Transitions API) */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* Rideau de transition entre les pages */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 30000;
  background: var(--fg);
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
}

.page-transition.is-covering {
  transform: scaleY(1);
}

/* Lien fixe en bas à droite */
.corner-link {
  position: fixed;
  right: 40px;
  bottom: 30px;
  z-index: 100;
  font-family: 'Helvetica', sans-serif;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: -1px;
  color: var(--fg);
  text-decoration: none;
  padding-bottom: 4px;
}

.corner-link:after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s ease-in-out;
}

.corner-link:hover:after,
.corner-link:focus-visible:after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Langue + thème, en haut à droite */
.top-controls {
  position: fixed;
  top: 30px;
  right: 40px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Bouton clair / sombre : soleil qui se transforme en lune */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .3s ease-in-out;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--surface);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
}

.theme-toggle-core,
.theme-toggle-moon,
.theme-toggle-rays {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .5s cubic-bezier(.76, 0, .24, 1), opacity .3s ease-in-out;
}

/* Mode sombre : le soleil grossit, perd ses rayons et une "ombre" le creuse en croissant */
:root[data-theme="dark"] .theme-toggle-core {
  transform: scale(1.7);
}

:root[data-theme="dark"] .theme-toggle-moon {
  transform: translate(-13px, 8px);
}

:root[data-theme="dark"] .theme-toggle-rays {
  transform: rotate(90deg) scale(0);
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle-core,
  .theme-toggle-moon,
  .theme-toggle-rays {
    transition: none;
  }
}

/* Sélecteur de langue : pilule (icône + code) qui ouvre un menu */
.lang-switcher {
  position: relative;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  font-family: 'Helvetica', sans-serif;
  font-weight: bold;
  font-size: 14px;
  letter-spacing: .5px;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .3s ease-in-out;
}

.lang-toggle svg {
  width: 20px;
  height: 20px;
}

.lang-toggle:hover,
.lang-toggle:focus-visible,
.lang-switcher.is-open .lang-toggle {
  background: var(--surface);
}

.lang-toggle:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  padding: 6px;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.97);
  transform-origin: top right;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.lang-switcher.is-open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  /* visibility immédiate à l'ouverture : sinon le menu est encore "hidden" et focus() échoue */
  transition: opacity .2s ease, transform .2s ease, visibility 0s;
}

.lang-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--fg);
  text-decoration: none;
  outline: none;
}

.lang-menu a:hover,
.lang-menu a:focus-visible {
  background: var(--surface);
}

.lang-code {
  width: 22px;
  font-family: 'Helvetica', sans-serif;
  font-weight: bold;
  color: var(--muted);
}

/* Langue courante : code en couleur pleine + point à droite */
.lang-menu a[aria-current] .lang-code {
  color: var(--fg);
}

.lang-menu a[aria-current]:after {
  content: '';
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--fg);
}

@media (prefers-reduced-motion: reduce) {
  .lang-menu {
    transition: none;
  }
}

/* Repris de _old/public/styles/scss/fold/_loader.scss */
.loader {
  background: #000000;
  width: 100%;
  min-height: 100vh;
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20000;
  align-items: center;
  justify-content: center;
}

.loader .loader-logo {
  width: 68px;
  height: 60px;
  background: url('../images/logo2.png') no-repeat;
  background-size: contain;
  opacity: 0;
}

.intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  z-index: 0;
  text-align: left;
  background: var(--intro-pattern) repeat fixed;
  background-size: 27px 23px;
}

.intro h1 {
  position: relative;
  display: block;
}

.intro .first {
  display: block;
  position: relative;
  font-size: 150px;
  font-weight: bold;
  line-height: 120px;
  letter-spacing: -7px;
  font-family: 'Helvetica', sans-serif;
  -webkit-text-stroke: 2px var(--fg);
  -webkit-text-fill-color: var(--fg);
  text-shadow: 2px 2px 7px rgba(0, 0, 0, 0.5);
}

.intro .second {
  display: block;
  position: relative;
  font-size: 240px;
  font-weight: bold;
  line-height: 170px;
  letter-spacing: -10px;
  font-family: 'Helvetica', sans-serif;
  -webkit-text-stroke: 2px var(--fg);
  -webkit-text-fill-color: var(--fg);
  text-shadow: 2px 2px 7px rgba(0, 0, 0, 0.5);
}

/*######################################################*/
/*################### MOBILE SETS #####################*/
/*######################################################*/

@media (max-width: 1200px) {
  .intro .first {
    font-size: 120px;
    line-height: 100px;
    letter-spacing: -2px;
  }

  .intro .second {
    font-size: 140px;
    line-height: 110px;
    letter-spacing: -2px;
  }
}

@media (max-width: 1024px) {
  .intro .first {
    font-size: 70px;
    line-height: 60px;
    letter-spacing: 0;
  }
}

@media (max-width: 768px) {
  .intro .first {
    font-size: 65px;
    line-height: 45px;
    letter-spacing: 0;
    text-shadow: none;
  }

  .intro .second {
    font-size: 100px;
    line-height: 85px;
    letter-spacing: 0;
    text-shadow: none;
  }
}

@media (max-width: 580px) {
  .intro .first {
    font-size: 50px;
    line-height: 30px;
    letter-spacing: 0;
  }

  .intro .second {
    font-size: 70px;
    line-height: 65px;
    letter-spacing: 0;
  }
}

@media (max-width: 420px) {
  .intro .first {
    font-size: 40px;
    line-height: 35px;
    letter-spacing: 0;
  }

  .intro .second {
    font-size: 65px;
    line-height: 50px;
    letter-spacing: 0;
  }
}

/*######################################################*/
/*##################### À PROPOS #######################*/
/*######################################################*/

/* Repris de _old/public/styles/scss/pages/_about.scss */
.about {
  display: flex;
  align-items: center;
  min-height: 100vh;
  background: var(--bg);
  padding: 10rem 0;
  overflow: hidden;
}

.about-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

.about .title {
  text-align: right;
}

.about h1 {
  display: inline-block;
  font-size: 110px;
  font-weight: bold;
  line-height: 60px;
  letter-spacing: -5px;
  font-family: 'Helvetica', sans-serif;
  -webkit-text-stroke: 2px var(--fg);
  -webkit-text-fill-color: var(--fg);
  position: relative;
  z-index: 1;
}

.about h1:before {
  /* Texte fantôme traduit : data-ghost sur le h1 */
  content: attr(data-ghost);
  white-space: nowrap;
  -webkit-text-stroke: 2px var(--ghost);
  -webkit-text-fill-color: var(--ghost);
  opacity: 30%;
  right: 60px;
  top: -60px;
  position: absolute;
  z-index: -1;
}

.about h1:after {
  content: '';
  position: absolute;
  width: 100px;
  height: 10px;
  background: var(--fg);
  bottom: -18px;
  left: 0;
}

.about-body {
  margin-top: 1.5rem;
  margin-left: auto;
  width: 66.666%;
}

.about .text {
  margin-top: 3rem;
  color: var(--fg);
  line-height: 30px;
  letter-spacing: 1px;
  text-align: right;
}

/* Texte long : il s'efface en fondu sous les contrôles fixes (haut) et le lien du coin (bas) */
.page-about:before,
.page-about:after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  z-index: 50;
  height: 110px;
  pointer-events: none;
}

.page-about:before {
  top: 0;
  background: linear-gradient(to top, transparent, var(--bg) 55%);
}

.page-about:after {
  bottom: 0;
  background: linear-gradient(to bottom, transparent, var(--bg) 55%);
}

.about .text p + p {
  margin-top: 1.25rem;
}

.about .network-profile {
  margin: 1.5rem 0;
  text-align: right;
}

.about .network-profile div {
  display: inline-block;
  margin-left: 8px;
}

.about .network-profile a {
  display: inline-block;
  width: 2em;
  height: 2em;
  font-size: 16px;
  color: var(--fg);
  transition: all .5s ease-in-out;
}

.about .network-profile svg {
  width: 100%;
  height: 100%;
  transition: transform .5s ease-in-out;
}

.about .network-profile a:hover {
  color: var(--muted);
}

.about .network-profile a:hover svg {
  transform: scale(1.1);
}

@media (max-width: 990px) {
  .about {
    padding: 8rem 0;
  }

  .about h1 {
    display: inline-block;
    font-size: 50px;
    line-height: 35px;
    letter-spacing: -2px;
  }

  .about h1:before {
    opacity: 40%;
    right: 50px;
    top: -30px;
  }

  .about h1:after {
    height: 8px;
    bottom: -5px;
  }

  .about-body {
    width: 100%;
  }
}

@media (max-width: 580px) {
  .corner-link {
    right: 20px;
    bottom: 20px;
    font-size: 18px;
  }

  .top-controls {
    top: 16px;
    right: 12px;
  }
}

/*######################################################*/
/*################### ESPACE PRIVÉ #####################*/
/*######################################################*/

/* Connexion */
.login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 16px;
}

.login-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 380px;
}

.login-form h1,
.dashboard h1 {
  font-family: 'Helvetica', sans-serif;
  font-weight: bold;
  font-size: 60px;
  line-height: 1;
  letter-spacing: -3px;
  margin-bottom: 2rem;
}

.login-form label {
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1rem;
}

.login-form input {
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--fg);
  border-radius: 0;
  padding: 8px 0;
  outline: none;
}

.login-form input:focus {
  border-bottom-color: var(--muted);
}

.login-form button {
  margin-top: 2rem;
  padding: 14px;
  font-family: 'Helvetica', sans-serif;
  font-weight: bold;
  font-size: 18px;
  color: var(--bg);
  background: var(--fg);
  border: 2px solid var(--fg);
  cursor: pointer;
  transition: all .3s ease-in-out;
}

.login-form button:hover,
.login-form button:focus-visible {
  color: var(--fg);
  background: transparent;
}

.form-error {
  padding: 12px;
  margin-bottom: 1rem;
  border-left: 4px solid var(--fg);
  background: var(--surface);
  font-size: 14px;
}

/* Dashboard : sidebar fixe à gauche + contenu */
.dashboard-layout {
  min-height: 100vh;
}

.dashboard-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  width: 260px;
  padding: 28px 16px 20px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.dashboard-sidebar-head {
  position: relative;
  padding: 0 12px 28px;
}

.dashboard-brand {
  font-family: 'Helvetica', sans-serif;
  font-weight: bold;
  font-size: 22px;
  letter-spacing: -1px;
  color: var(--fg);
  text-decoration: none;
}

.dashboard-brand-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.dashboard-sidebar .dashboard-sidebar-close {
  display: none;
}

.dashboard-nav {
  flex: 1;
}

.dashboard-nav-title {
  margin: 20px 12px 8px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.dashboard-nav ul {
  list-style: none;
}

.dashboard-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 2px;
  font-size: 14px;
  color: var(--fg);
  text-decoration: none;
  border-radius: 10px;
  transition: background-color .2s ease;
}

.dashboard-nav-link:hover,
.dashboard-nav-link:focus-visible {
  background: var(--surface);
}

.dashboard-nav-link[aria-current="page"] {
  color: var(--bg);
  background: var(--fg);
}

.icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.dashboard-sidebar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 12px 0;
  border-top: 1px solid var(--border);
}

.dashboard-user {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 13px;
}

.dashboard-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.dashboard-sidebar-actions {
  display: flex;
  align-items: center;
}

.dashboard-icon-button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .2s ease;
}

.dashboard-icon-button:hover,
.dashboard-icon-button:focus-visible {
  background: var(--surface);
}

.dashboard-icon-button .icon {
  width: 20px;
  height: 20px;
}

.dashboard-topbar,
.dashboard-overlay {
  display: none;
}

.dashboard {
  max-width: 1100px;
  margin-left: 260px;
  padding: 4rem 48px;
}

.dashboard-subtitle {
  margin: -1rem 0 2rem;
  color: var(--muted);
}

.dashboard-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 14px;
}

.dashboard-flash {
  margin-bottom: 1.5rem;
  padding: 12px 16px;
  font-size: 14px;
  background: var(--surface);
  border-left: 4px solid var(--fg);
}

.dashboard-flash.is-error {
  border-left-color: var(--danger);
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.dashboard-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 24px;
  color: var(--fg);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.dashboard-card.is-link {
  transition: border-color .2s ease, transform .2s ease;
}

.dashboard-card.is-link:hover,
.dashboard-card.is-link:focus-visible {
  border-color: var(--fg);
  transform: translateY(-2px);
}

.dashboard-card-label {
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.dashboard-card-value {
  font-family: 'Helvetica', sans-serif;
  font-size: 40px;
  line-height: 1;
}

.dashboard-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  white-space: nowrap;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.dashboard-badge.is-warning {
  color: var(--danger);
  border-color: var(--danger);
}

.dashboard-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font: inherit;
  font-size: 14px;
  color: var(--fg);
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}

.dashboard-button:hover,
.dashboard-button:focus-visible {
  border-color: var(--fg);
}

.dashboard-button.is-danger:hover,
.dashboard-button.is-danger:focus-visible {
  color: var(--danger);
  border-color: var(--danger);
}

/* Liste des messages */
.messages-list {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.message-item + .message-item {
  border-top: 1px solid var(--border);
}

.message-summary {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 18px 20px;
  list-style: none;
  cursor: pointer;
  transition: background-color .2s ease;
}

.message-summary::-webkit-details-marker {
  display: none;
}

.message-summary:hover,
.message-item[open] .message-summary {
  background: var(--surface);
}

.message-from {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 14px;
}

.message-from span,
.message-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.message-preview {
  font-size: 14px;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.message-body {
  padding: 8px 20px 24px;
  background: var(--surface);
}

.message-text {
  max-width: 720px;
  margin-bottom: 20px;
  line-height: 1.7;
}

.message-details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-bottom: 20px;
  font-size: 13px;
}

.message-details dt {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.message-details a {
  color: var(--fg);
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
}

/* Mobile : sidebar en tiroir */
@media (max-width: 900px) {
  .dashboard-topbar {
    position: sticky;
    top: 0;
    z-index: 150;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }

  .dashboard-sidebar {
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.76, 0, .24, 1);
  }

  .dashboard-sidebar.is-open {
    transform: none;
  }

  .dashboard-sidebar .dashboard-sidebar-close {
    display: grid;
    position: absolute;
    top: -8px;
    right: 0;
  }

  .dashboard-overlay:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 190;
    background: rgba(0, 0, 0, .4);
  }

  .dashboard {
    margin-left: 0;
    padding: 2rem 16px;
  }

  .message-summary {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 580px) {
  .login-form h1,
  .dashboard h1 {
    font-size: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-sidebar {
    transition: none;
  }
}

/*######################################################*/
/*##################### CONTACT ########################*/
/*######################################################*/

/* Badge reCAPTCHA masqué (il couvrirait le lien du coin) : la mention légale est sous le formulaire */
.grecaptcha-badge {
  visibility: hidden !important;
}

html:has(.contact-dialog[open]) {
  overflow: hidden;
}

/* Fenêtre plein écran, ouverte en cercle par public/js/contact.js */
.contact-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  color: var(--fg);
}

.contact-dialog[open] {
  display: flex;
}

.contact-dialog::backdrop {
  background: transparent;
}

.contact-close {
  position: fixed;
  top: 30px;
  right: 40px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .3s ease-in-out, transform .3s ease-in-out;
}

.contact-close svg {
  width: 24px;
  height: 24px;
}

.contact-close:hover,
.contact-close:focus-visible {
  background: var(--surface);
  transform: rotate(90deg);
}

.contact-close:focus-visible,
.contact-submit:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.contact-container {
  width: 100%;
  max-width: 760px;
  margin: auto;
  padding: 120px 16px 80px;
}

.contact-view[hidden] {
  display: none;
}

/* Titre façon "Qui suis-je ?" : gros Helvetica + texte fantôme derrière */
.contact-title {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-bottom: 1.5rem;
  font-family: 'Helvetica', sans-serif;
  font-weight: bold;
  font-size: 90px;
  line-height: 1;
  letter-spacing: -4px;
}

.contact-title[data-ghost]:before {
  content: attr(data-ghost);
  position: absolute;
  left: 50px;
  top: -45px;
  z-index: -1;
  white-space: nowrap;
  color: var(--ghost);
  opacity: .3;
}

.contact-intro {
  max-width: 560px;
  margin-bottom: 3rem;
  line-height: 1.7;
  color: var(--muted);
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
}

/* Champ : label flottant + trait qui se dessine au focus */
.field {
  position: relative;
  padding-top: 22px;
  margin-bottom: 28px;
}

.field-input {
  width: 100%;
  padding: 10px 0;
  font: inherit;
  font-size: 18px;
  color: var(--fg);
  background: linear-gradient(var(--fg), var(--fg)) no-repeat left bottom / 0 2px;
  border: 0;
  border-bottom: 2px solid var(--border);
  border-radius: 0;
  outline: none;
  transition: background-size .4s cubic-bezier(.76, 0, .24, 1), border-color .3s ease;
}

.field-input:focus {
  background-size: 100% 2px;
}

.field-textarea {
  display: block;
  min-height: 140px;
  line-height: 1.6;
  resize: vertical;
}

.field-label {
  position: absolute;
  left: 0;
  top: 34px;
  font-size: 18px;
  color: var(--muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .25s ease, color .25s ease;
}

.field-input:focus + .field-label,
.field-input:not(:placeholder-shown) + .field-label {
  transform: translateY(-30px) scale(.75);
  color: var(--fg);
}

.field-error {
  margin-top: 6px;
  font-size: 13px;
  color: var(--danger);
}

.field-error:empty {
  display: none;
}

.field.has-error .field-input {
  border-bottom-color: var(--danger);
}

/* Pot de miel */
.field-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 12px;
}

.contact-legal {
  max-width: 380px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.contact-legal a {
  color: inherit;
}

/* Bouton pilule avec flèche */
.contact-submit {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  margin-left: auto;
  padding: 0 28px;
  font-family: 'Helvetica', sans-serif;
  font-weight: bold;
  font-size: 18px;
  color: var(--bg);
  background: var(--fg);
  border: 2px solid var(--fg);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .3s ease, color .3s ease;
}

.contact-submit svg {
  width: 20px;
  height: 20px;
  transition: transform .3s ease;
}

.contact-submit:hover,
.contact-submit:focus-visible {
  color: var(--fg);
  background: transparent;
}

.contact-submit:hover svg {
  transform: translateX(4px);
}

.contact-submit:disabled {
  cursor: progress;
  opacity: .7;
}

.contact-submit.is-loading svg {
  animation: contact-nudge 1s ease-in-out infinite;
}

@keyframes contact-nudge {
  50% {
    transform: translateX(6px);
  }
}

.contact-status {
  margin-bottom: 1.5rem;
  padding: 12px 16px;
  font-size: 14px;
  background: var(--surface);
  border-left: 4px solid var(--danger);
}

.contact-status[hidden] {
  display: none;
}

/* Succès : coche qui se dessine */
.contact-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-success .contact-submit {
  margin-left: 0;
}

.contact-check {
  width: 96px;
  height: 96px;
  margin-bottom: 2rem;
}

.contact-check circle {
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
}

.contact-check path {
  stroke-dasharray: 32;
  stroke-dashoffset: 32;
}

.contact-success.is-animated .contact-check circle {
  animation: contact-draw .6s ease forwards;
}

.contact-success.is-animated .contact-check path {
  animation: contact-draw .4s .5s ease forwards;
}

@keyframes contact-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-check circle,
  .contact-check path {
    stroke-dashoffset: 0;
    animation: none !important;
  }

  .field-input,
  .field-label,
  .contact-close,
  .contact-submit,
  .contact-submit svg {
    transition: none;
  }
}

@media (max-width: 700px) {
  .contact-container {
    padding: 90px 16px 60px;
  }

  .contact-row {
    grid-template-columns: 1fr;
  }

  .contact-title {
    font-size: 50px;
    letter-spacing: -2px;
  }

  .contact-title[data-ghost]:before {
    left: 30px;
    top: -25px;
  }

  .contact-close {
    top: 16px;
    right: 12px;
  }

  .contact-submit {
    width: 100%;
    justify-content: center;
  }
}
