/* ===== GLOBAL CSS - CROQ-RESTAURANTS.FR ===== */
/* Polices système uniquement - zéro Google Fonts */

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #2c2c54;
  background-color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* === ANTI-OVERFLOW === */
img, video, iframe, embed, object, svg, canvas {
  max-width: 100%;
  height: auto;
}

img {
  display: block;
}

table {
  max-width: 100%;
}

.table-responsive,
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* === TYPOGRAPHIE === */
h1, h2, h3, h4, h5, h6 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.25;
  font-weight: 700;
  margin-top: 0;
  color: #2c2c54;
}

p {
  margin-top: 0;
  line-height: 1.7;
}

a {
  color: #ff6348;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid #ff6348;
  outline-offset: 2px;
  border-radius: 2px;
}

/* === UTILITAIRES === */
.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;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === BOUTONS GLOBAUX === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #ff6348;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 10px;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: #e8563e;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary:focus-visible {
  outline: 2px solid #ff6348;
  outline-offset: 3px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #ffffff;
  color: #2c2c54;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 10px;
  text-decoration: none;
  border: 2px solid #2c2c54;
  transition: background-color 0.2s, color 0.2s, transform 0.15s;
  cursor: pointer;
  white-space: nowrap;
}

.btn-secondary:hover {
  background-color: #2c2c54;
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: transparent;
  color: #ff6348;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  border: 2px solid #ff6348;
  transition: background-color 0.2s, color 0.2s;
}

.btn-outline:hover {
  background-color: #ff6348;
  color: #ffffff;
  text-decoration: none;
}

/* === SECTIONS COMMUNES === */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(255, 99, 72, 0.1);
  color: #ff6348;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.section-badge--light {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.section-title {
  font-size: 36px;
  color: #2c2c54;
  margin-bottom: 12px;
  font-weight: 800;
}

.section-title--light {
  color: #ffffff;
}

.section-subtitle {
  font-size: 17px;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.section-subtitle--light {
  color: rgba(236, 240, 241, 0.85);
}

/* === TABLEAUX RESPONSIVE === */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(44,44,84,0.08);
}

/* === FOCUS GLOBAL === */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #ff6348;
  outline-offset: 2px;
}

/* === OVERFLOW WORDS === */
p, h1, h2, h3, h4, h5, h6, span, li, td, th {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

pre, code {
  overflow-x: auto;
  max-width: 100%;
}

/* ===== RESPONSIVE (auto-repair) ===== */
@media (max-width: 1024px) {
  .section-container {
    padding: 0 20px;
  }

  .section-title {
    font-size: 30px;
  }

  .section-subtitle {
    font-size: 16px;
  }

  .section-header {
    margin-bottom: 36px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-outline {
    font-size: 14px;
    padding: 11px 22px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .section-container {
    padding: 0 16px;
  }

  .section-title {
    font-size: 26px;
  }

  .section-subtitle {
    font-size: 15px;
    max-width: 100%;
  }

  .section-header {
    margin-bottom: 28px;
  }

  .section-badge {
    font-size: 11px;
    padding: 4px 12px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-outline {
    font-size: 14px;
    padding: 11px 20px;
    gap: 6px;
    white-space: normal;
    text-align: center;
    justify-content: center;
  }

  .table-responsive {
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .section-container {
    padding: 0 12px;
  }

  .section-title {
    font-size: 22px;
  }

  .section-subtitle {
    font-size: 14px;
  }

  .section-header {
    margin-bottom: 22px;
  }

  .section-badge {
    font-size: 10px;
    padding: 4px 10px;
    letter-spacing: 0.07em;
  }

  .btn-primary,
  .btn-secondary,
  .btn-outline {
    font-size: 13px;
    padding: 10px 16px;
    gap: 5px;
    width: 100%;
    justify-content: center;
  }

  .table-responsive {
    border-radius: 6px;
  }
}