/**
 * CSS Responsive Complet - CI Robotique
 * Assure une expérience optimale sur tous les appareils
 * Breakpoints: 320px (mobile), 480px, 768px (tablet), 992px, 1200px (desktop), 1920px (large)
 */

/* ========== RESET & BASE STYLES ========== */
* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== IMAGES & MÉDIAS RESPONSIFS ========== */
img,
picture,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  max-width: 100%;
  height: auto;
}

svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== FLEX & GRID DEFAULTS ========== */
.flex {
  display: flex;
  flex-wrap: wrap;
}

.grid {
  display: grid;
}

/* ========== TEXTE RESPONSIF ========== */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  margin-top: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

/* ========== TABLES RESPONSIVES ========== */
table {
  width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
}

@media (max-width: 768px) {
  table {
    font-size: 0.85rem;
  }
  
  table thead {
    display: none;
  }
  
  table,
  table tbody,
  table tr,
  table td {
    display: block;
    width: 100%;
  }
  
  table tbody tr {
    margin-bottom: 15px;
    border: 1px solid #e3e3e0;
    border-radius: 8px;
    padding: 10px;
  }
  
  table td {
    text-align: right;
    padding-left: 50%;
    position: relative;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  
  table td:before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    font-weight: bold;
    text-align: left;
  }
}

/* ========== CONTENEURS FLUIDES ========== */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-fluid {
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ========== BREAKPOINT: Très petit mobile (max 479px) ========== */
@media (max-width: 479px) {
  html {
    font-size: 14px;
  }
  
  h1 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  
  h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }
  
  h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  
  p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  .container,
  .container-fluid {
    padding: 0 0.75rem;
  }
  
  /* Boutons accessibles */
  button,
  .btn,
  a.btn,
  input[type="button"],
  input[type="submit"] {
    min-height: 48px;
    min-width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    display: block;
    width: 100%;
  }
  
  /* Navigation mobile */
  nav {
    padding: 8px 0 !important;
  }
  
  nav ul {
    flex-direction: column;
    gap: 0;
  }
  
  nav li {
    width: 100%;
  }
  
  nav a {
    display: block;
    padding: 12px 12px;
    min-height: 44px;
    font-size: 0.95rem;
    text-align: left;
  }
  
  /* Sections */
  .section,
  .hero {
    padding: 1.5rem 0.75rem !important;
  }
  
  .section-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
  }
  
  .section-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  /* Grilles */
  .grid,
  .formations-grid,
  .equipment-grid,
  .gallery-grid,
  .events-grid,
  .express-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  /* Cartes */
  .card,
  .formation-card,
  .express-card {
    padding: 1rem !important;
  }
  
  /* En-tête */
  .header,
  .header-top {
    padding: 12px 0.75rem !important;
    flex-direction: column;
    gap: 12px;
  }
  
  .logo {
    max-width: 80px;
    height: auto;
  }
  
  /* Pied de page */
  .footer {
    padding: 2rem 0.75rem 1rem !important;
  }
  
  .footer-grid,
  .footer-content {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }
}

/* ========== BREAKPOINT: Mobile (480px - 767px) ========== */
@media (min-width: 480px) and (max-width: 767px) {
  html {
    font-size: 15px;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.4rem;
  }
  
  h3 {
    font-size: 1.15rem;
  }
  
  .container,
  .container-fluid {
    padding: 0 1rem;
  }
  
  button,
  .btn,
  a.btn {
    min-height: 44px;
    padding: 12px 24px;
    min-width: auto;
  }
  
  nav a {
    padding: 12px 16px;
    font-size: 0.95rem;
  }
  
  .section,
  .hero {
    padding: 2rem 1rem !important;
  }
  
  .section-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
  }
  
  .grid,
  .gallery-grid,
  .formations-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px;
  }
  
  .card {
    padding: 1.25rem !important;
  }
  
  .header-top {
    padding: 16px 1rem !important;
  }
  
  .footer {
    padding: 2.5rem 1rem 1.5rem !important;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .hero h2 {
    font-size: 1.5rem;
  }
}

