/* ========================================================================
   Variables
   ======================================================================== */

:root {
  /* Colors */
  --color-background: #050b16;            /* deep navy background */
  --color-surface: #0c1524;               /* elevated surface */
  --color-surface-alt: #111827;           /* alternative surface */
  --color-text: #f9fafb;                  /* primary text on dark */
  --color-text-muted: #9ca3af;            /* muted / secondary text */

  --color-primary: #2f81ff;               /* accent blue for CTAs */
  --color-primary-soft: rgba(47, 129, 255, 0.12);
  --color-primary-hover: #1f6ae0;

  --color-success: #16a34a;               /* responsible green */
  --color-success-soft: rgba(22, 163, 74, 0.12);
  --color-warning: #facc15;
  --color-warning-soft: rgba(250, 204, 21, 0.12);
  --color-danger: #ef4444;
  --color-danger-soft: rgba(239, 68, 68, 0.12);

  --color-border-subtle: #1f2933;
  --color-border-strong: #374151;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2933;              /* graphite-esque */
  --color-gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Font sizes (rem based) */
  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-md: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */

  /* Line heights */
  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.75;

  /* Spacing scale (px values mapped to rem for consistency) */
  --space-0: 0;
  --space-4: 0.25rem;   /* 4px */
  --space-8: 0.5rem;    /* 8px */
  --space-12: 0.75rem;  /* 12px */
  --space-16: 1rem;     /* 16px */
  --space-20: 1.25rem;  /* 20px */
  --space-24: 1.5rem;   /* 24px */
  --space-32: 2rem;     /* 32px */
  --space-40: 2.5rem;   /* 40px */
  --space-48: 3rem;     /* 48px */
  --space-64: 4rem;     /* 64px */
  --space-80: 5rem;     /* 80px */
  --space-96: 6rem;     /* 96px */

  /* Radius */
  --radius-sm: 0.25rem;      /* 4px */
  --radius-md: 0.5rem;       /* 8px */
  --radius-lg: 0.75rem;      /* 12px */
  --radius-xl: 1rem;         /* 16px */
  --radius-pill: 999px;

  /* Shadows: subtle, for professional & trustworthy look */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.45);
  --shadow-sm: 0 4px 10px rgba(15, 23, 42, 0.35);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.45);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 180ms ease-out;
  --transition-slow: 240ms ease-out;
}

/* ========================================================================
   Reset / Normalize
   ======================================================================== */

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

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

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

button {
  border: none;
  background: none;
  padding: 0;
}

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

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

/* ========================================================================
   Base Styles
   ======================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  background-color: var(--color-background);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  min-height: 60vh;
}

/* Headings: clear hierarchy, professional spacing */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: var(--line-height-snug);
  color: var(--color-gray-50);
}

h1 {
  font-size: clamp(2rem, 3vw, 2.5rem); /* 32–40px */
  margin-bottom: var(--space-24);
}

h2 {
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  margin-bottom: var(--space-20);
}

h3 {
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  margin-bottom: var(--space-16);
}

h4 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-12);
}

h5 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-8);
}

h6 {
  font-size: var(--font-size-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}

p {
  margin-bottom: var(--space-16);
  /* comfortable line length */
}

p:last-child {
  margin-bottom: 0;
}

/* Links: modern, unobtrusive but clear for CTAs */

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-normal);
}

a:hover {
  color: var(--color-primary-hover);
}

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

small {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

code,
pre {
  font-family: var(--font-mono);
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-24) 0;
}

/* ========================================================================
   Accessibility & Motion
   ======================================================================== */

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

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

/* ========================================================================
   Utilities
   ======================================================================== */

/* Layout */

.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-16);
  padding-right: var(--space-16);
  max-width: 1120px; /* focused reading width for comparison content */
}

.section {
  padding-top: var(--space-48);
  padding-bottom: var(--space-48);
}

.section--dense {
  padding-top: var(--space-32);
  padding-bottom: var(--space-32);
}

/* Flex helpers */

.flex {
  display: flex;
}

.flex-row {
  flex-direction: row;
}

.flex-col {
  flex-direction: column;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.flex-wrap {
  flex-wrap: wrap;
}

.gap-8 {
  gap: var(--space-8);
}

.gap-16 {
  gap: var(--space-16);
}

.gap-24 {
  gap: var(--space-24);
}

/* Grid helpers */

.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-24);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-24);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Alignment & text helpers */

