/* ========================================
   ARCHITECTURE CSS RESPONSIVE MATIIOU BARBER
   ======================================== */

/* VARIABLES CSS POUR LA COHÉRENCE */
:root {
  --primary-color: #5e493a;
  --background-color: wheat;
  --text-color: rgb(97, 96, 96);
  --border-color: black;
  --white: white;
  --transition: 0.3s ease;

  /* Espacements responsive */
  --section-padding: 8%;
  --section-padding-mobile: 5%;
  --gap-desktop: 35px;
  --gap-tablet: 25px;
  --gap-mobile: 15px;
}

/* ========================================
   STYLES DE BASE RESPONSIVE
   ======================================== */

/* Images fluides globales */
img {
  max-width: 100%;
  height: auto;
}

/* Prévention du débordement horizontal */
html,
body {
  overflow-x: hidden;
  width: 100%;
}

/* Container flexible pour les sections */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--section-padding);
}

/* ========================================
   MENU BURGER - NAVIGATION MOBILE/TABLETTE
   ======================================== */

/* Bouton menu burger - caché par défaut */
.menu-burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  border-radius: 4px;
  transition: all 0.3s ease;
  background-color: transparent;
  border: none;
}

.menu-burger:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.menu-burger:active {
  transform: scale(0.95);
}

.menu-burger span {
  width: 25px;
  height: 3px;
  background-color: #000000;
  margin: 3px 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
  border-radius: 2px;
}

/* Animation du burger en croix - Améliorée */
.menu-burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
  background-color: #5e493a;
}

.menu-burger.active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.menu-burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
  background-color: #5e493a;
}

/* Navigation mobile overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
  display: block;
  opacity: 1;
}

/* Menu mobile */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background-color: var(--background-color);
  border-left: 1px solid var(--border-color);
  padding: 80px 20px 20px;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

/* Bouton fermer le menu */
.btn-close-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-close-menu i {
  font-size: 20px;
  color: #5e493a;
}

.btn-close-menu:hover {
  background: rgba(94, 73, 58, 0.15);
  transform: rotate(90deg);
}

