/* ===========================================================
   VARIABLES & BASE - THÈME PROFESSIONNEL GÉNIE CIVIL
=========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  --font-main: 'Inter', 'Segoe UI', Arial, sans-serif;
  --font-heading: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-data: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  /* Palette de couleurs professionnelle - Génie Civil (graphite / acier / béton) */
  --primary: #22375c;
  --primary-dark: #111a2b;
  --primary-light: #3d5c85;
  --accent: #c85e0d;
  --accent-hover: #e07a1f;
  
  /* Couleurs secondaires */
  --secondary: #3d5c85;
  --tertiary: #8fa6c4;

  /* Backgrounds professionnels - Thème Plan Technique */
  --bg-main: #f2f0ea;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-elevated: #e8e4da;
  --bg-hover: #dbe4ef;
  --bg-nav: #111a2b;

  /* Couleurs blueprint */
  --blueprint-grid-major: rgba(61, 92, 133, 0.12);
  --blueprint-grid-minor: rgba(61, 92, 133, 0.06);
  --blueprint-line: rgba(61, 92, 133, 0.18);

  /* Textes */
  --text-primary: #1b1d1f;
  --text-secondary: #4b5768;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --text-on-primary: #ffffff;

  /* Bordures */
  --border-color: #dbe4ef;
  --border-light: #ece8de;
  --border-medium: #c3cedb;
  --border-dark: #9ca3af;

  /* États et alertes */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Ombres professionnelles */
  --shadow-xs: 0 1px 2px rgba(17, 26, 43, 0.06);
  --shadow-sm: 0 2px 4px rgba(17, 26, 43, 0.08);
  --shadow-md: 0 4px 6px rgba(17, 26, 43, 0.09);
  --shadow-lg: 0 10px 15px rgba(17, 26, 43, 0.10);
  --shadow-xl: 0 20px 25px rgba(17, 26, 43, 0.12);
  --shadow-focus: 0 0 0 3px rgba(61, 92, 133, 0.15);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-medium: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Espacements */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* ===========================================================
   RESET & BASE
=========================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

/* ===========================================================
   ARRIÈRE-PLAN PLAN TECHNIQUE (BLUEPRINT)
=========================================================== */
body {
  font-family: var(--font-main);
  color: var(--text-primary);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  background-color: #eef2f7;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='0.025'/%3E%3C/svg%3E"),
    repeating-linear-gradient(90deg, transparent, transparent 99px, rgba(61, 92, 133, 0.13) 99px, rgba(61, 92, 133, 0.13) 100px),
    repeating-linear-gradient(0deg,  transparent, transparent 99px, rgba(61, 92, 133, 0.13) 99px, rgba(61, 92, 133, 0.13) 100px),
    repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(61, 92, 133, 0.05) 19px, rgba(61, 92, 133, 0.05) 20px),
    repeating-linear-gradient(0deg,  transparent, transparent 19px, rgba(61, 92, 133, 0.05) 19px, rgba(61, 92, 133, 0.05) 20px),
    linear-gradient(160deg, #e4e8ed 0%, #eef2f7 40%, #f0f4f9 100%);

  background-attachment: fixed;
  background-size: 200px 200px, 100px 100px, 100px 100px, 20px 20px, 20px 20px, 100% 100%;
}

/* Titres professionnels */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

h1 { font-size: 2.5rem; color: var(--primary); }
h2 { font-size: 2rem;   color: var(--primary-dark); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; color: var(--text-secondary); }

/* ===========================================================
   STRUCTURE PAGE
=========================================================== */
.main-content {
  flex: 1;
  padding: var(--spacing-2xl) var(--spacing-lg);
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ===========================================================
   NAVIGATION PROFESSIONNELLE
=========================================================== */
nav {
  background: linear-gradient(135deg, var(--bg-nav) 0%, var(--primary-dark) 100%);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--accent);
}

.menu {
  display: flex;
  gap: var(--spacing-xs);
  list-style: none;
  padding: 0 var(--spacing-2xl);
  margin: 0 auto;
  max-width: 1400px;
}

.menu li { position: relative; }

.menu li a {
  display: flex;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-lg);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  transition: all var(--transition-fast);
  position: relative;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.menu li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--accent);
  transition: all var(--transition-medium);
  transform: translateX(-50%);
}

