/* Variables principales : modifier ici les couleurs, tailles et animations globales. */
:root {
  --primary-color: #1f6f5b;
  --secondary-color: #f47a12;
  --background-color: #101820;
  --background-alt-color: #264d43;
  --surface-color: rgba(255, 255, 255, 0.11);
  --surface-strong-color: rgba(255, 255, 255, 0.18);
  --text-color: #ffffff;
  --muted-text-color: #d7c9b5;
  --button-text-color: #17231f;
  --button-light-color: #f8f4ec;
  --button-radius: 14px;
  --button-height: 54px;
  --button-animation-duration: 220ms;
  --button-hover-translate: -3px;
  --content-max-width: 560px;
  --font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.26);
  --shadow-strong: 0 28px 70px rgba(0, 0, 0, 0.34);
}

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

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text-color);
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--secondary-color) 30%, transparent), transparent 31%),
    radial-gradient(circle at 14% 100%, color-mix(in srgb, var(--primary-color) 58%, transparent), transparent 38%),
    linear-gradient(155deg, var(--background-color), color-mix(in srgb, var(--background-alt-color) 86%, #000 14%));
  font-family: var(--font-family);
}

body[data-background-mode="solid"] {
  background: var(--background-color);
}

body[data-background-mode="gradient"][data-background-direction="reverse"] {
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--secondary-color) 30%, transparent), transparent 31%),
    radial-gradient(circle at 86% 100%, color-mix(in srgb, var(--background-color) 58%, transparent), transparent 38%),
    linear-gradient(155deg, var(--background-alt-color), color-mix(in srgb, var(--background-color) 86%, #000 14%));
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 14px;
}

.profile-card {
  width: min(100%, var(--content-max-width));
  margin: 0 auto;
  text-align: center;
  animation: card-enter 520ms ease both;
}

.profile-card--error {
  padding: 28px;
  border: 1px solid var(--surface-strong-color);
  border-radius: 22px;
  background: var(--surface-color);
}

.loading-message {
  margin: 0;
  color: var(--muted-text-color);
}

.profile-header {
  margin-bottom: 18px;
}

.profile-image,
.profile-placeholder {
  width: 112px;
  height: 112px;
  margin: 0 auto 14px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: var(--shadow-soft);
  object-fit: cover;
}

.profile-media--small {
  width: 82px;
  height: 82px;
}

.profile-media--medium {
  width: 112px;
  height: 112px;
}

.profile-media--large {
  width: 148px;
  height: 148px;
}

.profile-image--round,
.profile-placeholder--round {
  border-radius: 999px;
}

.profile-image--rounded,
.profile-placeholder--rounded {
  border-radius: 24px;
}

.profile-image--square,
.profile-placeholder--square {
  border-radius: 6px;
}

.profile-placeholder {
  display: grid;
  place-items: center;
  background: var(--secondary-color);
  color: #ffffff;
  font-size: 40px;
  font-weight: 800;
}

.profile-title {
  margin: 0;
  color: var(--text-color);
  font-size: clamp(2rem, 9vw, 2.45rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.profile-role {
  margin: 8px 0 0;
  color: var(--muted-text-color);
  font-size: 1rem;
  line-height: 1.4;
}

.profile-description {
  max-width: 34rem;
  margin: 8px auto 0;
  color: var(--muted-text-color);
  font-size: 0.96rem;
  line-height: 1.45;
}

.profile-address {
  max-width: 28rem;
  margin: 9px auto 0;
  color: var(--text-color);
  font-size: 0.88rem;
  line-height: 1.35;
  opacity: 0.88;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 13px 0 0;
  padding: 5px 13px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  font-size: 0.83rem;
}

.profile-actions,
.profile-links {
  display: grid;
  gap: 10px;
}

.profile-actions {
  margin: 0 0 12px;
}

.profile-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-button {
  min-height: var(--button-height);
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--button-radius);
  background: var(--button-light-color);
  color: var(--button-text-color);
  text-align: left;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  transition:
    background-color var(--button-animation-duration) ease,
    border-color var(--button-animation-duration) ease,
    color var(--button-animation-duration) ease,
    transform var(--button-animation-duration) ease,
    box-shadow var(--button-animation-duration) ease;
}

.card-button:hover,
.card-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--secondary-color) 72%, white);
  outline-offset: 3px;
}

.card-button__text,
.card-button__label,
.card-button__description {
  display: block;
}

.card-button__label {
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.2;
}

.card-button__description {
  margin-top: 3px;
  opacity: 0.72;
  font-size: 0.84rem;
  line-height: 1.35;
}

.card-button__icon {
  display: grid;
  place-items: center;
}

.card-button__icon svg,
.social-link svg {
  width: 21px;
  height: 21px;
}

.card-button--primary,
.card-button.is-featured {
  background: var(--secondary-color);
  color: #ffffff;
}

.card-button--secondary {
  background: var(--primary-color);
  color: #ffffff;
}

.card-button--outline {
  background: transparent;
  color: var(--text-color);
  border-color: rgba(255, 255, 255, 0.34);
}

.card-button--light {
  background: var(--button-light-color);
  color: var(--button-text-color);
}

.card-button--dark {
  background: #15191d;
  color: #ffffff;
}

.card-button--lift:hover,
.card-button--lift:focus-visible {
  transform: translateY(var(--button-hover-translate));
  box-shadow: var(--shadow-strong);
}

.card-button--pulse:hover .card-button__icon,
.card-button--pulse:focus-visible .card-button__icon {
  animation: icon-pulse 650ms ease both;
}

.card-button--glow:hover,
.card-button--glow:focus-visible {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--secondary-color) 62%, transparent), 0 0 34px color-mix(in srgb, var(--secondary-color) 42%, transparent);
}

.card-button--scale:hover,
.card-button--scale:focus-visible {
  transform: scale(1.018);
}

.card-button--slide:hover .card-button__icon,
.card-button--slide:focus-visible .card-button__icon {
  transform: translateX(4px);
}

.card-button:active {
  transform: translateY(1px) scale(0.99);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin: 15px 0;
}

.social-link {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-decoration: none;
  transition: transform var(--button-animation-duration) ease, background-color var(--button-animation-duration) ease;
}

.social-link:hover,
.social-link:focus-visible {
  background: rgba(255, 255, 255, 0.19);
  outline: 3px solid var(--secondary-color);
  outline-offset: 3px;
  transform: translateY(-2px);
}

.socials--round .social-link {
  border-radius: 999px;
}

.socials--rounded .social-link {
  border-radius: 12px;
}

.socials--square .social-link {
  border-radius: 4px;
}

.profile-footer {
  margin-top: 18px;
  color: color-mix(in srgb, var(--muted-text-color) 82%, transparent);
  font-size: 0.78rem;
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  max-width: min(320px, calc(100vw - 28px));
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  color: #121416;
  box-shadow: var(--shadow-soft);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

@keyframes card-enter {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes icon-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.18);
  }
}

/* AJOUTER ICI LES FUTURES ANIMATIONS */

@media (max-width: 520px) {
  .site-shell {
    align-items: start;
    padding-top: 22px;
  }

  .card-button {
    min-height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