/* ========== BREAKPOINT: Tablette (768px - 991px) ========== */
@media (min-width: 768px) and (max-width: 991px) {
  html {
    font-size: 16px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.6rem;
  }
  
  h3 {
    font-size: 1.3rem;
  }
  
  .container {
    max-width: 720px;
  }
  
  .container-fluid {
    padding: 0 1.5rem;
  }
  
  button,
  .btn,
  a.btn {
    min-height: 44px;
    padding: 12px 32px;
  }
  
  .section,
  .hero {
    padding: 2.5rem 1.5rem !important;
  }
  
  .section-title {
    font-size: 1.6rem;
    margin-bottom: 2rem;
  }
  
  .grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px;
  }
  
  .formations-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .card {
    padding: 1.5rem !important;
  }
  
  .header-top {
    padding: 20px 1.5rem !important;
    flex-direction: row;
    justify-content: space-between;
  }
  
  .footer {
    padding: 3rem 1.5rem 1.5rem !important;
  }
  
  .footer-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem;
  }
  
  .two-column,
  .approach-section {
    flex-direction: row;
  }
  
  .two-column > * {
    flex: 1;
  }
  
  nav ul {
    flex-direction: row;
  }
  
  nav li {
    flex: 1;
  }
}

/* ========== BREAKPOINT: Petit bureau (992px - 1199px) ========== */
@media (min-width: 992px) and (max-width: 1199px) {
  .container {
    max-width: 960px;
  }
  
  h1 {
    font-size: 2.25rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.4rem;
  }
  
  .section {
    padding: 3rem 2rem !important;
  }
  
  .hero {
    padding: 80px 2rem !important;
  }
  
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
  }
  
  .grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
  
  .formations-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  
  .header-top {
    padding: 20px 2rem !important;
  }
  
  .footer {
    padding: 3.5rem 2rem 1.5rem !important;
  }
  
  .footer-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
  
  nav ul {
    flex-direction: row;
    gap: 24px;
  }
}

/* ========== BREAKPOINT: Bureau (1200px - 1919px) ========== */
@media (min-width: 1200px) and (max-width: 1919px) {
  .container {
    max-width: 1140px;
  }
  
  .container-fluid {
    padding: 0 2rem;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  .section {
    padding: 4rem 2rem !important;
  }
  
  .hero {
    padding: 100px 2rem !important;
  }
  
  .section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
  }
  
  .grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 28px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr) !important;
  }
  
  .formations-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
  
  .header {
    padding: 24px 2rem !important;
  }
  
  .footer {
    padding: 4rem 2rem 2rem !important;
  }
  
  .footer-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 2rem;
  }
  
  nav ul {
    gap: 32px;
  }
}

/* ========== BREAKPOINT: Grand Bureau (1920px+) ========== */
@media (min-width: 1920px) {
  .container {
    max-width: 1320px;
  }
  
  h1 {
    font-size: 3rem;
  }
  
  h2 {
    font-size: 2.25rem;
  }
  
  h3 {
    font-size: 1.75rem;
  }
  
  .section {
    padding: 5rem 3rem !important;
  }
  
  .hero {
    padding: 120px 3rem !important;
  }
  
  .section-title {
    font-size: 2.25rem;
    margin-bottom: 3.5rem;
  }
  
  .grid {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 32px;
  }
}

/* ========== DISPOSITIFS TACTILES ========== */
@media (hover: none) and (pointer: coarse) {
  a,
  button,
  .btn,
  input[type="button"],
  input[type="submit"],
  [role="button"] {
    min-height: 48px;
    min-width: 48px;
    padding: 12px 20px;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
  }
  
  button:active,
  .btn:active,
  a:active {
    opacity: 0.8;
  }
  
  /* Éviter le zoom au clic sur iOS */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* ========== MODE PAYSAGE MOBILE ========== */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: 40px 2rem !important;
  }
  
  .hero h2 {
    font-size: 1.3rem;
    margin-bottom: 8px;
  }
  
  .hero p {
    font-size: 0.9rem;
    margin-bottom: 16px;
  }
  
  .section {
    padding: 1.5rem 1rem !important;
  }
  
  .section-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }
}

/* ========== HAUT CONTRASTE ========== */
@media (prefers-contrast: more) {
  body {
    font-weight: 500;
  }
  
  button,
  .btn,
  a {
    text-decoration: underline;
  }
}

/* ========== MOUVEMENT RÉDUIT ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========== MODE SOMBRE ========== */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #0a0a0a;
    color: #ededec;
  }
  
  a {
    color: #ff750f;
  }
}

