/* ========== RÉINITIALISATION & BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #111827;
  background: #ffffff;
}

/* ========== TYPOGRAPHIE ========== */
h1 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

h5 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

h6 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: #4b5563;
  line-height: 1.75;
}

a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

a:hover {
  color: #004a99;
}

/* ========== CONTENEUR & MISE EN PAGE ========== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 5rem 0;
}

.section.bg-light {
  background: #f8f9fa;
}

.section.bg-gray {
  background: #f3f4f6;
}

/* ========== UTILITAIRES FLEXBOX ========== */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-around {
  justify-content: space-around;
}

.gap-1 {
  gap: 1rem;
}

.gap-2 {
  gap: 2rem;
}

/* ========== UTILITAIRES GRID ========== */
.grid {
  display: grid;
}

.cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

/* ========== UTILITAIRES MARGE & PADDING ========== */
.mt-1 {
  margin-top: 1rem;
}

.mt-2 {
  margin-top: 2rem;
}

.mt-4 {
  margin-top: 4rem;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mb-4 {
  margin-bottom: 4rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.p-8 {
  padding: 2rem;
}

/* ========== BOUTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  white-space: nowrap;
  gap: 0.5rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: #0066cc;
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: #004a99;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background: #6c757d;
  color: #ffffff;
}

.btn-secondary:hover:not(:disabled) {
  background: #4b5563;
}

.btn-outline {
  border-color: #0066cc;
  color: #0066cc;
  background: transparent;
}

.btn-outline:hover:not(:disabled) {
  background: #f8f9fa;
}

.btn-link {
  background: transparent;
  color: #0066cc;
  padding: 0.5rem 1rem;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ========== CARTES ========== */
.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.card-header {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.card-body {
  padding: 1rem 0;
}

.card-footer {
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;
  margin-top: 1rem;
}

/* ========== FORMULAIRES ========== */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #374151;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

input:invalid:not(:placeholder-shown),
input.invalid {
  border-color: #e0dfdf;

} 

textarea {
  resize: vertical;
  min-height: 120px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.form-msg {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  display: none;
  font-weight: 500;
}

.form-msg.show {
  display: block;
}

.form-msg.error {
  background: #fef3f3;
  color: #dc3545;
  border: 1px solid #fcbaba;
}

.form-msg.success {
  background: #f1fdf5;
  color: #28a745;
  border: 1px solid #bff5d1;
}

.error-text {
  color: #b39b9d;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.error-text.show {
  display: block;
}

/* ========== TABLEAUX ========== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

thead {
  background: #f3f4f6;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

th {
  font-weight: 600;
  color: #1f2937;
}

tbody tr:nth-child(even) {
  background: #f9fafb;
}

tbody tr:hover {
  background: #f3f4f6;
}

/* ========== BADGES & ÉTIQUETTES ========== */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
}

.badge-primary {
  background: rgba(0, 102, 204, 0.1);
  color: #0066cc;
}

.badge-success {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.badge-danger {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.badge-warning {
  background: rgba(255, 193, 7, 0.1);
  color: #ff9800;
}

/* ========== ALERTES ========== */
.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  border-left: 4px solid;
  margin-bottom: 1rem;
}

.alert-success {
  background: #f1fdf5;
  border-color: #28a745;
  color: #28a745;
}

.alert-danger {
  background: #fef3f3;
  border-color: #dc3545;
  color: #dc3545;
}

.alert-warning {
  background: #fffbf0;
  border-color: #ffc107;
  color: #ff9800;
}

.alert-info {
  background: #f0f9ff;
  border-color: #17a2b8;
  color: #17a2b8;
}

/* ========== ENTÊTE & NAVIGATION ========== */
.header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0066cc;
}

.nav {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav a {
  color: #4b5563;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
}

.nav a:hover {
  color: #0066cc;
}

/* ========== PIED DE PAGE ========== */
.footer {
  background: #111827;
  color: #ffffff;
  padding: 4rem 0 2rem;
  text-align: center;
  margin-top: 5rem;
}

.footer p {
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

/* ========== UTILITAIRES ========== */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: #0066cc;
}

.text-secondary {
  color: #6c757d;
}

.text-muted {
  color: #4b5563;
}

.text-danger {
  color: #dc3545;
}

.text-success {
  color: #28a745;
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.opacity-50 {
  opacity: 0.5;
}

.hidden {
  display: none;
}

.visible {
  display: block;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.overflow-hidden {
  overflow: hidden;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========== BOUTON RETOUR EN HAUT ========== */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 45px;
  height: 45px;
  background: #0066cc;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  font-size: 1.25rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease-in-out;
  z-index: 99;
}

.back-to-top:hover {
  background: #004a99;
  transform: translateY(-3px);
}

.back-to-top.show {
  display: flex;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1920px) {
  .container {
    max-width: 1200px;
  }
}

@media (min-width: 1921px) {
  .container {
    max-width: 1400px;
  }

  .section {
    padding: 6rem 0;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .grid {
    gap: 2rem;
  }

  .cols-3 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .container {
    padding: 0 1rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .cols-2 {
    grid-template-columns: 1fr;
  }

  .cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav {
    gap: 1rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 0.875rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.375rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .cols-2 {
    grid-template-columns: 1fr;
  }

  .cols-3 {
    grid-template-columns: 1fr;
  }

  .cols-4 {
    grid-template-columns: 1fr;
  }

  .gap-1 {
    gap: 0.75rem;
  }

  .gap-2 {
    gap: 1rem;
  }

  .nav {
    gap: 0.75rem;
    font-size: 0.75rem;
    display: none;
    position: absolute;
    top: 64px;
    right: 0;
    left: 0;
    background: #ffffff;
    padding: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 150;
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav.show {
    display: flex;
  }

  .nav-toggle {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2px solid #0066cc;
    color: #0066cc;
    cursor: pointer;
    padding: 4px;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    margin-left: auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
  }

  .nav-toggle .line {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    margin: 2px 0;
    transform-origin: center;
    transition: transform 220ms 0.2s ease-in-out, opacity 180ms ease;
  }

  .nav-toggle.open {
    background: #0066cc;
    color: #ffffff;
    transform: scale(1.02);
  }

  .nav-toggle.open .line1 {
    transform: translateY(5px) rotate(45deg);
  }

  .nav-toggle.open .line2 {
    opacity: 0;
    transform: scaleX(0.6);
  }

  .nav-toggle.open .line3 {
    transform: translateY(-5px) rotate(-45deg);
  }
  

  .btn {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
  }

  .btn-small {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
  }

  table {
    font-size: 0.75rem;
  }

  th, td {
    padding: 0.4rem;
  }
}

/* Très grands écrans (1920px+) */
@media (min-width: 1921px) {
  .container {
    max-width: 1400px;
  }

  .section {
    padding: 6rem 0;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .gap-2 {
    gap: 2.5rem;
  }

  .gap-6 {
    gap: 2rem;
  }

  .cols-3 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cols-4 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Écrans larges (820px à 1024px) - iPad Air */
@media (max-width: 1024px) and (min-width: 821px) {
  .container {
    padding: 0 1.25rem;
  }

  .section {
    padding: 4rem 0;
  }

  h1 {
    font-size: 2.125rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Tablettes (769px à 820px) - iPad Air & Mini */
@media (max-width: 820px) and (min-width: 769px) {
  .container {
    padding: 0 1.125rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.625rem;
  }

  h3 {
    font-size: 1.375rem;
  }

  .cols-2 {
    grid-template-columns: 1fr;
  }

  .cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .btn {
    padding: 0.7rem 1.25rem;
    font-size: 0.95rem;
  }

  .form-group {
    margin-bottom: 1.25rem;
  }
}

/* Tablettes petites & Phablets (601px à 768px) - iPad Mini */
@media (max-width: 768px) and (min-width: 601px) {
  .container {
    padding: 0 1rem;
  }

  .section {
    padding: 3rem 0;
  }

  h1 {
    font-size: 1.875rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .cols-2 {
    grid-template-columns: 1fr;
  }

  .cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav {
    gap: 1rem;
    font-size: 0.875rem;
    display: none;
    position: absolute;
    top: 64px;
    right: 0;
    left: 0;
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 150;
    flex-direction: column;
    gap: 0.75rem;
  }

  .nav.show {
    display: flex;
  }

  .nav-toggle {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2px solid #0066cc;
    color: #0066cc;
    cursor: pointer;
    padding: 6px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-left: auto;
    box-shadow: 0 2px 6px rgba(77, 54, 54, 0.05);
    transition: 0.18s ease, color 0.18s ease, transform 0.12s ease;
  }

  .nav-toggle .line {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    margin: 3px 0;
    transform-origin: center;
    transition: transform 220ms 0.2s ease-in-out, opacity 180ms ease;
  }

  .nav-toggle.open {
    background: #0066cc;
    color: #ffffff;
    transform: scale(1.02);
  }

  .nav-toggle.open .line1 {
    transform: translateY(9px) rotate(45deg);
  }

  .nav-toggle.open .line2 {
    opacity: 0;
    transform: scaleX(0.6);
  }

  .nav-toggle.open .line3 {
    transform: translateY(-7px) rotate(-45deg);
  }

  .header-content {
    position: relative;
  }
}

/* Mobiles (600px et moins) - Phablets Android & iPhones */
@media (max-width: 600px) {

  div{
    text-align: center;
  }
  .container {
    padding: 0 0.875rem;
    align-items: center;
    align-content: center;
    text-align: center;
  }

  .section {
    padding: 2.5rem 0;
    align-content: center;
    text-align: center;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.90rem;
  }

  h3 {
    font-size: 1.25rem;
    text-align: center;
  }

  .cols-1 {
    grid-template-columns: 1fr;
  }

  .cols-2 {
    grid-template-columns: 1fr;
  }

  .cols-3 {
    grid-template-columns: 1fr;
  }

  .cols-4 {
    grid-template-columns: 1fr;
  }

  .gap-1 {
    gap: 0.75rem;
  }

  .gap-2 {
    gap: 1rem;
  }

  .gap-4 {
    gap: 0.75rem;
  }

  .gap-6 {
    gap: 1rem;
  }

  .btn {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    width: 100%;
  }

  .btn-small {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
  }

  .btn-link {
    width: auto;
  }

  .nav {
    gap: 0.75rem;
    font-size: 0.75rem;
    display: none;
    position: absolute;
    top: 64px;
    right: 0;
    left: 0;
    background: #ffffff;
    padding: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 150;
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav.show {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2px solid #0066cc;
    color: #0066cc;
    cursor: pointer;
    padding: 4px;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    margin-left: auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.18s ease, color 0.18s ease, transform 0.12s ease;
  }

  .nav-toggle .line {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    margin: 2px 0;
    transform-origin: center;
    transition: transform 220ms 0.2s ease-in-out, opacity 180ms ease;
  }

  .nav-toggle.open {
    background: #0066cc;
    color: #ffffff;
    transform: scale(1.02);
  }

  .nav-toggle.open .line1 {
    transform: translateY(5px) rotate(45deg);
  }

  .nav-toggle.open .line2 {
    opacity: 0;
    transform: scaleX(0.6);
  }

  .nav-toggle.open .line3 {
    transform: translateY(-5px) rotate(-45deg);
  }

  .header-content {
    position: relative;
  }

  .card {
    padding: 1.25rem;
  }

  .form-group {
    margin-bottom: 1.25rem;
  }

  table {
    font-size: 0.75rem;
  }

  th, td {
    padding: 0.4rem;
  }
}

/* Très petits mobiles (480px et moins) */
@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }

  .section {
    padding: 2rem 0;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.125rem;
  }

  .nav a {
    font-size: 1.1rem;
}

  .gap-2 {
    gap: 0.75rem;
  }

  .btn {
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }

 label {
    margin-right: 346px;
  }
  
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="date"],
  input[type="number"],
  select,
  textarea {
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
  }

  table {
    font-size: 0.7rem;
  }

  th, td {
    padding: 0.35rem;
  }

 
}
