:root{
  --bg:#000;
  --gold:#d4af37;
  --text:#e8d085;
  --maxw:1100px;
  --card-bg:rgba(212,175,55,0.08);
}

*{box-sizing:border-box;margin:0;padding:0}

html,body{
  height:100%;
  overflow-x:hidden;
}

body{
  display:flex;
  flex-direction:column;
  background:#000;
  color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  position:relative;
}

/* Gradient animé élégant */
body::before{
  content:'';
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:
    linear-gradient(125deg, 
      transparent 0%,
      rgba(212,175,55,0.03) 20%,
      transparent 40%,
      rgba(212,175,55,0.05) 60%,
      transparent 80%,
      rgba(212,175,55,0.02) 100%
    );
  background-size:200% 200%;
  z-index:-2;
  animation:gradientShift 20s ease infinite;
}

@keyframes gradientShift{
  0%{background-position:0% 50%}
  50%{background-position:100% 50%}
  100%{background-position:0% 50%}
}

/* Lignes obliques dorées qui bougent */
body::after{
  content:'';
  position:fixed;
  top:-50%;
  left:-50%;
  width:200%;
  height:200%;
  background:repeating-linear-gradient(
    45deg,
    transparent,
    transparent 150px,
    rgba(212,175,55,0.02) 150px,
    rgba(212,175,55,0.02) 152px,
    transparent 152px,
    transparent 300px
  );
  z-index:-1;
  animation:lineMove 30s linear infinite;
}

@keyframes lineMove{
  0%{transform:translate(0, 0)}
  100%{transform:translate(100px, 100px)}
}

/* MENU centré avec animation d'entrée */
.topbar{
  max-width:var(--maxw);
  margin:18px auto 20px;
  padding:0 14px;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:18px;
  color:var(--gold);
  font-weight:700;
  text-align:center;
  animation:slideDown 0.6s ease-out;
  flex-wrap:wrap;
}

@keyframes slideDown{
  from{opacity:0;transform:translateY(-20px)}
  to{opacity:1;transform:translateY(0)}
}

.topbar a{
  color:var(--gold);
  text-decoration:none;
  line-height:1.1;
  transition:all 0.3s ease;
  padding:8px 12px;
  border-radius:4px;
  font-size:14px;
}

.topbar a:hover{
  background:rgba(212,175,55,0.15);
  transform:translateY(-2px);
}

/* Conteneur page */
.page{
  flex:1;
  max-width:var(--maxw);
  margin:0 auto;
  padding:0 14px 60px;
  width:100%;
}

/* Barre de langues */
.langbar{
  display:flex;
  gap:12px;
  justify-content:center;
  align-items:center;
  margin:24px 0 32px;
  animation:fadeIn 0.8s ease-out 0.4s backwards;
  flex-wrap:wrap;
}

@keyframes fadeIn{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:translateY(0)}
}

.langbar button{
  background:rgba(15,15,15,0.6);
  color:var(--gold);
  border:2px solid rgba(212,175,55,0.3);
  border-radius:999px;
  padding:10px 20px;
  cursor:pointer;
  font-weight:800;
  letter-spacing:0.05em;
  font-size:15px;
  transition:all 0.4s cubic-bezier(0.4,0,0.2,1);
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  gap:8px;
}

.langbar button .flag{
  width:20px;
  height:14px;
  border-radius:2px;
  box-shadow:0 1px 3px rgba(0,0,0,0.3);
}

.langbar button:hover{
  border-color:var(--gold);
  transform:translateY(-3px);
  box-shadow:0 6px 20px rgba(212,175,55,0.3);
}

.langbar button.active{
  background:rgba(212,175,55,0.15);
  border-color:var(--gold);
  box-shadow:0 4px 16px rgba(212,175,55,0.25);
}

/* Contenu */
.content{
  animation:fadeIn 0.8s ease-out 0.6s backwards;
  background:var(--card-bg);
  border:2px solid rgba(212,175,55,0.2);
  border-radius:16px;
  padding:40px;
  margin-top:20px;
  position:relative;
  transition:opacity 0.3s ease, transform 0.3s ease;
}