.menu li a:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-on-primary); }
.menu li a:hover::after { width: 80%; }

/* Sous-menu */
.sousmenu {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  background: var(--bg-secondary);
  min-width: 260px;
  border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-xl);
  list-style: none;
  padding: var(--spacing-sm) 0;
  border-top: 3px solid var(--accent);
  border: 1px solid var(--border-color);
}

.menu li:hover .sousmenu {
  display: block;
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sousmenu li a {
  padding: var(--spacing-md) var(--spacing-lg);
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-radius: 0;
}

.sousmenu li a::after { display: none; }

.sousmenu li a:hover {
  background: var(--bg-hover);
  color: var(--primary);
  padding-left: calc(var(--spacing-lg) + var(--spacing-sm));
}

/* ===========================================================
   TABLES PROFESSIONNELLES — VERSION AMÉLIORÉE
=========================================================== */

/* Conteneur avec scroll horizontal et ombre */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(17, 26, 43, 0.18);
  margin: var(--spacing-xl) 0;
  border: 1.5px solid var(--border-medium);
}

/* Table de base */
table {
  width: auto;                /* ✅ largeur ajustée au contenu */
  min-width: 0;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 0.92rem;
  margin: var(--spacing-xl) auto; /* ✅ centré horizontalement */
  box-shadow: 0 4px 20px rgba(17, 26, 43, 0.18);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid var(--border-medium);
}

/* En-tête fort et lisible */
thead {
  background: linear-gradient(135deg, #111a2b 0%, #22375c 60%, #3d5c85 100%);
  position: relative;
}

thead::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, #ffb347 100%);
}

th {
  padding: 14px 18px;
  color: #ffffff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 0.82rem;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 2px solid var(--accent);
  white-space: nowrap;
}

th:last-child { border-right: none; }

/* Sous-en-tête */
thead tr:last-child th {
  font-size: 0.78rem;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.15);
  letter-spacing: 0.4px;
}

/* Corps du tableau */
tbody tr {
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
  border-bottom: 1px solid #dbe4ef;
}

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