.btn-close-menu:active {
  transform: rotate(90deg) scale(0.95);
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav li {
  margin-bottom: 20px;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
}

.mobile-nav.active li {
  opacity: 1;
  transform: translateX(0);
}

.mobile-nav.active li:nth-child(1) {
  transition-delay: 0.1s;
}
.mobile-nav.active li:nth-child(2) {
  transition-delay: 0.2s;
}
.mobile-nav.active li:nth-child(3) {
  transition-delay: 0.3s;
}

.mobile-nav a {
  display: block;
  padding: 15px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 14px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.mobile-nav a::before {
  content: "";
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(94, 73, 58, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.mobile-nav a:hover::before {
  left: 100%;
}

.mobile-nav a:hover {
  color: var(--primary-color);
  padding-left: 15px;
}

/* ========================================
   MENU MOBILE - DESIGN ÉPURÉ
   ======================================== */

/* Section utilisateur */
.mobile-user-section {
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

/* Carte utilisateur connecté */
.mobile-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-user-avatar {
  width: 45px;
  height: 45px;
  background: #5e493a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 600;
}

.mobile-user-info {
  display: flex;
  flex-direction: column;
}

.mobile-user-name {
  font-weight: 600;
  font-size: 15px;
  color: #5e493a;
}

.mobile-user-email {
  font-size: 12px;
  color: var(--text-color);
  opacity: 0.7;
}

/* Boutons auth (non connecté) */
.mobile-auth-buttons {
  display: flex;
  gap: 10px;
}

.mobile-btn-login,
.mobile-btn-register {
  flex: 1;
  padding: 12px 15px;
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.mobile-btn-login {
  background: #5e493a;
  color: white !important;
}

.mobile-btn-login:hover {
  background: #3d2e26;
}

.mobile-btn-register {
  background: transparent;
  color: #5e493a !important;
  border: 1px solid #5e493a;
}

.mobile-btn-register:hover {
  background: #5e493a;
  color: white !important;
}

/* Liens de navigation */
.mobile-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-links li {
  opacity: 0;
  transform: translateX(15px);
  transition: all 0.3s ease;
}

.mobile-nav.active .mobile-nav-links li {
  opacity: 1;
  transform: translateX(0);
}

.mobile-nav.active .mobile-nav-links li:nth-child(1) {
  transition-delay: 0.05s;
}
.mobile-nav.active .mobile-nav-links li:nth-child(2) {
  transition-delay: 0.1s;
}
.mobile-nav.active .mobile-nav-links li:nth-child(3) {
  transition-delay: 0.15s;
}
.mobile-nav.active .mobile-nav-links li:nth-child(4) {
  transition-delay: 0.2s;
}

.mobile-nav-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 15px;
  color: var(--text-color);
  transition: all 0.2s ease;
}

.mobile-nav-links a i {
  width: 20px;
  color: #5e493a;
  font-size: 16px;
}

.mobile-nav-links a:hover {
  color: #5e493a;
  padding-left: 10px;
}

/* Section compte */
.mobile-account-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-section-title {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-color);
  opacity: 0.5;
  margin-bottom: 10px;
}

/* Lien déconnexion */
.mobile-nav-links a.logout-link {
  color: #dc3545;
}

.mobile-nav-links a.logout-link i {
  color: #dc3545;
}

.mobile-nav-links a.logout-link:hover {
  color: #a71d2a;
}

/* ========================================
   FIXES POUR LA STRUCTURE HOME EXISTANTE
   ======================================== */

/* Reset des styles absolus sur mobile/tablette */
@media screen and (max-width: 1023px) {
  /* IMPORTANT: La section home doit avoir une hauteur auto pour s'adapter au contenu */
  .home {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  /* Reset du conteneur home_right */
  .home_right {
    position: relative;
    overflow: visible !important;
    height: auto !important;
  }

  /* Image par défaut - visible par défaut */
  #home-default-img.home-content {
    position: static !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100%;
    height: auto;
    min-height: 300px;
    object-fit: cover;
  }

  /* Cacher l'image quand un panneau est actif */
  #home-default-img.home-content.hidden,
  .home_right:has(.home_book.active) #home-default-img,
  .home_right:has(.home_about-me.active) #home-default-img {
    display: none !important;
  }

  /* Panneaux réservation et confirmation - CACHÉS par défaut */
  .home_about-me.home-content,
  .home_book.home-content {
    position: static !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 100% !important;
    height: auto !important;
    margin-top: 20px;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    z-index: 10;
  }

  /* Panneaux ACTIFS - visibles et dans le flux */
  .home_about-me.home-content.active,
  .home_book.home-content.active {
    display: flex !important;
    flex-direction: column;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
    z-index: 10;
    animation: slideDownMobile 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  /* S'assurer que les images dans les panneaux ne débordent pas */
  .home_about-me.home-content img,
  .home_book.home-content img {
    position: static !important;
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
  }

  /* Animation d'apparition fluide */
  @keyframes slideDownMobile {
    from {
      opacity: 0;
      transform: translateY(-30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ========================================
   RESPONSIVE BREAKPOINTS CORRIGÉS
   ======================================== */

/* ========================================
   TABLETTE (768px - 1023px)
   ======================================== */
@media screen and (max-width: 1023px) {
  /* Variables ajustées pour tablette */
  :root {
    --section-padding: 6%;
    --gap-desktop: 25px;
  }

  /* HEADER TABLETTE */
  header {
    margin: 0 var(--section-padding);
    flex-wrap: wrap;
    position: relative;
  }

  .header_logo {
    height: 80px;
  }

  .header_logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
  }

  /* Navigation cachée, burger visible */
  .header_menu {
    display: none;
  }

  .menu-burger {
    display: flex;
  }

  .header_buttons {
    display: none;
  }

  /* HOME SECTION TABLETTE */
  .home {
    flex-direction: column;
    height: auto;
    padding: 40px var(--section-padding);
    gap: 40px;
    align-items: stretch;
  }

  .home_left {
    width: 100%;
    height: auto;
    order: 1;
    text-align: center;
  }

  .home_right {
    width: 100%;
    height: auto;
    min-height: 0;
    margin-left: 0;
    order: 2;
    overflow: visible;
  }

  /* Styles déplacés dans la section FIXES plus haut */

  /* Titres adaptés */
  .title {
    font-size: 45px;
    text-align: center;
  }

  /* Boutons responsive */
  .home_button {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .home_button button,
  .home_about-me button,
  .home_book button {
    width: 100%;
    padding: 15px 20px;
    font-size: 14px;
  }

  /* SERVICES SECTION TABLETTE */
  .services {
    padding: 40px var(--section-padding);
  }

  .services .title {
    text-align: center;
  }

  .services p {
    text-align: center;
  }

  .services_product {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 200px);
    gap: 15px;
    height: auto;
  }

  /* Reset des grid-area pour tablette */
  .div1 {
    grid-area: 1 / 1 / 2 / 2;
  }

  .div2 {
    grid-area: 1 / 2 / 2 / 3;
  }

  .div3 {
    grid-area: 2 / 1 / 3 / 2;
  }

  .div4 {
    grid-area: 2 / 2 / 3 / 3;
  }

  .div5 {
    grid-area: 3 / 1 / 4 / 2;
  }

  .div6 {
    grid-area: 3 / 2 / 4 / 3;
  }

  .div7 {
    grid-area: 4 / 1 / 5 / 3;
  }

  .services_product span {
    font-size: 24px;
  }

  /* SERVICES PAGE (TARIFS) TABLETTE */
  .services-section {
    padding: 40px 5%;
  }

  .header-prestations h1 {
    font-size: 2em;
  }

  .tarifs {
    padding: 40px 5%;
  }

  .tarifs h2 {
    font-size: 2em;
  }

  .tarif-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tarif-card {
    padding: 25px 20px;
  }

  .tarif-card li {
    font-size: 0.9em;
    gap: 10px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-card {
    padding: 30px 20px;
  }

  /* TESTIMONIALS TABLETTE */
  .testimonial-content > div:first-child {
    flex-direction: column;
    gap: 20px;
  }

  .testimonial-item {
    margin: 0;
    width: 100%;
  }

  /* FOOTER TABLETTE */
  footer {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 30px;
    padding: 30px var(--section-padding);
  }

  .col1 {
    grid-area: 1 / 1 / 2 / 2;
  }

  .col2 {
    grid-area: 1 / 2 / 2 / 3;
  }

  .col3 {
    grid-area: 2 / 1 / 3 / 2;
  }

  .col4 {
    grid-area: 2 / 2 / 3 / 3;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-bottom {
    grid-area: 3 / 1 / 4 / 3;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }

  .col4 button {
    width: 120px;
    height: 120px;
    font-size: 24px;
    margin-bottom: 20px;
  }
}

/* ========================================
   MOBILE (jusqu'à 767px)
   ======================================== */
@media screen and (max-width: 767px) {
  /* Variables ajustées pour mobile */
  :root {
    --section-padding: var(--section-padding-mobile);
    --gap-desktop: var(--gap-mobile);
  }

  /* TYPOGRAPHY MOBILE */
  .title {
    font-size: 32px;
    line-height: 1.2;
    text-align: center;
    margin-bottom: 20px;
  }

  p {
    font-size: 14px;
    line-height: 1.6;
    margin: 15px 0;
  }

  a {
    font-size: 13px;
  }

  /* HEADER MOBILE */
  header {
    margin: 0 var(--section-padding);
    padding: 15px 0;
  }

  .header_logo {
    height: 70px;
  }

  .header_logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
  }

  /* NAVIGATION MOBILE */
  .mobile-nav {
    width: 90%;
    max-width: 280px;
  }

  /* HOME SECTION MOBILE */
  .home {
    padding: 30px var(--section-padding);
    gap: 30px;
    flex-direction: column;
  }

  .home_left {
    text-align: center;
    width: 100%;
  }

  /* Styles home_about-me et home_book gérés dans la section FIXES */

  .home_right {
    height: auto;
    min-height: 250px;
    order: 2;
    overflow: visible;
  }

  .home_button {
    gap: 12px;
  }

  .home_button button,
  .home_about-me button,
  .home_book button {
    padding: 12px 15px;
    font-size: 12px;
    letter-spacing: 1px;
  }

  /* SECTIONS GÉNÉRALES MOBILE */
  .gallery-section,
  .testimonials-section {
    padding: 30px var(--section-padding);
  }

  .gallery-content,
  .testimonial-content {
    padding: 20px 15px;
  }

  /* SERVICES MOBILE */
  .services {
    padding: 30px var(--section-padding);
  }

  .services .title {
    text-align: center;
    font-size: 28px;
  }

  .services p {
    text-align: center;
  }

  .services_product {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(7, 180px);
    gap: 12px;
    height: auto;
  }

  /* Reset des grid-area pour mobile - une seule colonne */
  .div1 {
    grid-area: 1 / 1 / 2 / 2;
  }

  .div2 {
    grid-area: 2 / 1 / 3 / 2;
  }

  .div3 {
    grid-area: 3 / 1 / 4 / 2;
  }

  .div4 {
    grid-area: 4 / 1 / 5 / 2;
  }

  .div5 {
    grid-area: 5 / 1 / 6 / 2;
  }

  .div6 {
    grid-area: 6 / 1 / 7 / 2;
  }

  .div7 {
    grid-area: 7 / 1 / 8 / 2;
  }

  .services_product span {
    font-size: 20px;
  }

  /* SERVICES PAGE (TARIFS) MOBILE */
  .services-section {
    padding: 30px 15px;
  }

  .header-prestations {
    padding: 30px 15px;
  }

  .header-prestations h1 {
    font-size: 1.6em;
  }

  .header-prestations p {
    font-size: 0.95em;
  }

  .book-button {
    padding: 12px 20px;
    font-size: 0.9em;
  }

  .intro {
    padding: 20px 15px;
  }

  .intro p {
    font-size: 0.95em;
  }

  .tarifs {
    padding: 30px 15px;
    margin: 20px 0;
  }

  .tarifs h2 {
    font-size: 1.5em;
    margin-bottom: 30px;
  }

  .tarif-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .tarif-card {
    padding: 20px 15px;
    border-radius: 12px;
  }

  .tarif-card li {
    padding: 12px 5px;
    font-size: 0.85em;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .tarif-card li .prestation-nom {
    flex: 1;
    word-break: break-word;
  }

  .tarif-card li .prestation-prix {
    padding: 4px 10px;
    font-size: 0.9em;
    min-width: 50px;
  }

  .services-speciaux {
    padding: 30px 15px;
  }

  .services-speciaux h2 {
    font-size: 1.5em;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .service-card {
    padding: 25px 15px;
  }

  .service-card i {
    font-size: 2.5em;
  }

  .service-card h4 {
    font-size: 1.2em;
  }

  .service-card p {
    font-size: 0.9em;
  }

  /* TESTIMONIALS MOBILE */
  .testimonial-item {
    padding: 15px;
    margin-bottom: 15px;
  }

  .opinion {
    padding: 20px 15px;
  }

  .opinion textarea {
    padding: 12px;
    font-size: 14px;
  }

  .opinion button {
    padding: 12px 25px;
    font-size: 12px;
  }

  /* FOOTER MOBILE */
  footer {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, auto);
    gap: 25px;
    padding: 25px var(--section-padding);
  }

  .col1 {
    grid-area: 1 / 1 / 2 / 2;
    text-align: center;
  }

  .col2 {
    grid-area: 2 / 1 / 3 / 2;
    text-align: center;
  }

  .col3 {
    grid-area: 3 / 1 / 4 / 2;
    text-align: center;
  }

  .col4 {
    grid-area: 4 / 1 / 5 / 2;
    left: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-bottom {
    grid-area: 5 / 1 / 6 / 2;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.8rem;
  }

  /* Newsletter mobile */
  .newsletter-content {
    flex-direction: column;
    gap: 10px;
  }

  .footer-newsletter button {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
  }

  /* Icônes sociales mobile */
  .icons {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .icons i {
    width: 45px;
    height: 45px;
    margin-right: 0;
  }

  /* Bouton retour en haut mobile */
  .col4 button {
    width: 100px;
    height: 100px;
    font-size: 20px;
    margin-bottom: 15px;
  }
}

/* ========================================
   MOBILE TRÈS PETIT (max-width: 480px)
   ======================================== */
@media screen and (max-width: 480px) {
  :root {
    --section-padding: 4%;
  }

  .title {
    font-size: 28px;
  }

  .header_logo {
    height: 60px;
  }

  .header_logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
  }

  .home {
    padding: 20px var(--section-padding);
    gap: 25px;
  }

  .home_right {
    height: 200px;
  }

  .home_button button,
  .home_about-me button,
  .home_book button {
    padding: 10px 12px;
    font-size: 11px;
  }

  .mobile-nav {
    width: 95%;
  }

  .services_product {
    grid-template-rows: repeat(7, 160px);
  }

  .col4 button {
    width: 80px;
    height: 80px;
    font-size: 18px;
  }

  /* SERVICES PAGE (TARIFS) TRÈS PETIT ÉCRAN */
  .header-prestations h1 {
    font-size: 1.4em;
  }

  .tarifs h2 {
    font-size: 1.3em;
  }

  .tarif-card li {
    padding: 10px 3px;
    font-size: 0.8em;
  }

  .tarif-card li .prestation-prix {
    padding: 3px 8px;
    font-size: 0.85em;
    min-width: 45px;
  }
}

/* ========================================
   AMÉLIORATIONS DE L'EXPÉRIENCE UTILISATEUR
   ======================================== */

/* Transitions fluides pour les interactions */
.home_button button,
.home_about-me button,
.home_book button,
.opinion button,
.footer-newsletter button {
  transition: all var(--transition);
}

/* Hover states adaptés au mobile (pas de hover sur touch) */
@media (hover: hover) {
  .home_button button:hover,
  .home_about-me button:hover,
  .home_book button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
}

/* États actifs pour mobile */
.home_button button:active,
.home_about-me button:active,
.home_book button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   STYLES POUR LES FORMULAIRES RESPONSIVE
   ======================================== */

/* Formulaires adaptatifs */
form {
  width: 100%;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--transition);
}

@media screen and (max-width: 767px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  textarea,
  select {
    padding: 14px;
    font-size: 16px; /* Évite le zoom sur iOS */
  }
}

/* ========================================
   UTILITAIRES RESPONSIVE
   ======================================== */

/* Classes utilitaires pour masquer/afficher selon l'écran */
.hidden-mobile {
  display: block;
}

.hidden-tablet {
  display: block;
}

.hidden-desktop {
  display: none;
}

@media screen and (max-width: 1023px) {
  .hidden-tablet {
    display: none;
  }

  .show-tablet {
    display: block;
  }
}

@media screen and (max-width: 767px) {
  .hidden-mobile {
    display: none;
  }

  .show-mobile {
    display: block;
  }
}

/* Classes pour l'espacement responsive */
.spacing-mobile {
  margin: var(--gap-mobile);
}

.spacing-tablet {
  margin: var(--gap-tablet);
}

.spacing-desktop {
  margin: var(--gap-desktop);
}

/* ========================================
   OPTIMISATIONS POUR LES PERFORMANCES
   ======================================== */

/* Optimisation des images */
img {
  image-rendering: -webkit-optimize-contrast; /* Optimise la qualité sur les navigateurs WebKit */
}

/* Optimisation des transformations */
.menu-burger span,
.mobile-nav,
.user-dropdown-menu {
  will-change: transform;
}

/* Lazy loading pour les images */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* ========================================
   RESPONSIVE Profile.php
   ======================================== */
@media screen and (max-width: 768px) {
  .profile-container {
    padding: 20px 15px;
  }

  .profile-avatar {
    width: 80px;
    height: 80px;
    font-size: 32px;
  }

  .profile-header h1 {
    font-size: 24px;
  }

  .section-header {
    padding: 15px 20px;
  }

  .section-header h2 {
    font-size: 18px;
  }

  .profile-form {
    padding: 20px;
  }

  .form-group input {
    padding: 12px 14px;
    font-size: 16px; /* Évite le zoom sur iOS */
  }

  .input-with-icon input {
    padding-left: 42px;
  }

  .security-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
  }

  .btn-security {
    width: 100%;
    text-align: center;
  }
}

@media screen and (max-width: 480px) {
  .profile-header h1 {
    font-size: 20px;
  }

  .form-group label {
    font-size: 12px;
  }

  .btn-update {
    padding: 14px;
    font-size: 15px;
  }
}
