/* ============================
   VARIABLES ET RACINES
   ============================ */
:root {
  /* Couleurs */
  --neutral-900: hsl(243, 96%, 9%);
  --neutral-800: hsl(243, 27%, 20%);
  --neutral-700: hsl(243, 23%, 24%);
  --neutral-600: hsl(243, 23%, 30%);
  --neutral-300: hsl(240, 6%, 70%);
  --neutral-200: hsl(250, 6%, 84%);
  --neutral-0: hsl(0, 0%, 100%);
  --orange-500: hsl(28, 100%, 52%);
  --blue-500: hsl(233, 67%, 56%);
  --blue-700: hsl(248, 70%, 36%);
  
  /* Design tokens */
  --radius: 18px;
  --gap: 24px;
  --card-shadow: 0 12px 30px rgba(6, 6, 30, 0.5);
  --glass: rgba(255, 255, 255, 0.03);
  --glass-2: rgba(255, 255, 255, 0.02);
  
  /* Typographie */
  --font-body: "DM Sans",sans-serif;
  --font-display: "Bricolage Grotesque", sans-serif;
  font-size: 18px;
}

/* ============================
   RÉINITIALISATION ET BASE
   ============================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  background: var(--neutral-900);
  color: var(--neutral-200);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================
   LAYOUT PRINCIPAL
   ============================ */

.hero {
    text-align: center;
    margin: 2.5rem 0;
    color: var(--neutral-0);
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

.wrap {
  max-width: 1200px;
  margin: 36px auto;
  padding: 0 28px 80px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.left-col, .right-col {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* ============================
   COMPOSANTS D'EN-TÊTE
   ============================ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: block;
}

/* ============================
   CONTROLES DES UNITÉS
   ============================ */
.controls {
  position: relative;
}

.units-btn {
  background: var(--neutral-600);
  color: var(--neutral-0);
  border: 0;
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 14px;
}

.units-btn:hover {
  background: var(--neutral-700);
}

.units-btn.active {
  background: var(--neutral-600);
}

.units-btn.active .chev {
  transform: rotate(180deg);
}

.chev {
  transition: transform 0.3s ease;
  width: 12px;
  height: 12px;
}

/* ============================
   MENU UNITS AVEC CHECKMARKS
   ============================ */
.units-menu {
  position: absolute;
  right: 0;
  top: 56px;
  background: var(--neutral-700);
  padding: 16px;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
  min-width: 200px;
  z-index: 10;
}

.units-switch-btn {
  background: transparent;
  border: none;
  color: var(--neutral-200);
  font-weight: 600;
  text-align: left;
  padding: 8px 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.hidden{
    display: none;
}

.units-switch-btn:hover {
    padding-left: 8px;
    border-radius: 5px;
  background-color: hsl(240, 6%, 70%, 0.2);
}

.units-divider {
  height: 1px;
  background: var(--neutral-600);
  margin: 4px 0;
}

.units-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.units-subtitle {
  font-weight: 600;
  color: var(--neutral-300);
  margin-bottom: 4px;
}

.units-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  position: relative;
  justify-content: space-between;
  color: var(--neutral-200);
  transition: color 0.2s ease;
}

.units-option:hover {
  color: var(--neutral-0);
}

.units-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.units-option input[type="radio"]:checked ~ .checkmark {
  opacity: 1;
}

.units-option input[type="radio"]:checked ~ span:not(.checkmark) {
  color: var(--neutral-0);
  font-weight: 600;
}

/* ============================
   RECHERCHE ET SUGGESTIONS
   ============================ */
.search-wrap {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  position: relative;
  flex-wrap: wrap;
}

.search-input {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--glass);
  padding: 12px 14px;
  border-radius: 12px;
  width: 450px;
  max-width: 100%;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  position: relative;
  flex: 1;
  min-width: 250px;
}

.search-input:hover{
    background: var(--neutral-600);
}

.search-input:focus{
    border: 2px solid var(--neutral-0);
}

.search-input input {
  background: transparent;
  border: 0;
  color: var(--neutral-0);
  font-size: 16px;
  outline: none;
  border: none;
  box-shadow: none;
  width: 100%;
}

.search-input input::placeholder {
  color: var(--neutral-300);
}

.icon-search {
  width: 18px;
  opacity: 0.95;
}

.btn {
  border: 0;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  white-space: nowrap;
}

.btn.primary {
  background: var(--blue-500);
  color: var(--neutral-0);
  box-shadow: 0 8px 20px rgba(74, 93, 255, 0.14);
}

.btn.primary:hover {
  background: var(--blue-700);
  transform: translateY(-2px);
}

.suggest-box {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  background: var(--neutral-700);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  z-index: 50;
  overflow: hidden;
  margin-top: 8px;
}

.suggest-header {
  padding: 12px 16px;
  font-weight: 600;
  color: var(--neutral-300);
  border-bottom: 1px solid var(--neutral-600);
  font-size: 14px;
}

.suggest-items {
  max-height: 300px;
  overflow-y: auto;
}

.suggest-item {
  padding: 12px 16px;
  cursor: pointer;
  color: var(--neutral-200);
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.suggest-item:hover, .suggest-item.highlight {
  background: var(--neutral-600);
  color: var(--neutral-0);
}

.suggest-item-icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.suggest-no-results {
  padding: 12px 16px;
  color: var(--neutral-300);
  text-align: center;
  font-size: 14px;
}

.suggest-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  color: #666;
  font-size: 14px;
}

.loading-icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  animation: spin 1s linear infinite;
}

