/* ======================================================
   NELLES — CSS UNIVERSEL RESPONSIVE
   Version : v1.0
   Rôle : sécurité responsive globale
   À charger en DERNIER
====================================================== */

/* ---------- Reset minimal sécurisé ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ---------- Viewport & flux ---------- */
html {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  min-width: 320px;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* ---------- Images & médias ---------- */
img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- Container universel ---------- */
.nelles-container,
.container,
.wrapper,
.section,
.inner {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(16px, 4vw, 32px);
  padding-right: clamp(16px, 4vw, 32px);
}

/* ---------- Sécurité contre largeurs fixes ---------- */
[class*="col"],
[class*="grid"],
[class*="row"] {
  max-width: 100%;
}

/* ---------- Grilles flex sûres ---------- */
.flex,
.flex-row {
  display: flex;
  flex-wrap: wrap;
}

.flex > *,
.flex-row > * {
  max-width: 100%;
}

/* ---------- Désactivation overflow dangereux ---------- */
section,
main,
article,
header,
footer {
  overflow-x: visible;
}

/* ---------- Typographie fluide ---------- */
body {
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.6;
}

h1 {
  font-size: clamp(28px, 5vw, 42px);
}
h2 {
  font-size: clamp(24px, 4vw, 36px);
}
h3 {
  font-size: clamp(20px, 3vw, 28px);
}

/* ---------- Espacements verticaux ---------- */
section {
  padding-top: clamp(40px, 8vw, 80px);
  padding-bottom: clamp(40px, 8vw, 80px);
}

/* ---------- Sécurité boutons & inputs ---------- */
button,
input,
select,
textarea {
  max-width: 100%;
  font-size: inherit;
}

/* ---------- Mobile first correctif ---------- */
@media (max-width: 768px) {

  .desktop-only {
    display: none !important;
  }

  .mobile-center {
    text-align: center;
  }

  .mobile-stack > * {
    width: 100% !important;
  }
}
