/* ===========================
   RESET DE BASE & THEME
=========================== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Arial, sans-serif;
  background: #fff;
  color: #000;
}

/* Variables utiles */
:root{
  --header-h: 56px;
  --footer-h: 56px;
}

/* Conteneur générique */
.container {
  max-width: 400px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}
.title { font-size: 2em; margin: 0 0 20px 0; }

/* ===========================
   HEADER FIXE
=========================== */
/* ===== HEADER ===== */
.header-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  /* border-bottom: 2px solid #000;  <-- supprimé */
  padding: 0 15px;
  z-index: 1000;
  padding-left: max(15px, env(safe-area-inset-left));
  padding-right: max(15px, env(safe-area-inset-right));
  padding-top: max(0px, env(safe-area-inset-top));
}

.header-left {
  font-weight: bold;
  font-size: 16px;
  color: #000;
}

.header-right {
  display: flex;
  gap: 12px;
}

.header-right img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  transition: transform .2s ease;
}

.header-right a:hover img {
  transform: scale(1.2);
}

/* ===========================
   FOOTER FIXE (logos images)
=========================== */
/* ===== FOOTER (logos + point au-dessus du lien actif) ===== */
:root { --footer-h: 56px; }

.footer-nav{
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--footer-h);
  background: #fff;
  /* pas de bordure haute pour éviter la "barre" */
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding-bottom: max(0px, env(safe-area-inset-bottom));
  overflow: visible;                 /* ✅ laisse dépasser le point */
}

.footer-nav a{
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  position: relative;                /* ✅ point positionné par rapport au lien */
  min-width: 0;
  overflow: visible;                 /* ✅ le point ne sera pas coupé */
}

.footer-nav img{
  display: block;
  width: 52px; height: 52px;
  object-fit: contain;
  filter: grayscale(1);
  transition: transform .15s ease, filter .15s ease;
}

.footer-nav a.active img{
  transform: translateY(-2px);
  filter: none;
}

/* ✅ Point noir AU-DESSUS du logo actif */
.footer-nav a .dot{
  position: absolute;
  top: -10px;                        /* 🔥 au-dessus du footer */
  left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 8px;
  background: #000;
  border-radius: 50%;
  opacity: 0;                        /* caché par défaut */
  z-index: 2;                        /* 🔥 devant tout */
  transition: opacity .15s ease;
}
.footer-nav a.active .dot{ opacity: 1; }

/* sécu: zone contenu */
.page-content{ padding-bottom: calc(var(--footer-h) + 20px); }

/* ✅ Point noir au-dessus du logo actif */
.footer-nav a .dot {
  position: absolute;
  top: 4px;              /* au-dessus du logo */
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: #000;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .15s ease;
}

.footer-nav a.active .dot {
  opacity: 1;
}

/* ===========================
   ZONE CONTENU QUI SCROLLE
=========================== */
.page-content{
  padding-top: calc(var(--header-h) + 10px);
  padding-bottom: calc(var(--footer-h) + 20px); /* assez grand pour logos XXL */
  min-height: 100svh;
  box-sizing: border-box;
  overflow: auto;
}