/* Alternance nette blanc / bleu très clair */
tbody tr:nth-child(odd)  { background: #ffffff; }
tbody tr:nth-child(even) { background: #eceef1; }

/* Hover fort et visible avec barre bleue gauche */
tbody tr:hover {
  background: #dbe4ef !important;
  box-shadow: inset 4px 0 0 var(--primary);
}

/* Cellules */
td {
  padding: 11px 18px;
  text-align: center;       /* ✅ centré */
  color: #1f2937;
  font-size: 0.9rem;
  border-right: 1px solid #dbe4ef;
  font-weight: 500;
  vertical-align: middle;
  white-space: nowrap;      /* ✅ empêche le retour à la ligne */
}

td:last-child { border-right: none; }

/* Première colonne — label distinctif */
td:first-child {
  font-weight: 700;
  color: var(--primary-dark);
  background: #f7f7f4;
  border-right: 2px solid var(--border-medium);
  text-align: center;       /* ✅ centré aussi */
  padding-left: 20px;
  padding-right: 20px;
}

tbody tr:hover td:first-child {
  background: #dbe4ef;
  color: var(--primary);
}

/* Cellule titre de groupe (colspan) */
td[colspan] {
  background: linear-gradient(135deg, #e4e8ed 0%, #eceef1 100%) !important;
  color: var(--primary-dark) !important;
  font-weight: 700 !important;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-top: 2px solid var(--border-medium);
  border-bottom: 1px solid var(--border-medium);
  padding: 10px 18px;
  text-align: center !important;
}

/* Cellule "Vérification OK" */
td.ok,
td[data-status="ok"] {
  color: #065f46;
  background: #d1fae5 !important;
  font-weight: 700;
}

td.ok::before { content: '✓ '; }

/* Cellule "Non vérifiée / NOK" */
td.nok,
td[data-status="nok"] {
  color: #991b1b;
  background: #fee2e2 !important;
  font-weight: 700;
}

td.nok::before { content: '✗ '; }

/* Renforcement JS "non vérifiée" */
td[style*="background-color: rgb(255, 204, 204)"] {
  border-left: 3px solid #dc2626 !important;
}

/* Cellule numérique */
td.num {
  text-align: right;
  font-family: var(--font-data);
  font-size: 0.88rem;
  letter-spacing: 0.3px;
}

/* Pied de tableau */
tfoot tr {
  background: linear-gradient(135deg, #eceef1 0%, #e4e8ed 100%);
  border-top: 2px solid var(--border-medium);
}

tfoot td {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 0.88rem;
}

/* Titre au-dessus du tableau */
.table-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  padding-left: 4px;
}

/* Badges dans cellules */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-ok   { background: #d1fae5; color: #065f46; }
.badge-nok  { background: #fee2e2; color: #991b1b; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbe4ef; color: #1e40af; }

/* ===========================================================
   FORMULAIRES PROFESSIONNELS
=========================================================== */
input, select, textarea {
  font-family: var(--font-main);
  border: 2px solid var(--border-color);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}

input:hover,  select:hover,  textarea:hover  { border-color: var(--primary-light); }
input:focus,  select:focus,  textarea:focus  {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}

input[type="number"] { width: 100%; text-align: left; }
input[type="text"]   { width: 100%; }

select {
  width: 100%;
  height: 42px;
  cursor: pointer;
  padding-right: 35px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231e5a9e' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  appearance: none;
}

label {
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xs);
  font-size: 0.9rem;
  display: block;
}

/* ===========================================================
   INTRODUCTION DU FORMULAIRE
=========================================================== */
.form-introduction {
  background: var(--bg-card);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--primary);
  margin-bottom: var(--spacing-2xl);
  box-shadow: var(--shadow-sm);
}

.form-introduction p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
}

.form-introduction p:last-of-type { margin-bottom: 0; }

.features-list {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-md);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
}

.features-list strong { color: var(--primary); display: block; margin-bottom: var(--spacing-sm); }
.features-list ul     { margin: 0; padding-left: var(--spacing-lg); }
.features-list li     { color: var(--text-secondary); margin: var(--spacing-xs) 0; }

/* ===========================================================
   SÉPARATEUR
=========================================================== */
.separator {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
  margin: var(--spacing-2xl) 0;
}

/* ===========================================================
   SECTIONS DU FORMULAIRE
=========================================================== */
.form-section { margin-bottom: var(--spacing-2xl); }

.form-section.with-visual {
  display: grid;
  grid-template-columns: 720px 1fr;
  gap: var(--spacing-xl);
  align-items: start;
}

.section-visual {
  position: sticky;
  top: 100px;
  max-width: 720px;
}

.schema-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-color);
}

.section-forms { display: flex; flex-direction: column; }

.form-section.two-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-xl);
}

/* ===========================================================
   FIELDSETS PROFESSIONNELS
=========================================================== */
.container-fieldsets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: var(--spacing-xl);
  margin: var(--spacing-xl) 0;
}

.fieldsetms {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0 var(--spacing-xl) var(--spacing-xl) var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(61, 92, 133, 0.03) 39px, rgba(61, 92, 133, 0.03) 40px),
    repeating-linear-gradient(0deg,  transparent, transparent 39px, rgba(61, 92, 133, 0.03) 39px, rgba(61, 92, 133, 0.03) 40px);
}

.fieldsetms::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  z-index: 1;
}

.fieldsetms:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.fieldsetms legend {
  display: block;
  width: calc(100% + var(--spacing-xl) * 2);
  margin-left: calc(-1 * var(--spacing-xl));
  box-sizing: border-box;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.2rem;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, #eceef1 0%, #e4e8ed 100%);
  border-bottom: 2px solid var(--border-color);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--spacing-md) var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  position: relative;
}

.fieldsetms legend::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-lg) 0 0 0;
}

/* ===========================================================
   SOUS-SECTIONS
=========================================================== */
.subsection { margin-bottom: var(--spacing-xl); }
.subsection:last-child { margin-bottom: 0; }

.subsection h4 {
  color: var(--primary-dark);
  font-size: 1.05rem;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--border-light);
  font-weight: 600;
}