.text-center {
  text-align: center;
}

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

.text-muted {
  color: var(--color-text-muted);
}

/* Screen reader only */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Spacing utilities (vertical rhythm) */

.mt-16 { margin-top: var(--space-16); }
.mt-24 { margin-top: var(--space-24); }
.mt-32 { margin-top: var(--space-32); }
.mb-16 { margin-bottom: var(--space-16); }
.mb-24 { margin-bottom: var(--space-24); }
.mb-32 { margin-bottom: var(--space-32); }

/* Width helpers */

.w-full {
  width: 100%;
}

/* ========================================================================
   Components
   ======================================================================== */

/* Buttons: strong but trustworthy CTAs */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

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

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-success) 100%);
  color: #ffffff!important;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled):not([aria-disabled="true"]) {
  background: linear-gradient(135deg, var(--color-primary-hover) 0%, #15803d 100%);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.btn-outline:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: var(--color-primary);
  background-color: rgba(15, 23, 42, 0.9);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-text);
}

.btn-ghost:hover:not(:disabled):not([aria-disabled="true"]) {
  background-color: rgba(31, 41, 55, 0.7);
}

/* Inputs: consistent, clear, and accessible */

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-fast),
    background-color var(--transition-normal);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--color-text-muted);
}

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary-soft), var(--shadow-xs);
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: var(--color-danger);
}

.field-label {
  display: inline-block;
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-gray-100);
}

.field-hint {
  margin-top: var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.field-error {
  margin-top: var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* Cards: comparison-style, trustworthy surfaces */

.card {
  background: radial-gradient(circle at top left, rgba(47, 129, 255, 0.08), transparent 55%),
              radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.08), transparent 55%),
              var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.22);
  padding: var(--space-24);
  box-shadow: var(--shadow-sm);
}

.card--subtle {
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
}

.card-header {
  margin-bottom: var(--space-16);
}

.card-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.card-body {
  font-size: var(--font-size-sm);
}

.card-footer {
  margin-top: var(--space-20);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
}

/* Badge: for labels like "Jeu Responsable", brand, regulatory notes */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.badge-success {
  border-color: rgba(34, 197, 94, 0.5);
  color: #bbf7d0;
  background-color: rgba(22, 163, 74, 0.16);
}

.badge-warning {
  border-color: rgba(250, 204, 21, 0.6);
  color: #fef3c7;
  background-color: rgba(250, 204, 21, 0.14);
}

.badge-danger {
  border-color: rgba(239, 68, 68, 0.55);
  color: #fee2e2;
  background-color: rgba(239, 68, 68, 0.14);
}

/* Notice banner: for responsible gaming messages */

.notice {
  border-radius: var(--radius-md);
  padding: var(--space-12) var(--space-16);
  font-size: var(--font-size-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--space-12);
}

.notice--info {
  background-color: var(--color-primary-soft);
  border: 1px solid rgba(37, 99, 235, 0.5);
}

.notice--success {
  background-color: var(--color-success-soft);
  border: 1px solid rgba(22, 163, 74, 0.5);
}

.notice--warning {
  background-color: var(--color-warning-soft);
  border: 1px solid rgba(250, 204, 21, 0.6);
}

.notice--danger {
  background-color: var(--color-danger-soft);
  border: 1px solid rgba(239, 68, 68, 0.55);
}

/* Tables: suitable for offer comparison */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table thead {
  background-color: rgba(15, 23, 42, 0.85);
}

.table th,
.table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
}

.table th {
  font-weight: 500;
  color: var(--color-gray-100);
  border-bottom: 1px solid var(--color-border-strong);
}

.table tbody tr {
  border-bottom: 1px solid var(--color-border-subtle);
}

.table tbody tr:nth-child(even) {
  background-color: rgba(15, 23, 42, 0.65);
}

.table tbody tr:last-child {
  border-bottom: none;
}

/* Page‑level helpers for Maison / Accueil, À propos, Jeu Responsable */

.page-hero {
  padding-top: var(--space-64);
  padding-bottom: var(--space-64);
}

.page-hero__eyebrow {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-success);
  margin-bottom: var(--space-8);
}


.page-hero__subtitle {
  margin-top: var(--space-12);
  color: var(--color-text-muted);
}

.page-section-title {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-8);
}

.page-section-lead {
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
}
