/* =============================================================================
   Dyrolia Portal — feuille de style autonome (sans build)
   Reprend les tokens du design system Dyrolia (« Sunset Coral » + « Lagoon »).
   Identité ombrelle : neutre slate, dégradé corail → teal pour symboliser
   l'union des verticales (Home + Cars).
   ============================================================================= */

:root {
  /* Échelles brutes */
  --coral-400: #fb7185;
  --coral-500: #f43f5e;
  --coral-600: #e11d48;
  --coral-700: #be123c;

  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;

  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #0b1220;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --content-max: 80rem;
  --header-height: 4rem;

  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --shadow-md: 0 6px 16px rgb(15 23 42 / 8%);
  --shadow-lg: 0 18px 40px rgb(15 23 42 / 14%);

  /* Rôles sémantiques — thème clair */
  --color-bg: var(--slate-50);
  --color-surface: #ffffff;
  --color-surface-sunken: var(--slate-100);
  --color-border: var(--slate-200);
  --color-border-strong: var(--slate-300);
  --color-text-primary: var(--slate-900);
  --color-text-secondary: var(--slate-600);
  --color-text-muted: var(--slate-500);

  /* Marque ombrelle : un slate profond neutre, distinct des deux verticales */
  --color-brand: var(--slate-900);
  --color-brand-contrast: #ffffff;
  --color-brand-gradient: linear-gradient(135deg, var(--coral-600), var(--teal-600));
  --color-focus-ring: var(--coral-500);

  /* Accents par verticale */
  --accent-coral: var(--coral-600);
  --accent-coral-soft: #fff1f2;
  --accent-teal: var(--teal-600);
  --accent-teal-soft: #f0fdfa;
}

:root[data-theme='dark'] {
  --color-bg: var(--slate-950);
  --color-surface: var(--slate-900);
  --color-surface-sunken: var(--slate-950);
  --color-border: var(--slate-800);
  --color-border-strong: var(--slate-700);
  --color-text-primary: var(--slate-100);
  --color-text-secondary: var(--slate-300);
  --color-text-muted: var(--slate-400);

  --color-brand: #ffffff;
  --color-brand-contrast: var(--slate-900);
  --color-brand-gradient: linear-gradient(135deg, #fb8a72, #2dd4bf);

  --shadow-md: 0 6px 16px rgb(0 0 0 / 40%);
  --shadow-lg: 0 18px 40px rgb(0 0 0 / 50%);

  --accent-coral: #fb8a72;
  --accent-coral-soft: rgb(251 138 114 / 14%);
  --accent-teal: var(--teal-400);
  --accent-teal-soft: rgb(45 212 191 / 12%);
}

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

html {
  color-scheme: light;
}

:root[data-theme='dark'] {
  color-scheme: dark;
}

html,
body {
  margin: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

a {
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-surface);
  color: var(--color-text-primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
}

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

:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- Header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--color-bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: inline-flex;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.brand-name {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.nav-link:hover {
  background: var(--color-surface-sunken);
  color: var(--color-text-primary);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-left: 0.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text-primary);
  cursor: pointer;
  font-size: 1.1rem;
  transition:
    transform 0.1s ease,
    border-color 0.15s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--color-border-strong);
}

.theme-icon--moon {
  display: none;
}

:root[data-theme='dark'] .theme-icon--sun {
  display: none;
}

:root[data-theme='dark'] .theme-icon--moon {
  display: inline;
}

.lang-toggle {
  display: inline-grid;
  place-items: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.6rem;
  margin-left: 0.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text-primary);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  transition:
    transform 0.1s ease,
    border-color 0.15s ease;
}

.lang-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--color-border-strong);
}

/* Conteneurs peuplés en JS : leurs enfants participent au layout du parent. */
.nav-verticals,
.footer-col-links {
  display: contents;
}

/* Anti-FOUC i18n : masque le rendu tant que la langue n'est pas appliquée. */
html.i18n-pending body {
  visibility: hidden;
}