.suggest-items:empty + .suggest-loading {
  display: flex;
}

/* ============================
   CARTE PRINCIPALE
   ============================ */
.main-card {
  border-radius: 24px;
  padding: 28px;
  color: var(--neutral-0);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 220px;
  background-image: url("assets/images/bg-today-large.svg");
  background-size: cover;
  background-position: center;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

.main-left, .main-right {
  display: flex;
  flex-direction: column;
}

.location {
  font-weight: 700;
  font-size: clamp(1.125rem, 3vw, 1.25rem);
  margin-bottom: 4px;
}

.date {
  opacity: 0.95;
  font-size: clamp(0.875rem, 2vw, 1rem);
}

.weather-icon {
  width: clamp(60px, 15vw, 86px);
  height: clamp(60px, 15vw, 86px);
  object-fit: contain;
}

.temp {
  font-size: clamp(2.5rem, 10vw, 4.5rem);
  font-weight: 700;
  text-align: right;
  font-style: italic;
}

/* ============================
   MÉTRIQUES
   ============================ */
.metrics-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.metric {
  background: var(--neutral-700);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(2, 6, 20, 0.45);
  flex: 1;
  min-width: 160px;
}

.metric-title {
  color: var(--neutral-300);
  font-size: 14px;
  margin-bottom: 8px;
}

.metric-value {
  font-weight: 700;
  font-size: clamp(1.125rem, 3vw, 1.375rem);
  color: var(--neutral-0);
}

/* ============================
   SECTION TITRES
   ============================ */
.section-title {
  color: var(--neutral-0);
  font-weight: 700;
  font-size: clamp(1.125rem, 3vw, 1.25rem);
  margin-bottom: 12px;
}

/* ============================
   PREVISIONS QUOTIDIENNES
   ============================ */
.daily-list {
  display: flex;
  gap: 12px;
  overflow: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--neutral-600) transparent;
}

.daily-list::-webkit-scrollbar {
  height: 6px;
}

.daily-list::-webkit-scrollbar-track {
  background: transparent;
}

.daily-list::-webkit-scrollbar-thumb {
  background: var(--neutral-600);
  border-radius: 3px;
}