.content h3{
  color:var(--gold);
  margin:28px 0 12px;
  font-size:22px;
  font-weight:700;
  letter-spacing:0.02em;
  padding-bottom:8px;
  border-bottom:2px solid rgba(212,175,55,0.3);
  transition:all 0.3s ease;
}

.content h3:first-child{
  margin-top:0;
}

.content h3:hover{
  color:#f0c860;
  border-bottom-color:var(--gold);
  padding-left:8px;
}

.content p{
  margin:10px 0;
  line-height:1.7;
  color:var(--text);
  font-size:16px;
}

.content strong{
  color:var(--gold);
  font-weight:700;
}

.content a{
  color:var(--gold);
  text-decoration:none;
  border-bottom:1px solid transparent;
  transition:all 0.3s ease;
}

.content a:hover{
  color:#f0c860;
  border-bottom-color:var(--gold);
}

.small{
  color:#bfae7a;
  font-size:0.9rem;
  margin-top:24px;
  display:block;
  font-style:italic;
  text-align:center;
  padding-top:16px;
  border-top:1px solid rgba(212,175,55,0.2);
}

/* Footer */
.site-footer{
  text-align:center;
  color:var(--gold);
  padding:24px 0 32px;
  font-weight:700;
  border-top:1px solid rgba(212,175,55,0.2);
  margin-top:auto;
}

/* ========================================
   RESPONSIVE - TABLETTES (< 768px)
   ======================================== */
@media(max-width:768px){
  .topbar{
    gap:14px;
    padding:0 12px;
  }
  
  .topbar a{
    padding:6px 10px;
    font-size:13px;
  }
  
  .langbar{
    gap:10px;
    margin:20px 0 28px;
  }
  
  .langbar button{
    padding:9px 18px;
    font-size:14px;
    gap:7px;
  }
  
  .langbar button .flag{
    width:18px;
    height:13px;
  }
  
  .content{
    padding:32px;
    border-radius:14px;
  }
  
  .content h3{
    font-size:20px;
    margin:24px 0 10px;
  }
  
  .content p{
    font-size:15px;
    line-height:1.65;
  }
  
  .page{
    padding:0 12px 50px;
  }
}

/* ========================================
   RESPONSIVE - SMARTPHONES (< 600px)
   ======================================== */
@media(max-width:600px){
  .topbar{
    gap:10px;
    font-size:13px;
    margin:14px auto 16px;
    padding:0 10px;
  }
  
  .topbar a{
    padding:6px 8px;
    font-size:12px;
  }
  
  .langbar{
    gap:8px;
    margin:18px 0 24px;
  }
  
  .langbar button{
    padding:8px 16px;
    font-size:13px;
    gap:6px;
  }
  
  .langbar button .flag{
    width:17px;
    height:12px;
  }
  
  .content{
    padding:24px;
    border-radius:12px;
  }
  
  .content h3{
    font-size:18px;
    margin:20px 0 10px;
  }
  
  .content p{
    font-size:14px;
    line-height:1.6;
  }
  
  .small{
    font-size:0.85rem;
    margin-top:20px;
    padding-top:14px;
  }
  
  .page{
    padding:0 10px 40px;
  }
  
  .site-footer{
    padding:20px 0 28px;
    font-size:14px;
  }
}

/* ========================================
   RESPONSIVE - PETITS TÉLÉPHONES (< 400px)
   ======================================== */