/* ========== IMPRESSION ========== */
@media print {
  body {
    background: white;
  }
  
  nav,
  .navigation,
  footer {
    display: none;
  }
  
  .container {
    width: 100%;
    max-width: 100%;
  }
  
  img,
  svg {
    max-width: 100%;
    page-break-inside: avoid;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  p {
    orphans: 3;
    widows: 3;
  }
}

/* ========== CLASSES UTILITAIRES RESPONSIVES ========== */
.hidden-mobile {
  display: none;
}

.hidden-tablet {
  display: block;
}

.hidden-desktop {
  display: block;
}

@media (min-width: 768px) {
  .hidden-mobile {
    display: block;
  }
  
  .hidden-tablet {
    display: none;
  }
}

@media (min-width: 1200px) {
  .hidden-desktop {
    display: none;
  }
}

.responsive-img {
  width: 100%;
  height: auto;
  display: block;
}

.responsive-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: 8px;
}

.responsive-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ========== ÉVÉNEMENTS À VENIR ========== */
#events-list {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

#events-list::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* ========== FIN CSS RESPONSIVE ========== */

/* ========== GLOBAL LAYOUT HARDENING ========== */
body {
  overflow-x: clip;
}

iframe,
embed,
object {
  max-width: 100%;
}

.section,
.hero,
.header-top,
nav,
.footer-content,
.two-column,
.testimonials-grid,
.reviews-content,
.instructors-content,
.events-toolbar,
.events-slider-container,
.contact-grid,
.social-grid,
.form-group {
  max-width: 100%;
}

.formations-grid,
.approach-grid,
.equipment-grid,
.gallery-grid,
.express-grid,
.events-track,
.footer-content {
  align-items: stretch;
}

.formation-card,
.approach-card,
.equipment-item,
.event-card,
.partner-card,
.indicator-card,
.testimonial-card,
.reviews-card,
.social-card,
.contact-card {
  height: 100%;
}

.formation-content,
.event-content,
.approach-card,
.equipment-item,
.testimonial-card,
.reviews-card {
  min-width: 0;
}

.hero-buttons,
.header-cta,
.event-info,
.equipment-tags,
.social-links,
.contact-map-actions {
  row-gap: 12px;
}

.video-container,
.pdf-viewer,
.catalogue-reader-frame,
.contact-map-frame,
.gallery-item,
.modal-content,
.formation-modal-content {
  max-width: 100%;
}

.chatbot-window {
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 120px);
}

@media (max-width: 1199px) {
  .hero {
    min-height: auto;
  }

  .gallery-grid {
    grid-auto-rows: minmax(180px, auto);
  }

  .instructors-content,
  .reviews-content,
  .testimonials-grid,
  .two-column {
    gap: 24px;
  }
}