.day-card {
  min-width: 97px;
  background: var(--neutral-700);
  border-radius: 7px;
  padding: 12px;
  text-align: center;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.day-card:hover {
  transform: translateY(-4px);
  background: var(--neutral-600);
}

.day-card small {
  color: var(--neutral-300);
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
}

.day-card img {
  width: 40px;
  height: 40px;
  margin: 8px auto;
  display: block;
}

.day-card div {
  display: flex;
  font-size: 14px;
  justify-content: space-between;
}

.day-card strong {
  font-weight: 700;
  color: var(--neutral-0);
}

.day-card span {
  color: var(--neutral-300);
}

/* ============================
   COLONNE DE DROITE
   ============================ */
.right-col {
  background: var(--neutral-700);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--card-shadow);
}

.hourly-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.hourly-header h3{
  font-size: clamp(1rem, 2vw, 1.0625rem);
}

.hourly-header select {
  background: var(--neutral-800);
  color: var(--neutral-0);
  border: 1px solid var(--neutral-600);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  min-width: 150px;
}

.hourly-list {
  max-height: 485px;
  overflow: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--neutral-600) transparent;
}

.hourly-list::-webkit-scrollbar {
  width: 6px;
}

.hourly-list::-webkit-scrollbar-track {
  background: transparent;
}

.hourly-list::-webkit-scrollbar-thumb {
  background: var(--neutral-600);
  border-radius: 3px;
}