@media(max-width:400px){
  .topbar{
    gap:8px;
    margin:10px auto 12px;
    padding:0 8px;
    font-size:11px;
  }
  
  .topbar a{
    padding:5px 6px;
    font-size:10px;
    line-height:1.2;
  }
  
  .langbar{
    gap:6px;
    margin:16px 0 20px;
  }
  
  .langbar button{
    padding:7px 14px;
    font-size:12px;
    gap:5px;
    border-width:1.5px;
  }
  
  .langbar button .flag{
    width:16px;
    height:11px;
  }
  
  .langbar button:hover{
    transform:translateY(-2px);
  }
  
  .content{
    padding:20px;
    border-radius:10px;
    border-width:1.5px;
  }
  
  .content h3{
    font-size:17px;
    margin:18px 0 8px;
    padding-bottom:6px;
  }
  
  .content p{
    font-size:13px;
    line-height:1.55;
    margin:8px 0;
  }
  
  .small{
    font-size:0.8rem;
    margin-top:18px;
    padding-top:12px;
  }
  
  .page{
    padding:0 8px 32px;
  }
  
  .site-footer{
    padding:18px 0 24px;
    font-size:13px;
  }
  
  /* Background plus léger sur petits écrans */
  body::after{
    background:repeating-linear-gradient(
      45deg,
      transparent,
      transparent 100px,
      rgba(212,175,55,0.02) 100px,
      rgba(212,175,55,0.02) 102px,
      transparent 102px,
      transparent 200px
    );
    animation:lineMove 20s linear infinite;
  }
}

/* ========================================
   RESPONSIVE - TRÈS PETITS ÉCRANS (< 320px)
   ======================================== */
@media(max-width:320px){
  .topbar{
    gap:6px;
    margin:8px auto 10px;
    padding:0 6px;
    flex-direction:column;
  }
  
  .topbar a{
    padding:4px 8px;
    font-size:11px;
    width:100%;
  }
  
  .langbar{
    gap:5px;
    margin:12px 0 16px;
  }
  
  .langbar button{
    padding:6px 12px;
    font-size:11px;
    gap:4px;
    border-width:1px;
  }
  
  .langbar button .flag{
    width:14px;
    height:10px;
  }
  
  .langbar button:hover{
    transform:translateY(-1px);
  }
  
  .content{
    padding:16px;
    border-radius:8px;
    border-width:1px;
  }
  
  .content h3{
    font-size:16px;
    margin:16px 0 8px;
    padding-bottom:6px;
    border-bottom-width:1.5px;
  }
  
  .content h3:hover{
    padding-left:4px;
  }
  
  .content p{
    font-size:12px;
    line-height:1.5;
    margin:6px 0;
  }
  
  .small{
    font-size:0.75rem;
    margin-top:16px;
    padding-top:10px;
  }
  
  .page{
    padding:0 6px 28px;
  }
  
  .site-footer{
    padding:16px 0 20px;
    font-size:12px;
  }
  
  /* Simplifier les effets sur très petits écrans */
  .content h3:hover{
    transform:none;
  }
  
  body::after{
    background:repeating-linear-gradient(
      45deg,
      transparent,
      transparent 80px,
      rgba(212,175,55,0.015) 80px,
      rgba(212,175,55,0.015) 82px,
      transparent 82px,
      transparent 160px
    );
    animation:lineMove 18s linear infinite;
  }
}

/* ========================================
   OPTIMISATIONS POUR PERFORMANCES
   ======================================== */

/* Désactiver les animations sur demande de l'utilisateur */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Ajustement tactile pour boutons sur mobile */
@media(max-width:600px){
  .langbar button{
    min-height:40px;
    min-width:60px;
  }
}

@media(max-width:400px){
  .langbar button{
    min-height:36px;
    min-width:55px;
  }
}

@media(max-width:320px){
  .langbar button{
    min-height:32px;
    min-width:50px;
  }
}

/* Optimisation du rendu sur petits écrans */
@media(max-width:400px){
  /* Réduire la complexité des ombres */
  .langbar button{
    box-shadow:0 2px 10px rgba(212,175,55,0.2);
  }
  
  .langbar button:hover{
    box-shadow:0 4px 16px rgba(212,175,55,0.25);
  }
  
  .langbar button.active{
    box-shadow:0 3px 12px rgba(212,175,55,0.2);
  }
}

/* Amélioration de la lisibilité sur très petits écrans */
@media(max-width:320px){
  .content{
    /* Augmenter légèrement l'espacement des lettres pour améliorer la lisibilité */
    letter-spacing:0.01em;
  }
  
  .content p{
    /* Augmenter l'espacement entre les mots sur très petits écrans */
    word-spacing:0.05em;
  }
}