@media (max-width: 991px) {
  .two-column,
  .instructors-content,
  .reviews-content,
  .testimonials-grid,
  .events-toolbar,
  .footer-content {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
  }

  .header-top {
    gap: 16px;
  }

  .logo-section,
  .header-cta {
    width: 100%;
  }

  .header-cta {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  nav {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  nav ul ul,
  nav ul ul ul {
    position: static !important;
    min-width: 100%;
    box-shadow: none;
    border-radius: 12px;
    margin-top: 8px;
  }

  .events-toolbar,
  .events-controls {
    align-items: flex-start !important;
  }

  .events-controls {
    justify-content: flex-start !important;
  }
}

/* ========== DESIGN SYSTEM GLOBAL PREMIUM ========== */
:root {
  --ui-radius-sm: 10px;
  --ui-radius-md: 14px;
  --ui-radius-lg: 18px;
  --ui-shadow-sm: 0 8px 20px rgba(17, 24, 39, 0.08);
  --ui-shadow-md: 0 14px 36px rgba(17, 24, 39, 0.12);
  --ui-border: 1px solid rgba(17, 24, 39, 0.08);
}

body {
  text-rendering: optimizeLegibility;
}

.section,
.hero,
.header-top,
nav,
.footer {
  width: 100%;
}

.section {
  scroll-margin-top: 96px;
}

.section-title {
  letter-spacing: -0.01em;
  font-size: clamp(1.45rem, 1.15rem + 1vw, 2.2rem);
}

.section-subtitle {
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}

.btn,
button,
input[type="button"],
input[type="submit"] {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

a,
button,
.btn,
input,
select,
textarea {
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid rgba(255, 128, 0, 0.75);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(255, 128, 0, 0.20);
}

.formation-card,
.approach-card,
.equipment-item,
.event-card,
.testimonial-card,
.reviews-card,
.partner-card,
.indicator-card,
.social-card,
.contact-card,
.programme-card,
.badge-item,
.learning-card,
.audience-card,
.faq-item {
  border-radius: var(--ui-radius-md);
  border: var(--ui-border);
  box-shadow: var(--ui-shadow-sm);
}

.formation-card:hover,
.approach-card:hover,
.equipment-item:hover,
.event-card:hover,
.testimonial-card:hover,
.reviews-card:hover,
.partner-card:hover,
.indicator-card:hover,
.social-card:hover,
.contact-card:hover,
.programme-card:hover,
.badge-item:hover,
.learning-card:hover,
.audience-card:hover,
.faq-item:hover {
  box-shadow: var(--ui-shadow-md);
}

.formation-card p,
.approach-card p,
.equipment-item p,
.event-card p,
.testimonial-card p,
.reviews-card p,
.social-card p,
.contact-card p,
.programme-card p,
.learning-card p,
.audience-card p,
.faq-item p,
.faq-answer {
  line-height: 1.75;
}

.hero-buttons,
.header-cta,
.events-controls,
.social-links,
.contact-map-actions {
  gap: 12px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  border-radius: var(--ui-radius-sm);
  border: 1px solid rgba(17, 24, 39, 0.18);
  padding: 10px 12px;
  background: #fff;
}

input::placeholder,
textarea::placeholder {
  color: rgba(30, 42, 56, 0.58);
}

@media (max-width: 991px) {
  .section {
    scroll-margin-top: 72px;
  }

  .section-subtitle {
    max-width: 100%;
  }

  .hero-buttons,
  .header-cta,
  .events-controls {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 767px) {
  .section {
    border-radius: 0;
  }

  .formation-card,
  .approach-card,
  .equipment-item,
  .event-card,
  .testimonial-card,
  .reviews-card,
  .partner-card,
  .indicator-card,
  .social-card,
  .contact-card,
  .programme-card,
  .badge-item,
  .learning-card,
  .audience-card,
  .faq-item {
    border-radius: var(--ui-radius-sm);
  }
}

@media (max-width: 767px) {
  .hero-buttons .btn,
  .header-cta .btn,
  .event-content .btn,
  .formation-content .btn,
  .contact-map-actions .btn {
    width: 100%;
    text-align: center;
  }

  .event-info,
  .equipment-tags,
  .social-links {
    gap: 10px;
  }

  .event-info-item,
  .tag {
    width: 100%;
    justify-content: flex-start;
  }

  .chatbot-container {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
  }

  .chatbot-window,
  .chatbot-window.chatbot-left-window {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: min(70vh, 560px) !important;
  }

  .modal-content,
  .formation-modal-content {
    width: calc(100vw - 20px) !important;
    margin: 10px auto !important;
    max-height: calc(100vh - 20px) !important;
  }
}

@media (max-width: 479px) {
  .logo-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .title-block h1,
  .hero h2,
  .section-title {
    word-break: break-word;
  }

  .hero-buttons,
  .header-cta,
  .events-controls {
    width: 100%;
  }

  .events-controls .slider-btn {
    min-width: 48px;
    width: 48px;
  }
}

/* ========== NAVIGATION PROFESSIONNELLE ========== */
header nav ul {
  gap: 4px;
}

header nav > ul > li > a {
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

header nav > ul > li > a:hover,
header nav > ul > li.has-active-link > a {
  color: #ff8000 !important;
  background: rgba(255, 128, 0, 0.10);
  border-color: rgba(255, 128, 0, 0.16);
}

header nav a.is-active {
  color: #ff8000 !important;
  font-weight: 700;
  background: linear-gradient(180deg, rgba(255, 128, 0, 0.16), rgba(255, 128, 0, 0.08));
  border-color: rgba(255, 128, 0, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

header nav ul ul {
  border: 1px solid rgba(30, 42, 56, 0.10);
  border-radius: 12px;
  padding: 6px;
}

header nav ul ul li a {
  border-radius: 8px;
}

@media (max-width: 991px) {
  header nav {
    display: none;
    width: 100%;
    margin-top: 10px;
    border-radius: 14px;
    border: 1px solid rgba(30, 42, 56, 0.10);
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.12);
    overflow: hidden;
    background: #ffffff;
  }

  header nav.is-open {
    display: block;
  }

  header nav ul {
    flex-direction: column !important;
    align-items: stretch;
    padding: 10px;
    gap: 6px;
  }

  header nav li {
    width: 100%;
  }

  header nav > ul > li > a {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px !important;
  }

  header nav ul ul,
  header nav ul ul ul {
    margin-top: 6px;
    margin-left: 10px;
    padding: 6px;
    border-radius: 10px;
    background: rgba(255, 128, 0, 0.04);
  }
}

/* ========== STABILITY PATCH: AFFICHAGE MULTI-ECRANS ========== */
html,
body {
  max-width: 100%;
}

body {
  text-rendering: optimizeLegibility;
}

main,
header,
footer,
section,
.section,
.container,
.container-fluid {
  max-width: 100%;
}

p,
li,
td,
th,
a,
button,
label,
input,
select,
textarea,
.btn,
.tag,
.express-tag,
.section-title,
.section-subtitle,
.title-block h1,
.title-block p,
.hero h1,
.hero h2,
.hero p {
  overflow-wrap: anywhere;
}

.section,
.hero,
.footer {
  width: 100%;
}

.section {
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.header-top,
.logo-section,
.header-cta,
.hero-buttons,
.cta-buttons,
.events-controls,
.social-links,
.contact-map-actions,
.equipment-tags,
.event-info {
  flex-wrap: wrap;
}

.logo-section,
.title-block {
  min-width: 0;
}

.logo-section img,
header img,
.logo {
  flex: 0 0 auto;
  object-fit: contain;
}

.formations-grid,
.equipment-grid,
.gallery-grid,
.events-grid,
.express-grid,
.programmes-grid,
.programme-grid,
.approach-grid,
.reviews-grid,
.partners-grid,
.values-grid,
.team-grid,
.stats-grid,
.contact-grid,
.services-grid,
.pricing-grid,
.audience-grid,
.learning-grid {
  max-width: 100%;
}

.formation-card,
.equipment-item,
.gallery-item,
.event-card,
.express-card,
.programme-card,
.approach-card,
.reviews-card,
.partner-card,
.indicator-card,
.social-card,
.contact-card,
.service-card,
.pricing-card,
.audience-card,
.learning-card,
.faq-item {
  min-width: 0;
}

iframe,
embed,
object,
.video-container,
.map-container {
  max-width: 100%;
}

.video-container iframe,
.map-container iframe {
  width: 100%;
}

table {
  table-layout: auto;
}

.table-wrapper,
.pricing-table,
.comparison-table {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 992px) {
  header nav {
    display: block;
  }

  header nav > ul {
    align-items: center;
  }
}

@media (max-width: 991px) {
  .header-top {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .hero {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .two-column,
  .formation-details,
  .content-grid,
  .contact-grid,
  .services-grid,
  .pricing-grid {
    grid-template-columns: 1fr !important;
  }

  .events-viewport,
  .gallery-grid,
  .formations-grid,
  .express-grid {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .section {
    margin-top: 42px !important;
    margin-bottom: 42px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .hero {
    min-height: auto;
    padding-top: 58px !important;
    padding-bottom: 58px !important;
  }

  .hero h1,
  .hero h2 {
    font-size: clamp(1.8rem, 9vw, 2.45rem) !important;
    line-height: 1.15;
  }

  .hero p,
  .section-subtitle {
    font-size: clamp(0.98rem, 4vw, 1.12rem) !important;
  }

  .section-title {
    font-size: clamp(1.65rem, 8vw, 2.2rem) !important;
  }

  .hero-buttons,
  .cta-buttons,
  .contact-map-actions {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  .btn,
  button,
  input[type="button"],
  input[type="submit"] {
    white-space: normal;
  }

  nav ul ul,
  nav ul ul ul {
    min-width: 0 !important;
    width: 100% !important;
  }
}

@media (max-width: 479px) {
  .header-top {
    align-items: flex-start !important;
  }

  .logo-section {
    flex-direction: row;
    align-items: center;
  }

  .logo-section img,
  header img.logo,
  .logo {
    max-width: 72px;
  }

  .title-block h1 {
    font-size: 1rem !important;
  }

  .title-block p {
    font-size: 0.82rem !important;
  }

  .footer-content,
  .footer-grid {
    gap: 16px !important;
  }
}