.hour-row {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
  border-radius: 10px;
  display: flex;
  font-size: 14px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.hour-row > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hour-row img {
  width: 30px;
  height: 30px;
}

.hour-row small {
  color: var(--neutral-300);
}

/* ============================
   BOÎTE D'ERREUR
   ============================ */
.error-box {
  border-radius: 18px;
  padding: 28px;
  text-align: center;
  color: var(--neutral-0);
  max-width: 500px;
  margin: 5% auto;
}

.error-ico {
  width: 52px;
  display: block;
  margin: 0 auto 12px;
}

.error-box h2 {
  margin: 12px 0;
  color: var(--neutral-0);
  font-size: clamp(1.25rem, 4vw, 1.5rem);
}

.error-box p {
  margin: 20px 0;
  color: var(--neutral-300);
  font-size: clamp(0.875rem, 2vw, 1rem);
}

.btn.retry {
  background: var(--neutral-700);
  color: var(--neutral-0);
  margin: 0 auto;
}

.btn.retry:hover {
  background: var(--blue-700);
}

/* ============================
   PIED DE PAGE
   ============================ */
.attribution {
  padding: 26px 0;
  text-align: center;
  color: var(--neutral-300);
  font-size: 13px;
}

.attribution a {
  color: var(--blue-500);
  text-decoration: none;
}

.attribution a:hover {
  text-decoration: underline;
}

button,select,input{
    font-family: "DM Sans", sans-serif;
}

/* ============================
   ÉTATS FOCUS
   ============================ */
.search-input:focus-within,  
.units-switch-btn:focus,
.units-btn:focus,
select:focus,
.day-card:focus {
  outline: 2px solid var(--neutral-200);
  outline-offset: 2px;
  border-radius: 5px;
}

.btn.primary:focus {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

/* ============================
   ANIMATIONS
   ============================ */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================
   RESPONSIVITÉ - TABLETTES (768px - 1024px)
   ============================ */
@media (max-width: 1024px) {
  .wrap {
    padding: 0 20px 60px;
    margin: 20px auto;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
  }
  
  .right-col {
    order: 1; /* Remettre à la fin */
    width: 100%;
  }
  
  .search-input {
    width: 100%;
    max-width: 100%;
  }
  
  .btn.primary {
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }
  
  .metrics-row {
    gap: 12px;
    width: 100%;
  }
  
  .metric {
    min-width: calc(50% - 6px);
    flex: 1;
  }
}

/* ============================
   RESPONSIVITÉ - MOBILES (480px - 768px)
   ============================ */
@media (max-width: 768px) {
  .wrap {
    padding: 0 12px 30px;
    margin: 12px auto;
    width: 100%;
    box-sizing: border-box;
  }
  
  .hero {
    margin: 1rem 0 1.2rem;
    font-size: clamp(1.4rem, 6vw, 1.8rem);
    line-height: 1.2;
    word-wrap: break-word;
  }
  
  .topbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin: 1rem 0;
    width: 100%;
    flex-wrap: nowrap;
  }
  
  .brand {
    flex: 0 0 auto;
  }
  
  .brand-logo {
    width: 120px; /* Ajusté pour mobile */
    height: auto;
  }
  
  .controls {
    flex: 0 0 auto;
    align-self: center;
  }
  
  .units-btn {
    padding: 6px 8px;
    font-size: 12px;
    min-width: auto;
  }
  
  .units-btn span {
    display: none;
  }
  
  .search-wrap {
    margin-bottom: 1rem;
    width: 100%;
    position: relative;
  }
  
  .search-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .btn.primary {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
  
  /* Grille principale */
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
  }
  
  .right-col {
    order: 1; /* Mettre en dernier comme sur la maquette */
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Carte principale - CORRECTION DU DÉBORDEMENT */
  .main-card {
    flex-direction: column;
    padding: 16px;
    min-height: auto;
    background-image: url("assets/images/bg-today-small.svg");
    margin-bottom: 1rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .main-left, .main-right {
    flex: none;
    width: 100%;
    text-align: center;
  }

  .main-right{
    gap: 20px;
    display: flex;
    margin-top: 20px;
    flex-direction: row;
    justify-content: center;
  }
  
  .location {
    font-size: 1.1rem;
    margin-bottom: 4px;
    word-wrap: break-word;
  }
  
  .date {
    font-size: 0.8rem;
  }
  
  .weather-icon {
    width: 50px;
    height: 50px;
  }
  
  .temp {
    font-size: 2.2rem;
    text-align: center;
    word-wrap: break-word;
  }
  
  /* Métriques en grille 2x2 - CORRECTION DU DÉBORDEMENT */
  .metrics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 1.2rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .metric {
    min-width: auto;
    padding: 10px 8px;
    text-align: center;
    box-sizing: border-box;
    flex: none;
  }
  
  .metric-title {
    font-size: 0.7rem;
    margin-bottom: 4px;
    word-wrap: break-word;
  }
  
  .metric-value {
    font-size: 1.1rem;
    word-wrap: break-word;
  }
  
  /* Prévisions quotidiennes - DISPOSITION 3-3-1 */
  .section-title {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
  }
  
  .daily-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 1.2rem;
    width: 100%;
    overflow: visible;
    padding-bottom: 0;
  }
  
  .day-card {
    min-width: auto;
    width: 100%;
    padding: 8px 4px;
    box-sizing: border-box;
  }
  
  .day-card small {
    font-size: 0.7rem;
    margin-bottom: 4px;
  }
  
  .day-card img {
    margin: 4px auto;
  }
  
  .day-card div {
    font-size: 0.75rem;
    padding: 0 0.5rem;
  }
  
  /* Prévisions horaires - CORRECTION DU DÉBORDEMENT */
  .right-col {
    padding: 12px;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .hourly-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    width: 100%;
    flex-wrap: wrap;
  }
  
  .hourly-header h3 {
    font-size: 1rem;
    margin: 0;
    flex: 1;
  }
  
  .hourly-header select {
    min-width: 110px;
    font-size: 0.8rem;
    padding: 5px 8px;
    flex: 0 0 auto;
  }
  
  .hourly-list {
    max-height: 280px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .hour-row {
    padding: 8px 10px;
    margin-bottom: 6px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .hour-time {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
  }
  
  .hour-time img {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
  }
  
  .hour-time span {
    font-size: 0.8rem;
    flex: 0 0 auto;
  }
  
  .hour-temp {
    font-size: 0.9rem;
    font-weight: 600;
    flex: 0 0 auto;
  }
}

/* ============================
   RESPONSIVITÉ - PETITS MOBILES (< 480px)
   ============================ */
@media (max-width: 480px) {
  .wrap {
    padding: 0 10px 20px;
    margin: 8px auto;
  }
  
  .hero {
    margin: 1.5rem 0rem;
    font-size: 1.7rem;
  }
  
  .topbar {
    margin-bottom: 0.8rem;
    gap: 6px;
  }
  
  .units-btn {
    padding: 5px 6px;
    font-size: 11px;
  }
  
  .search-wrap {
    margin-bottom: 0.8rem;
  }
  
  .main-card {
    padding: 12px;
    min-height: auto;
    border-radius: 12px;
  }
  
  .location {
    font-size: 0.9rem;
  }
  
  .date {
    font-size: 0.7rem;
  }
  
  .weather-icon {
    width: 70px;
    height: 70px;
  }
  
  .temp {
    font-size: 3.2rem;
  }
  
  .metrics-row {
    gap: 6px;
    margin-bottom: 1rem;
  }
  
  .metric {
    padding: 8px 6px;
  }
  
  .metric-title {
    font-size: 0.65rem;
  }
  
  .metric-value {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
  }
  
  .daily-list {
    gap: 10px;
    margin-bottom: 1rem;
  }
  
  .day-card {
    padding: 6px 3px;
  }
  
  .day-card small {
    font-size: 0.65rem;
  }
  
  .day-card img {
    width: 50px;
    height: 50px;
  }
  
  .day-card div {
    font-size: 0.7rem;
  }
  
  .right-col {
    padding: 10px;
  }
  
  .hourly-header h3 {
    font-size: 0.9rem;
  }
  
  .hourly-header select {
    min-width: 100px;
    font-size: 0.75rem;
    padding: 4px 6px;
  }
  
  .hour-row {
    padding: 6px 8px;
    margin-bottom: 4px;
  }
  
  .hour-time img {
    width: 20px;
    height: 20px;
  }
  
  .hour-time span {
    font-size: 0.75rem;
  }
  
  .hour-temp {
    font-size: 0.8rem;
  }
}

/* ============================
   CORRECTIONS SPÉCIFIQUES POUR LA SUGGEST BOX MOBILE
   ============================ */
@media (max-width: 768px) {
  .suggest-box {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 50%;
    width: calc(100% - 20px);
    max-width: none;
    transform: none;
    border-radius: 12px 12px 0 0;
    margin-top: 0;
  }
  
  .suggest-items {
    max-height: 50vh;
  }
  
  .suggest-item {
    padding: 14px 16px;
    font-size: 0.9rem;
  }
  
}

/* ============================
   CORRECTIONS SUPPLÉMENTAIRES CONTRE LE DÉBORDEMENT
   ============================ */
@media (max-width: 768px) {
  /* Empêcher le débordement horizontal */
  body {
    overflow-x: hidden;
    width: 100%;
  }
  
  /* Assurer que tous les éléments respectent la largeur */
  .grid > * {
    max-width: 100%;
    overflow: hidden;
  }
  
  /* Correction spécifique pour les cartes quotidiennes */
  .daily-list {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Pour les très petits écrans, passer à 2 colonnes */
  @media (max-width: 360px) {
    .daily-list {
      grid-template-columns: repeat(3, 1fr);
    }
    
    .metrics-row {
      grid-template-columns: 1fr 1fr;
      gap: 6px;
    }
  }
  
  /* Ajustement fin pour les écrans très étroits */
  @media (max-width: 320px) {
    .wrap {
      padding: 0 8px 15px;
    }
    
    .daily-list {
      grid-template-columns: 1fr 1fr 1fr;
    }
    
    .hourly-header {
      flex-direction: column;
      align-items: stretch;
      gap: 8px;
    }
    
    .hourly-header select {
      width: 100%;
    }
  }
}

/* ============================
   GARANTIR L'ABSENCE DE DÉBORDEMENT
   ============================ */
* {
  max-width: 100%;
}

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

/* ============================
   ANIMATIONS CORRIGÉES
   ============================ */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-icon img {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}