/* ==== STRUCTURE GLOBALE ==== */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    background-color: #000;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    box-sizing: border-box;
}

/* ==== HEADER ==== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #772659;
    color: white;
    padding: 15px 0; /* ✅ header restauré */
    text-align: center;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

header::after {
    content: "";
    position: absolute;
    bottom: -35px;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, rgba(119, 38, 89, 1), rgba(119, 38, 89, 0));
    pointer-events: none;
    z-index: -1;
}

header h1 {
    margin: 5px 0 10px 0;
}

/* ==== NAVIGATION ==== */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 45px;
}

nav li {
    display: inline;
}

/* Lien actif du menu */
nav a.active {
  text-decoration: underline;
  font-weight: bold;
  color: #ffd4f0; /* un violet clair lisible sur ton fond */
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
  color: #ffbde6;
}

/* ==== MAIN ==== */
main {
    flex: 1;
    padding: 0;
    margin-top: 100px;
    margin-bottom: 60px;
    overflow: hidden;
    position: relative;
}

/* ==== FOOTER ==== */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #772659;
    color: white;
    text-align: center;
    padding: 10px;
    z-index: 1000;
}

/* ========================================================= */
/* 🎨 FONDS */
/* ========================================================= */
.page-accueil { background-image: url("images/agent-d-accueil.jpg"); }
.page-instagram { background-image: url("images/fondinsta.jpg"); }
.page-nas { background-image: url("images/syno.jpg"); }
.page-contact { background-image: url("images/sc.jpg"); }

.page-nas,
.page-instagram,
.page-contact,
.page-accueil {
    position: relative;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* 📱 Mobile — corrige le fond */
@media (max-width: 600px) {
    .page-nas,
    .page-instagram,
    .page-contact,
    .page-accueil {
        background-attachment: scroll !important;
        background-position: center top !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
        height: 100vh !important;
        min-height: 100vh !important;
    }
}

/* ========================================================= */
/* 🃏 CARTES UNIFORMISÉES (style Instagram) */
/* ========================================================= */

/* 💻 Bureau */
[class*="-card"] {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -70%);
    width: 400px;
    max-width: 90%;
    padding: 50px 40px;
    border-radius: 200px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.69);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.10);
    z-index: 100;
    transition: all 0.3s ease-in-out;
}

/* Texte */
[class*="-card"] h1 {
    font-size: 1.8em;
    color: #772659;
    margin-bottom: 12px;
    font-weight: 700;
}

[class*="-card"] h2 {
    font-size: 1.2em;
    color: #333;
    margin: 12px 0;
    font-weight: 500;
}

[class*="-card"] a {
    display: inline-block;
    background-color: #772659;
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    margin-top: 14px;
    font-weight: 600;
    transition: all 0.25s ease;
}

[class*="-card"] a:hover {
    background-color: #9c3b77;
    transform: scale(1.05);
}

/* Images centrées */
[class*="-card"] img,
[class*="-card"] .badges,
[class*="-card"] .profile {
    display: block;
    margin: 0 auto 12px auto;
    max-width: 80%;
}

/* ========================================================= */
/* 📱 MOBILE */
/* ========================================================= */
@media (max-width: 600px) {

    header {
        padding: 8px 0; /* ✅ header mobile restauré */
    }

    header h1 {
        font-size: 1.2em;
        margin-bottom: 4px;
    }

    nav ul {
        flex-direction: row;
        gap: 10px;
        font-size: 0.9em;
    }

    footer {
        font-size: 0.8em;
        padding: 8px;
    }

    /* Cartes identiques à Instagram */
    [class*="-card"] {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 85%;
        max-width: 380px;
        padding: 32px 26px;
        border-radius: 120px;
        margin: 130px auto 140px auto;
        background-color: rgba(255, 255, 255, 0.96);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }

    [class*="-card"] h1 {
        font-size: 1.5em;
        margin-bottom: 8px;
    }

    [class*="-card"] h2 {
        font-size: 1em;
        margin: 10px 0;
    }

    [class*="-card"] a {
        font-size: 0.9em;
        padding: 10px 18px;
        border-radius: 8px;
    }
}

/* ========================================================= */
/* 🎯 BOUTONS FIXES */
/* ========================================================= */

/* 💻 Bureau */
.right-links {
    position: fixed;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(255, 255, 255, 0.15);
    padding: 25px 20px;
    border-radius: 16px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 200;
}

.right-links a {
    text-align: center;
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 12px 18px;
    border-radius: 10px;
    transition: transform 0.2s, background-color 0.3s;
}

.right-links a:hover {
    transform: scale(1.05);
}

/* Couleurs */
.right-links .onepiece {
    background-color: #ffb837;
    color: #b81f27;
}

.right-links .sololvl {
    background-color: #0f437b;
    color: #cef8fd;
}

.right-links .opm {
    background-color: #e70013;
    color: #fac961;
}

/* 📱 Mobile : barre centrée */
@media (max-width: 600px) {
    .right-links {
        position: fixed;
        top: 200px;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 15px;
        background: none;
        box-shadow: none;
        padding: 0;
        z-index: 200;
    }

    .right-links a {
        font-size: 0.9em;
        padding: 10px 14px;
        border-radius: 10px;
        font-weight: 700;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
    }
}

/* ========================================================= */
/* ⚙️ Ajustement de la position de la carte NAS (centrage PC) */
/* ========================================================= */
@media (min-width: 601px) {
    .page-nas .nas-card {
        transform: translate(-50%, -74.5%) !important; 
    }
}
/* ========================================================= */
/* ⚙️ Boutons déroulants (Solo Leveling & One Punch Man) */
/* ========================================================= */

/* Conteneur des groupes */
.link-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  z-index: 300;
}

/* === Boutons principaux === */

/* One Punch Man */
.opm-btn {
  background-color: #e70013; /* rouge OPM */
  color: #fac961;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.opm-btn:hover {
  background-color: #b0000f;
  transform: scale(1.03);
}

/* Solo Leveling */
.sololvl-btn {
  background-color: #0f437b;
  color: #cef8fd;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.sololvl-btn:hover {
  background-color: #19599c;
  transform: scale(1.03);
}

/* === Conteneur de sous-boutons === */
.sub-buttons {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: 10px;
  margin-top: 4px;

  /* Animation d’ouverture/fermeture */
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

/* Quand visible */
.sub-buttons.show {
  max-height: 400px;
  opacity: 1;
}

/* === Sous-boutons génériques === */
.sub-btn {
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  font-size: 0.9em;
  transition: background-color 0.3s, transform 0.2s;
}

/* === Couleurs spécifiques === */

/* Solo Leveling (tons bleus) */
.link-group .sololvl-btn + .sub-buttons .sub-btn {
  background-color: rgba(15, 67, 123, 0.35);
  color: #cef8fd;
}
.link-group .sololvl-btn + .sub-buttons .sub-btn:hover {
  background-color: rgba(25, 89, 156, 0.55);
  transform: scale(1.05);
}

/* One Punch Man (tons rouge/or) */
.link-group .opm-btn + .sub-buttons .sub-btn {
  background-color: rgba(231, 0, 19, 0.25);
  color: #ffd97a;
}
.link-group .opm-btn + .sub-buttons .sub-btn:hover {
  background-color: rgba(231, 0, 19, 0.45);
  transform: scale(1.05);
}

/* Mobile : sous-boutons côte à côte */
@media (max-width: 600px) {
  .sub-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin-left: 0;
  }

  .sub-btn {
    font-size: 0.85em;
    padding: 8px 10px;
  }
}
