/* ===== MOBILE RESPONSIVE - SHARED ELEMENTS ===== */

/* Tablettes et écrans intermédiaires (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {

  /* Header & Navigation */
  .header {
    padding: 0;
  }

  .nav {
    padding: 1rem 1.5rem;
    gap: 1rem;
  }

  .logo {
    width: 2.8rem;
  }

  .nav__links {
    gap: 1.5rem;
    padding-right: 0;
    margin-left: auto;
  }

  .nav__links a {
    font-size: 0.95rem;
  }

  .btn--primary {
    padding: 0.7rem 1.2rem;
    font-size: 0.95rem;
    white-space: nowrap;
  }

  /* General spacing */
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  p {
    line-height: 1.6;
  }

  /* Forms */
  input,
  textarea,
  select {
    font-size: 1rem;
  }

  /* Buttons */
  .btn {
    font-size: 0.95rem;
    padding: 0.7rem 1.2rem;
  }
}

/* Petits écrans et tablettes (max 767px) */
@media (max-width: 767px) {

  /* Header & Navigation */
  .header {
    padding: 0;
  }

  .nav {
    padding: 0.75rem 1rem;
    gap: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
  }

  .logo {
    width: 2.5rem;
  }

  .nav__links {
    gap: 0.8rem;
    padding-right: 0;
    margin-left: auto;
  }

  .nav__links a {
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .btn--primary {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Body Styles */
  body {
    font-size: 15px;
    line-height: 1.6;
  }

  /* Typography */
  h1 {
    font-size: 2rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
  }

  h2 {
    font-size: 1.4rem;
    line-height: 1.4;
    margin-bottom: 1rem;
  }

  h3 {
    font-size: 1.2rem;
    line-height: 1.35;
    margin-bottom: 0.6rem;
  }

  h4 {
    font-size: 1.05rem;
    line-height: 1.3;
    margin-bottom: 0.4rem;
  }

  p {
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 400;
    margin-bottom: 0.8rem;
  }

  /* Links */
  a {
    text-decoration: none;
    transition: color 0.2s ease;
  }

  a:active {
    opacity: 0.8;
  }

  /* Lists */
  ul,
  ol {
    padding-left: 1.2rem;
  }

  li {
    font-size: 1rem;
    margin-bottom: 0.4rem;
    line-height: 1.6;
    font-weight: 400;
  }

  /* Forms */
  input,
  textarea,
  select,
  button {
    font-family: inherit;
    font-size: 1rem;
    padding: 0.6rem;
    border-radius: 4px;
    border: 1px solid #ddd;
  }

  input:focus,
  textarea:focus,
  select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  }

  textarea {
    resize: vertical;
  }

  /* Buttons */
  .btn {
    display: inline-block;
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
  }

  .btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  }

  .btn--primary {
    background-color: var(--orange);
    color: white;
  }

  .btn--secondary {
    background-color: var(--orange);
    color: white;
  }

  /* Code */
  code {
    background-color: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
  }

  /* Tables (if used) */
  table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.8rem;
  }

  th,
  td {
    padding: 0.6rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
  }

  th {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
  }

  /* Utility Classes */
  .text-center {
    text-align: center;
  }

  .text-right {
    text-align: right;
  }

  .mt-1 {
    margin-top: 0.5rem;
  }

  .mt-2 {
    margin-top: 1rem;
  }

  .mt-3 {
    margin-top: 1.5rem;
  }

  .mb-1 {
    margin-bottom: 0.5rem;
  }

  .mb-2 {
    margin-bottom: 1rem;
  }

  .mb-3 {
    margin-bottom: 1.5rem;
  }

  .p-1 {
    padding: 0.5rem;
  }

  .p-2 {
    padding: 1rem;
  }

  .p-3 {
    padding: 1.5rem;
  }

  /* Accessibility */
  :focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
  }

  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
  }
}

/* Très petits écrans (max 480px) */
@media (max-width: 480px) {

  /* Header & Navigation */
  .header {
    padding: 0;
  }

  .nav {
    padding: 0.5rem 0.75rem;
    gap: 0.6rem;
  }

  .logo {
    width: 2.2rem;
  }

  .nav__links {
    gap: 0.6rem;
    font-size: 0.75rem;
  }

  .btn--primary {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
  }

  /* Body Styles */
  body {
    font-size: 14.5px;
  }

  /* Typography */
  h1 {
    font-size: 2rem;
    line-height: 1.35;
    margin-bottom: 0.6rem;
  }

  h2 {
    font-size: 1.3rem;
    line-height: 1.35;
    margin-bottom: 0.8rem;
  }

  h3 {
    font-size: 1.1rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
  }

  h4 {
    font-size: 1rem;
    line-height: 1.25;
    margin-bottom: 0.3rem;
  }

  p {
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 0.6rem;
  }

  /* Forms */
  input,
  textarea,
  select,
  button {
    font-size: 1rem;
    padding: 0.5rem;
  }

  /* Buttons */
  .btn {
    font-size: 0.75rem;
    padding: 0.5rem 0.8rem;
  }

  /* Utility Classes Spacing */
  .mt-1 {
    margin-top: 0.3rem;
  }

  .mt-2 {
    margin-top: 0.6rem;
  }

  .mt-3 {
    margin-top: 1rem;
  }

  .mb-1 {
    margin-bottom: 0.3rem;
  }

  .mb-2 {
    margin-bottom: 0.6rem;
  }

  .mb-3 {
    margin-bottom: 1rem;
  }

  .p-1 {
    padding: 0.3rem;
  }

  .p-2 {
    padding: 0.6rem;
  }

  .p-3 {
    padding: 1rem;
  }

  /* Tables */
  table {
    font-size: 0.7rem;
  }

  th,
  td {
    padding: 0.4rem;
  }
}