@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  /* === Design tokens étendus (v3.0.2) === */
  /* Spacing */
  --space-0: 0;
  --space-1: 0.4rem;
  --space-2: 0.8rem;
  --space-3: 1.2rem;
  --space-4: 1.6rem;
  --space-5: 2rem;
  --space-6: 2.4rem;
  --space-8: 3.2rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 1rem;

  /* Shadows */
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 12px 28px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --ease-fast: 0.15s;
  --ease: 0.2s;
  --ease-slow: 0.3s;

  /* Breakpoints */
  --bp-desktop: 75em;
  --bp-tablet: 59em;
  --bp-stablet: 44em;
  --bp-phone: 34em;

  --grey-800: #414141;
  --bleu-apsaq-50: #e6f9fd;
  --bleu-apsaq-hover: #73d7ea;
  --bleu-apsaq-hover-lite: #e9f3fd;
  /* Identité APSAQ */
  --bleu-apsaq: #00b7e8;
  --bleu-apsaq-alt: #20bfdc;

  /* Couleurs complémentaires */
  --jaune-apsaq: #ffd43b;
  --rouge-apsaq: #e03131;
  --vert-apsaq: #37b24d;

  /* Gris & neutres */
  --grey-900: #1a1a1a;
  --grey-700: #555;
  --grey-500: #8e8e8e;
  --grey-300: #d9d9d9;
  --grey-100: #f5f5f5;
  --white: #fff;
  --black: #000;
}

html {
  box-sizing: border-box;
  overflow-x: hidden; /* coupe toute dérive horizontale */
}

*,
::after,
::before {
  box-sizing: inherit;
  padding: 0;
  margin: 0;
}
body {
  font-family: "Roboto", sans-serif;
  background-color: var(--grey-100);
  color: var(--black);
  font-size: 62.5%;
  overflow-x: hidden;
  max-width: 100%;
}

img, svg, video, canvas, iframe, input, button {
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  padding: 0.8rem 0;
  color: var(--bleu-apsaq);
  text-align: center;
}

.bleuapsaq {
  color: var(--bleu-apsaq);
}

.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  border: none;
  padding: 0 2rem;
}
.gen-container {
  padding-bottom: 2.4rem;
}

.left {
  text-align: left;
}

.center {
  text-align: center;
}

.red {
  color: red;
}

p {
  line-height: 2;
  font-size: 1.2rem;
}

h1 {
  font-size: 3.2rem;
}
.error_message,
h2 {
  font-weight: 500;
}
h2 {
  font-size: 2.4rem;
}
h3 {
  font-weight: 400;
  font-size: 1.8rem;
}
h4 {
  font-size: 1.4rem;
  font-weight: 700;
}

.btn,
.btn:link,
.btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius-md);
  background: var(--bleu-apsaq);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font-size: 1rem;
}

.btn:active,
.btn:hover {
  box-shadow: var(--shadow-sm);
  transition: background-color var(--ease-slow);
}

a:link,
a:visited {
  color: var(--grey-700);
  text-decoration: none;
  cursor: pointer;
}

a:active,
a:hover {
  color: var(--bleu-apsaq-hover);
}

.btn--center {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.admin-mode-inline {
  color: #dc3545;
  font-weight: 700;
  font-size: 14px;
  margin-left: 15px;
  background-color: #ffecec;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-block;
  position: absolute;
  left: 250px;
}
.admin-mode-exit {
  color: #dc3545;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  transition: color 0.2s;
}
.admin-mode-exit:hover {
  color: #a30000;
}

/* ===== Generic white panel / card ===== */
.panel {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(3, 27, 78, 0.08);
  padding: clamp(1.25rem, 2.5vw, 2rem);
  margin: clamp(1rem, 2vw, 1.5rem) 0;
}

/* Optional blue accent like your style */
.panel--accent {
  border-color: var(--bleu-apsaq);
  box-shadow: 0 6px 18px rgba(0, 183, 232, 0.12);
}

/* Centered, not too wide on desktop */
.panel--max {
  max-width: 1200px;
  margin-inline: auto;
}

/* Tighter spacing for first/last elements inside the panel */
.panel > :first-child {
  margin-top: 0;
}
.panel > :last-child {
  margin-bottom: 0;
}

/* Small alignment niceties inside the panel */
.panel .form-renew {
  margin-bottom: 1.25rem;
}
.panel .renew-summary {
  margin-top: 1.25rem;
}

/* Forcer un formulaire sur une seule colonne */
.grid-1cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

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

/* Chaque champ dans une cellule de la grille */
.grid2cols .login-info {
  margin: 0; /* évite les marges inutiles */
}

/* Pour forcer un champ à prendre toute la largeur */
.grid2cols .fullwidth {
  grid-column: 1 / -1;
}

.gridspantwo {
  grid-column: span 2;
}

.gridspanthree { 
  grid-column:span 3
}

/* Message d'erreur global */
.login-err {
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--rouge-apsaq) 12%, white);
  border: 1.5px solid color-mix(in srgb, var(--rouge-apsaq) 40%, transparent);
  color: var(--grey-900);
  box-shadow: var(--shadow-sm);
  font-size: 1.05rem;
  text-align: center;
}