/* ===========================
   BOUTONS MODERNES
=========================== */
.btn{
  display: inline-block;
  padding: 14px 16px;
  border-radius: 10px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  font-size: 16px;
  transition: all .2s ease-in-out;
  border: 2px solid #000;
  background: #fff;
  color: #000;
}
.btn:hover{ background:#000; color:#fff; }
.btn.fullwidth{ width: 100%; }

.btn-primary{ background: #fff; color: #000; border-color:#000; }
.btn-primary:hover{ background:#000; color:#fff; }

.btn-secondary{ background:#000091; color:#fff; border-color:#000091; }
.btn-secondary:hover{ background:#fff; color:#000091; }

.btn-ghost{
  background:#f3f3f3; border:1px solid #000; color:#000;
  border-radius:10px; padding:12px; font-weight:700; cursor:pointer;
}

/* ===========================
   FORMULAIRES & INPUTS
=========================== */
input, textarea, select, button { font-family: inherit; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select{
  width: 100%;
  max-width: 280px;
  margin: 6px auto;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #000;
  font-size: 15px;
  box-sizing: border-box;
  background: #fff;
  color: #000;
}
input[type="date"]{
  height: 44px; line-height: 20px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.message, .error, .success{
  margin-top:10px;
  color:#000;
  font-weight:bold;
}

/* ===========================
   PROFIL
=========================== */
.profile-photo, #photo-profil{
  width: 90px; height: 90px; object-fit: cover;
  border: 3px solid #000;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
}
.stats, .stats-row{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
  text-align: center;
}
.stat small{ display:block; font-size:12px; }
.stat strong{ font-size:18px; }
#biographie{
  margin-top:12px; text-align:left;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Onglets images (profil) */
.image-tabs{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 18px auto 10px;
  max-width: 360px;
  justify-items: center;
}
.image-tabs button{
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
}
.image-tabs img{
  width: 48px; height: 48px; object-fit: contain;
  filter: grayscale(1);
  transition: transform .15s ease, filter .15s ease;
}
.image-tabs button.active img{
  transform: translateY(-2px);
  filter: none;
}

/* Cadre contenu onglets */
/* Cadre plein écran, bord à bord, fine ligne blanche, sans arrondis */
.tab-content {
  width: 100vw;            /* bord à bord */
  margin: 0;               /* aucune marge */
  border: 1px solid #fff;  /* fine séparation blanche */
  border-radius: 0;        /* pas d’arrondis */
  overflow: hidden;
  min-height: 300px;
  background: #fff;
}

.tab-frame {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
  background: #fff;
}

/* ===========================
   SWITCH
=========================== */
.switch{
  position: relative;
  display: inline-block;
  width: 44px; height: 24px;
}
.switch input{ display:none; }
.slider{
  position: absolute;
  inset: 0;
  cursor: pointer;
  background:#ccc;
  border-radius:24px;
  transition:.25s;
}
.slider:before{
  content:"";
  position:absolute;
  height:18px; width:18px;
  left:3px; top:3px;
  background:#fff;
  border-radius:50%;
  transition:.25s;
}
input:checked + .slider{ background:#000; }
input:checked + .slider:before{ transform: translateX(20px); }


/* Notifications */
.notif-actions { display:flex; gap:8px; margin:12px 0 20px; }
.notif-list-container { display:grid; gap:10px; }
.notif-card { background:#fff; border:1px solid #eee; border-radius:12px; padding:12px 14px; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.notif-main { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.notif-text { display:flex; flex-direction:column; gap:4px; }
.notif-message { margin:0; font-weight:600; }
.notif-date { color:#666; }
.btn-success { background:#e8f9ef; border:1px solid #b9efcd; }
.btn-danger  { background:#fdeaea; border:1px solid #f5c2c2; }
.empty-state { color:#666; text-align:center; padding:40px 0; }

/* ===== Hexagone vertical + sommets arrondis pour la photo de profil ===== */

/* 1) Fallback (sans arrondi) : hexagone VERTICAL pur */
.profile-photo, #photo-profil {
  /* garde tes dimensions & border existantes */
  width: 90px;
  height: 90px;
  object-fit: cover;
  border: 3px solid #000;

  /* hex debout (pointes haut/bas) */
  -webkit-clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
  clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);

  /* au cas où tu avais testé une rotation avant */
  transform: none !important;
}

/* 2) Version ARRONDIE (navigateurs modernes) */
@supports (clip-path: path("M0,0")) {
  .profile-photo, #photo-profil {
    /* Path dessiné pour 90x90 (rayon ~8px aux sommets).
       Si tu changes la taille, dis-le moi et je te donne une version scalable. */
    -webkit-clip-path: path("
      M 45 4
      Q 49 4, 60 9
      L 79 22
      Q 83 26, 83 30
      L 83 60
      Q 83 64, 79 68
      L 60 81
      Q 49 86, 45 86
      L 30 81
      L 11 68
      Q 7 64, 7 60
      L 7 30
      Q 7 26, 11 22
      L 30 9
      Q 41 4, 45 4
      Z
    ");
    clip-path: path("
      M 45 4
      Q 49 4, 60 9
      L 79 22
      Q 83 26, 83 30
      L 83 60
      Q 83 64, 79 68
      L 60 81
      Q 49 86, 45 86
      L 30 81
      L 11 68
      Q 7 64, 7 60
      L 7 30
      Q 7 26, 11 22
      L 30 9
      Q 41 4, 45 4
      Z
    ");
  }
}

/* 3) (Optionnel) variantes d’arrondi : ajoute .hex-soft ou .hex-chunky sur l’image */
@supports (clip-path: path("M0,0")) {
  .hex-soft {
    clip-path: path("M 45 6 Q 49 6, 59 10 L 78 22 Q 82 25, 82 28 L 82 62 Q 82 65, 78 68 L 59 80 Q 49 84, 45 84 L 31 80 L 12 68 Q 8 65, 8 62 L 8 28 Q 8 25, 12 22 L 31 10 Q 41 6, 45 6 Z");
  }
  .hex-chunky {
    clip-path: path("M 45 8 Q 51 8, 58 12 L 76 24 Q 82 28, 82 32 L 82 58 Q 82 62, 76 66 L 58 78 Q 51 82, 45 82 L 32 78 L 14 66 Q 8 62, 8 58 L 8 32 Q 8 28, 14 24 L 32 12 Q 39 8, 45 8 Z");
  }
}
/* Utilisation :
   <img id="photo-profil" class="profile-photo hex-soft" ...>
   ou
   <img id="photo-profil" class="profile-photo hex-chunky" ...>
*/

/* Bouton "Suivre" bleu identique au thème */
.btn-follow {
  background: #000091;
  color: #fff;
  border: 2px solid #000091;
  border-radius: 10px;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
}
.btn-follow:hover {
  background: #fff;
  color: #000091;
}