/* Réserve la hauteur des grilles rendues en JS (évite le saut de mise en page). */
.vertical-grid,
.feature-grid {
  min-height: 12rem;
}

/* ------------------------------------------------------------------ Hero --- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4rem;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 46rem;
}

.eyebrow {
  margin: 0 0 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.hero-title {
  margin: 0 0 1.25rem;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: var(--color-brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 0 auto 2rem;
  max-width: 38rem;
  font-size: 1.15rem;
  color: var(--color-text-secondary);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.hero-glow {
  position: absolute;
  inset: -30% 0 auto;
  height: 60vh;
  background:
    radial-gradient(40% 60% at 30% 30%, rgb(225 29 72 / 18%), transparent 70%),
    radial-gradient(40% 60% at 70% 40%, rgb(13 148 136 / 18%), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

/* --------------------------------------------------------------- Buttons --- */

.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.1s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--color-brand);
  color: var(--color-brand-contrast);
}

.btn-primary:hover {
  box-shadow: var(--shadow-lg);
}

.btn-ghost {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-color: var(--color-border);
}

.btn-ghost:hover {
  background: var(--color-surface-sunken);
}

.btn-host {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.85;
}

/* -------------------------------------------------------------- Sections --- */

.section-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
}

.section-lead {
  margin: 0 0 2.5rem;
  text-align: center;
  color: var(--color-text-secondary);
}

.verticals {
  padding: 4rem 0;
}

.vertical-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.5rem;
}

.vertical-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.vertical-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.vertical-card[data-accent='coral'] {
  --card-accent: var(--accent-coral);
  --card-accent-soft: var(--accent-coral-soft);
}

.vertical-card[data-accent='teal'] {
  --card-accent: var(--accent-teal);
  --card-accent-soft: var(--accent-teal-soft);
}

.vertical-card[data-accent='neutral'] {
  --card-accent: var(--color-text-muted);
  --card-accent-soft: var(--color-surface-sunken);
}

.vertical-card:hover {
  border-color: color-mix(in srgb, var(--card-accent) 45%, var(--color-border));
}

.vertical-icon {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  background: var(--card-accent-soft);
  color: var(--card-accent);
}

.vertical-name {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.vertical-desc {
  margin: 0;
  flex: 1;
  color: var(--color-text-secondary);
}

.btn-accent {
  align-self: stretch;
  margin-top: 0.5rem;
  background: var(--card-accent);
  color: #ffffff;
}

.btn-accent:hover {
  box-shadow: 0 12px 28px color-mix(in srgb, var(--card-accent) 35%, transparent);
}

.vertical-card--soon {
  border-style: dashed;
  box-shadow: none;
  background: transparent;
}

.vertical-card--soon:hover {
  transform: none;
  box-shadow: none;
}

.badge-soon {
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ------------------------------------------------------------- Features --- */

.features {
  padding: 4rem 0 5rem;
  background: var(--color-surface-sunken);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1.5rem;
}

.feature {
  text-align: center;
  padding: 1.5rem;
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 1.4rem;
}

.feature h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

.feature p {
  margin: 0;
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------- Footer --- */

.site-footer {
  padding: 3rem 0 1.5rem;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
}

.footer-brand {
  max-width: 18rem;
}

.footer-tagline {
  margin: 0.5rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col-title {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.footer-col a {
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--color-text-primary);
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

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

/* ---------------------------------------------------------- Legal pages ---- */
.legal {
  padding: 3.5rem 0 4.5rem;
}

.legal-inner {
  max-width: 48rem;
}

.legal-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-coral);
  text-decoration: none;
}

.legal-back:hover {
  text-decoration: underline;
}

.legal-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.legal-updated {
  margin: 0 0 1.75rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.legal-intro {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  color: var(--color-text-secondary);
}

.legal-content h2 {
  margin: 2.25rem 0 0.6rem;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.7;
}