/* ===========================================================
   GRILLE DE FORMULAIRE
=========================================================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 190px));
  gap: var(--spacing-md) var(--spacing-lg);
}

/* Les selects contiennent du texte plus long : on leur laisse un peu plus de place */
.form-grid .input-group:has(select) {
  min-width: 220px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.input-group label { font-weight: 600; color: var(--text-secondary); font-size: 0.9rem; margin: 0; }
.input-group input,
.input-group select { width: 100%; }

/* ===========================================================
   SCHÉMAS DANS FIELDSETS
=========================================================== */
.schema-container {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
}

.schema-container img { max-width: 100%; height: auto; border-radius: var(--radius-md); }

/* ===========================================================
   BOUTONS PROFESSIONNELS
=========================================================== */
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-2xl);
  margin: var(--spacing-md) var(--spacing-sm);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--text-on-primary);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-medium);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  min-width: 220px;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.submit-btn:hover::before { width: 400px; height: 400px; }

.submit-btn:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.submit-btn:active  { transform: translateY(0); box-shadow: var(--shadow-sm); }
.submit-btn span    { font-size: 1.3rem; }

.btn-secondary       { background: linear-gradient(135deg, var(--accent) 0%, #a34e08 100%); }
.btn-secondary:hover { background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%); }

.btn-outline         { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover   { background: var(--primary); color: var(--text-on-primary); }

/* ===========================================================
   ACTIONS DU FORMULAIRE
=========================================================== */
.form-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-xl);
  flex-wrap: wrap;
}

/* ===========================================================
   BOUTON RESET
=========================================================== */
.reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-xl);
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: var(--text-on-primary);
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-medium);
  box-shadow: var(--shadow-sm);
  min-width: 200px;
  position: relative;
  overflow: hidden;
}

.reset-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.reset-btn:hover::before { width: 400px; height: 400px; }

.reset-btn:hover {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #9ca3af;
}

.reset-btn:active { transform: translateY(0); box-shadow: var(--shadow-xs); }
.reset-btn span   { font-size: 1.3rem; }

/* ===========================================================
   PAGE D'ACCUEIL PROFESSIONNELLE
=========================================================== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--text-on-primary);
  padding: var(--spacing-2xl) var(--spacing-xl);
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: var(--shadow-xl);
  margin-bottom: var(--spacing-2xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 49px, rgba(255, 255, 255, 0.04) 49px, rgba(255, 255, 255, 0.04) 50px),
    repeating-linear-gradient(0deg,  transparent, transparent 49px, rgba(255, 255, 255, 0.04) 49px, rgba(255, 255, 255, 0.04) 50px);
  pointer-events: none;
  border-radius: var(--radius-xl);
}

.hero h1 { font-size: 2.5rem; margin-bottom: var(--spacing-md); color: var(--text-on-primary); position: relative; z-index: 1; }
.hero p  { font-size: 1.2rem; max-width: 800px; margin: 0 auto; opacity: 0.95; position: relative; z-index: 1; }

/* Cartes statistiques */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin: var(--spacing-2xl) 0;
}

.stat-card {
  background: var(--bg-card);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
  transition: all var(--transition-medium);
}

.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-left-width: 6px; }
.stat-card h3    { color: var(--primary); font-size: 2.5rem; margin: var(--spacing-sm) 0; }
.stat-card p     { color: var(--text-secondary); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

/* ===========================================================
   GRILLES DE MODULES
=========================================================== */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-xl);
  margin: var(--spacing-2xl) 0;
}

.module-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-medium);
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--primary);
  position: relative;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  transform: scaleX(0);
  transition: transform var(--transition-medium);
}

.module-card:hover::before { transform: scaleX(1); }

.module-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.module-icon {
  width: 70px;
  height: 70px;
  margin-bottom: var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  border-radius: var(--radius-md);
  transition: all var(--transition-medium);
}

.module-card:hover .module-icon { transform: scale(1.1) rotate(5deg); box-shadow: var(--shadow-md); }
.module-icon img { width: 40px; height: auto; filter: brightness(0) invert(1); }

.module-card h3  { color: var(--primary); margin: var(--spacing-md) 0; font-size: 1.3rem; }
.module-card p   { color: var(--text-secondary); line-height: 1.6; font-size: 0.95rem; }
.module-card ul  { list-style: none; padding: 0; margin: var(--spacing-md) 0 0 0; }

.module-card li {
  color: var(--text-secondary);
  padding: var(--spacing-xs) 0 var(--spacing-xs) var(--spacing-lg);
  position: relative;
  font-size: 0.9rem;
}

.module-card li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); font-weight: bold; }

/* ===========================================================
   FOOTER PROFESSIONNEL
=========================================================== */
.footer {
  background: linear-gradient(135deg, var(--bg-nav) 0%, var(--primary-dark) 100%);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--spacing-2xl) var(--spacing-lg);
  margin-top: var(--spacing-2xl);
  border-top: 3px solid var(--accent);
}

.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-2xl);
}

.footer h4 {
  color: var(--text-on-primary);
  font-size: 1.2rem;
  margin-bottom: var(--spacing-lg);
  position: relative;
  padding-bottom: var(--spacing-sm);
}

.footer h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.footer a { color: rgba(255, 255, 255, 0.8); text-decoration: none; transition: all var(--transition-fast); display: block; margin: var(--spacing-xs) 0; }
.footer a:hover { color: var(--text-on-primary); padding-left: var(--spacing-sm); }

.footer-bottom {
  text-align: center;
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
}

.footer-brand { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }

.footer-logo {
  width: 80px;
  height: auto;
  filter: brightness(0) invert(1);
  transition: transform var(--transition-medium);
}

.footer-logo:hover { transform: scale(1.1) rotate(5deg); }

/* ===========================================================
   RESPONSIVE
=========================================================== */
@media (max-width: 1400px) {
  .form-section.with-visual { grid-template-columns: 620px 1fr; }
  .section-visual            { max-width: 620px; }
}

@media (max-width: 1200px) {
  .main-content              { padding: var(--spacing-xl) var(--spacing-md); }
  .container-fieldsets       { grid-template-columns: 1fr; }
  .form-section.with-visual  { grid-template-columns: 560px 1fr; }
  .section-visual            { max-width: 560px; }
}

@media (max-width: 1024px) {
  .form-section.with-visual,
  .form-section.two-columns  { grid-template-columns: 1fr; }
  .section-visual            { position: static; max-width: 100%; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }

  .menu              { flex-direction: column; padding: var(--spacing-sm); }
  .menu li a         { border-radius: var(--radius-md); }
  .sousmenu          { position: relative; margin-left: var(--spacing-md); border-left: 3px solid var(--accent); border-top: none; }
  .fieldsetms        { padding: var(--spacing-lg); }
  .form-grid         { grid-template-columns: 1fr; }
  .section-visual    { max-width: 100%; }
  .form-actions      { flex-direction: column; width: 100%; }
  .reset-btn,
  .submit-btn        { width: 100%; min-width: 100%; }

  /* Tables responsive */
  th, td             { padding: 9px 12px; font-size: 0.82rem; }
  th                 { font-size: 0.75rem; }
  td:first-child     { padding-left: 12px; }
}

@media (max-width: 480px) {
  html               { font-size: 14px; }
  .fieldsetms        { padding: var(--spacing-md); }
  .submit-btn        { width: 100%; }
  th, td             { padding: 7px 8px; font-size: 0.78rem; }
}

/* ===========================================================
   UTILITAIRES
=========================================================== */
.text-center { text-align: center; }
.mt-lg       { margin-top: var(--spacing-lg); }
.mb-lg       { margin-bottom: var(--spacing-lg); }

/* Scroll bar personnalisée */
::-webkit-scrollbar       { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg-elevated); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
}



  /* ── Tableau des sollicitations ── */

  .sollicitations-table                { width: AUTO; border-collapse: collapse; margin-bottom: 10px; }
  .sollicitations-table th,
  .sollicitations-table td             { padding: 6px 10px; text-align: center; border: 1px solid #ddd; }
  .sollicitations-table thead th       { background: #f0f4f8; font-size: 13px; font-weight: 700; }
  .sollicitations-table td select,
  .sollicitations-table td input       { width: 100%; box-sizing: border-box; padding: 4px 6px;
                                         border: 1px solid #aaa; border-radius: 4px; }
  .sollicitations-table td:last-child  { width: 36px; border: none; }

  .btn-ajouter        { background: #4CAF50; color: white; padding: 5px 15px;
                        border: none; border-radius: 4px; cursor: pointer;
                        font-size: 14px; margin-top: 6px; }
  .btn-ajouter:hover  { background: #45a049; }
  .btn-supprimer      { background: #f44336; color: white; padding: 2px 8px;
                        border: none; border-radius: 3px; cursor: pointer; font-size: 12px; }
  .btn-supprimer:hover { background: #da190b; }

  /* ── Tableau des sollicitations ── */
