/* Picxel Gallery UI — assets/styles.css
   Blue-dominant, clean, modern, responsive.
   Square thumbnails (photos/videos) + subtle glass, glow, and shimmer accents.
   Works with existing markup in index.php (gallery, fullscreen, modals, comments panel). */

:root{
  /* Layout */
  --maxw: 1200px;

  /* Palette (blue-forward) */
  --bg0:#f2f7ff;
  --bg1:#ffffff;
  --card:#ffffffcc;
  --card2:#ffffffee;
  --stroke:#0b10201a;
  --stroke2:#0b102026;

  --text:#081227;
  --muted:#2f3e63;
  --muted2:#4c5d86;

  --accent:#2563eb;   /* blue */
  --accent2:#06b6d4;  /* cyan */
  --accent3:#0ea5e9;  /* sky */

  --good:#059669;
  --warn:#b45309;
  --bad:#dc2626;

  /* Effects */
  --shadow: 0 22px 60px rgba(8,18,45,.10);
  --shadow2: 0 14px 34px rgba(8,18,45,.10);
  --radius: 22px;
  --radius2: 16px;
  --blur: 14px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 8% 0%, rgba(37,99,235,.14), transparent 60%),
    radial-gradient(900px 600px at 92% 18%, rgba(6,182,212,.12), transparent 58%),
    radial-gradient(800px 520px at 40% 105%, rgba(14,165,233,.10), transparent 62%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.45;
  min-height: 100%;
}

/* Optional: make header/footer includes blend nicely */
header, footer{ color:inherit; }

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:none; }
img, video{ max-width:100%; display:block; }

/* Subtle animated highlight in the background (very light, low cost) */
@media (prefers-reduced-motion: no-preference){
  body::before{
    content:"";
    position: fixed;
    inset: -20%;
    z-index: -1;
    pointer-events:none;
    background:
      radial-gradient(700px 360px at 20% 30%, rgba(37,99,235,.10), transparent 60%),
      radial-gradient(700px 360px at 80% 60%, rgba(6,182,212,.08), transparent 60%);
    filter: blur(8px);
    opacity: .9;
    animation: floatGlow 16s ease-in-out infinite alternate;
    transform: translateZ(0);
  }
  @keyframes floatGlow{
    from{ transform: translate3d(-1%, -1%, 0) scale(1.02); }
    to  { transform: translate3d(1%, 1%, 0) scale(1.06); }
  }
}

.app-shell{ padding: 28px 14px 70px; }
.app-container{ max-width: var(--maxw); margin: 0 auto; }

/* Titles */
h1,h2,h3{ margin: 0 0 12px; letter-spacing:-0.02em; }
h2{ font-size: clamp(22px, 2.4vw, 28px); }
h3{ font-size: 18px; }
.section-title{ margin-top: 18px; padding-top: 10px; }

/* Cards */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,255,255,.70));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

/* Soft blue sheen on cards */
.card::before{
  content:"";
  position:absolute;
  inset:-2px;
  pointer-events:none;
  background:
    radial-gradient(520px 220px at 25% 20%, rgba(37,99,235,.10), transparent 62%),
    radial-gradient(520px 220px at 80% 80%, rgba(6,182,212,.08), transparent 62%);
  opacity: .9;
}

.auth-card{
  max-width: 520px;
  padding: 18px 18px 16px;
  margin: 10px 0 18px;
}

.field-label{
  display:block;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 8px;
}

.field-input, input[type="text"], input[type="password"], textarea{
  width:100%;
  border-radius: 14px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.92);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  transition: border .15s ease, box-shadow .15s ease, transform .05s ease, background .15s ease;
}
.field-input:focus, input[type="text"]:focus, input[type="password"]:focus, textarea:focus{
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 4px rgba(37,99,235,.14);
  background: rgba(255,255,255,.98);
}
textarea{ min-height: 110px; resize: vertical; }

/* Buttons */
.btn, button{ font: inherit; }
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke2);
  cursor:pointer;
  user-select:none;
  transition: transform .12s ease, box-shadow .12s ease, border .12s ease, background .12s ease, opacity .12s ease, filter .12s ease;
  box-shadow: 0 10px 22px rgba(8,18,45,.16);
  position: relative;
  overflow: hidden;
}
.btn:active{ transform: translateY(1px) scale(.99); }

.btn::after{
  content:"";
  position:absolute;
  inset:-40%;
  pointer-events:none;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%);
  transform: translateX(-30%) rotate(8deg);
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference){
  .btn:hover::after{ opacity: .65; animation: sheen 1.1s ease forwards; }
  @keyframes sheen{
    from{ transform: translateX(-30%) rotate(8deg); }
    to  { transform: translateX(30%) rotate(8deg); }
  }
}

.btn-primary{
  background: linear-gradient(135deg, rgba(37,99,235,.96), rgba(6,182,212,.84));
  border-color: rgba(255,255,255,.20);
  color: #051022;
}
.btn-primary:hover{
  box-shadow: 0 18px 34px rgba(8,18,45,.20), 0 0 0 4px rgba(6,182,212,.10);
  filter: saturate(1.02);
}

.btn-ghost{
  background: rgba(255,255,255,.86);
  color: var(--text);
}
.btn-ghost:hover{ background: rgba(255,255,255,.98); }

.btn-success{
  background: linear-gradient(135deg, rgba(34,197,94,.95), rgba(6,182,212,.55));
  border-color: rgba(255,255,255,.18);
  color: #051022;
}
.btn-success:hover{
  box-shadow: 0 18px 34px rgba(8,18,45,.18), 0 0 0 4px rgba(34,197,94,.10);
}
.btn-block{ width:100%; }

/* Alerts */
.alert{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke2);
  margin: 10px 0 14px;
  background: rgba(255,255,255,.92);
}
.alert-danger{
  border-color: rgba(239,68,68,.35);
  background: linear-gradient(180deg, rgba(239,68,68,.10), rgba(255,255,255,.60));
  color: var(--text);
}

/* Top actions row (logout, genealogy) */
.top-actions{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items:center;
  margin: 12px 0 22px;
}

/* Layout containers */
.folders{
  display:flex;
  flex-direction: column;
  gap: 18px;
}

.thumb-grid{
  display:flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: stretch;
}

/* In folder blocks: show ALL photos, no scrolling */
.folder > .thumb-grid{ overflow: visible; }

/* Ensure there is never a forced horizontal scrollbar in these areas */
.folders, .thumb-grid{ overflow: visible; }

.folder{
  margin: 18px 0 22px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,255,255,.72));
  box-shadow: var(--shadow2);
  backdrop-filter: blur(10px);
}

.folder-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.folder-header h3{ margin:0; font-weight: 800; }
.subtitle{ margin: 0 0 12px; color: var(--muted2); font-size: 13px; }

.folder > .thumb-grid::-webkit-scrollbar-thumb{
  background: rgba(11,16,32,.18);
  border-radius: 999px;
}
.folder > .thumb-grid .photo{
  flex: 0 0 auto;
  width: 240px;
  scroll-snap-align: start;
}
@media (max-width: 720px){
  .folder > .thumb-grid .photo{ width: 210px; }
}

/* Edit folder button (admin) */
.edit-folder{
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.86);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 14px;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
  box-shadow: 0 10px 22px rgba(8,18,45,.14);
}
.edit-folder:hover{
  background: rgba(255,255,255,.98);
  transform: translateY(-1px);
}

/* Gallery grid */
.gallery-container{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

/* === Square thumbnails === */
.photo{
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.35);
  box-shadow: 0 16px 36px rgba(8,18,45,.16);
  transform: translateZ(0);
  aspect-ratio: 1 / 1;
}

.photo img{
  width:100%;
  height:100%;
  object-fit: cover;
  transition: transform .45s ease, filter .45s ease;
  cursor: zoom-in;
  aspect-ratio: 1 / 1;
}

/* Blue glow + subtle overlay */
.photo::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(360px 220px at 25% 20%, rgba(37,99,235,.18), transparent 62%),
    radial-gradient(420px 240px at 80% 85%, rgba(6,182,212,.14), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.00), rgba(8,18,45,.10));
  opacity: .65;
  transition: opacity .35s ease;
}

/* Shimmer sweep on hover (disabled for reduced-motion) */
.photo::after{
  content:"";
  position:absolute;
  inset:-30%;
  pointer-events:none;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.30) 50%, transparent 62%);
  transform: translateX(-35%) rotate(10deg);
  opacity: 0;
}

.photo:hover{
  box-shadow: 0 22px 52px rgba(8,18,45,.18), 0 0 0 4px rgba(6,182,212,.08);
  border-color: rgba(37,99,235,.22);
}
.photo:hover img{
  transform: scale(1.05);
  filter: saturate(1.08) contrast(1.04);
}
.photo:hover::before{ opacity: .85; }

@media (prefers-reduced-motion: no-preference){
  .photo:hover::after{ opacity: .8; animation: tileSheen .9s ease forwards; }
  @keyframes tileSheen{
    from{ transform: translateX(-35%) rotate(10deg); }
    to  { transform: translateX(35%) rotate(10deg); }
  }
}

/* Video thumbnail placeholder (square) */
.video-thumbnail{
  width:100%;
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(420px 240px at 30% 30%, rgba(6,182,212,.18), transparent 60%),
    radial-gradient(460px 260px at 70% 70%, rgba(37,99,235,.18), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.82));
  display:flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
}
.play-button{
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(8,18,45,.45);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(10px);
  position: relative;
  box-shadow: 0 18px 40px rgba(8,18,45,.22);
}
.play-button::after{
  content:"";
  position:absolute;
  left: 23px;
  top: 18px;
  width:0; height:0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 16px solid rgba(255,255,255,.92);
}

/* Badges + admin action buttons on photo */
.comment-count{
  position:absolute;
  bottom: 10px;
  left: 10px;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 12px;
  font-weight: 800;
  color: #041018;
  background: linear-gradient(135deg, rgba(6,182,212,.95), rgba(37,99,235,.85));
  box-shadow: 0 10px 22px rgba(8,18,45,.20);
}

.delete-button, .move-button{
  position:absolute;
  top: 10px;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(8,18,45,.40);
  color: #eaf2ff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 26px rgba(8,18,45,.22);
}
.delete-button{ right: 10px; }
.move-button{ right: 54px; font-size: 16px; }
.delete-button:hover{ background: rgba(239,68,68,.38); }
.move-button:hover{ background: rgba(6,182,212,.22); }

/* Pagination */
.pagination{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 14px;
  align-items:center;
}
.page-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.70);
  color: var(--text);
  transition: transform .12s ease, background .12s ease, border .12s ease, box-shadow .12s ease;
  box-shadow: 0 8px 18px rgba(8,18,45,.10);
}
.page-link:hover{
  background: rgba(255,255,255,.92);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(8,18,45,.12);
}
.page-link.current{
  background: linear-gradient(135deg, rgba(37,99,235,.96), rgba(6,182,212,.78));
  border-color: rgba(255,255,255,.22);
  color: #051022;
  font-weight: 900;
}

/* Fullscreen viewer */
#fullscreen-container{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
  background: rgba(8,18,45,.70);
  backdrop-filter: blur(12px);
}
#fullscreen-container.is-open{ display:block; }

#close-button, #prev-button, #next-button{
  position:absolute;
  top: 18px;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(8,18,45,.42);
  color: #eaf2ff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px rgba(8,18,45,.30);
}
#close-button{ right: 18px; font-size: 28px; line-height: 1; }
#prev-button{ left: 18px; top: 50%; transform: translateY(-50%); font-size: 24px; }
#next-button{ right: 18px; top: 50%; transform: translateY(-50%); font-size: 24px; }
#prev-button:hover, #next-button:hover{ background: rgba(255,255,255,.10); }
#close-button:hover{ background: rgba(239,68,68,.32); }

#fullscreen-content{
  position:absolute;
  inset: 70px 18px 18px;
  display:grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 14px;
  max-width: min(var(--maxw), 1400px);
  margin: 0 auto;
}

.image-section{
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(8,18,45,.30);
  box-shadow: var(--shadow);
  overflow: hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}
#fullscreen-image{
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 110px);
  object-fit: contain;
  cursor: zoom-out;
}
#fullscreen-video{
  width: 100%;
  height: auto;
  max-height: calc(100vh - 110px);
}

/* Comments side panel */
#comments-section{
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(8,18,45,.50);
  box-shadow: var(--shadow);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
#comments-section h2{
  margin: 0;
  padding: 14px 14px 8px;
  font-size: 18px;
  color: #eaf2ff;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
#existing-comments{
  padding: 10px 14px 0;
  overflow:auto;
  flex: 1 1 auto;
}
#existing-comments .comment{
  padding: 10px 12px;
  margin: 0 0 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.18);
}
#existing-comments .comment .meta{
  color: var(--muted2);
  font-size: 12px;
  margin-bottom: 6px;
}
#comment-form{
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}
.form-group{ margin: 10px 0; }
.form-group label{
  display:block;
  font-size: 13px;
  color: #d6e6ff;
  margin: 6px 0 8px;
}


/* Recent comments floating panel - MODERN REDESIGN */
.comments-toggle{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10000;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: linear-gradient(135deg, rgba(37,99,235,.92), rgba(6,182,212,.88));
  backdrop-filter: blur(14px);
  padding: 14px 20px;
  cursor:pointer;
  box-shadow:
    0 20px 50px rgba(37,99,235,.35),
    0 0 0 0 rgba(37,99,235,.4);
  display:flex;
  align-items:center;
  gap: 10px;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite;
}
@keyframes pulse{
  0%, 100%{ box-shadow: 0 20px 50px rgba(37,99,235,.35), 0 0 0 0 rgba(37,99,235,.4); }
  50%{ box-shadow: 0 22px 56px rgba(37,99,235,.42), 0 0 0 8px rgba(37,99,235,.0); }
}
.comments-toggle:hover{
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 26px 60px rgba(37,99,235,.45), 0 0 0 4px rgba(37,99,235,.2);
  animation: none;
}
.comments-toggle:active{
  transform: translateY(0) scale(1.02);
}
.desktop-label{
  font-size: 14px;
  font-weight: 700;
  color: #051022;
  letter-spacing: -0.01em;
}
.mobile-bubble{
  display:none;
  font-size: 22px;
}
.comment-badge{
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 2px solid rgba(8,18,45,.88);
  box-shadow: 0 4px 12px rgba(220,38,38,.5);
  animation: popIn .4s cubic-bezier(.68,-.55,.265,1.55);
}
@keyframes popIn{
  0%{ transform: scale(0); opacity: 0; }
  50%{ transform: scale(1.15); }
  100%{ transform: scale(1); opacity: 1; }
}

.comments-panel{
  position: fixed;
  right: 18px;
  bottom: 80px;
  width: min(480px, calc(100vw - 36px));
  max-height: min(72vh, 620px);
  z-index: 10000;
  display:none;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.24);
  background: linear-gradient(180deg, rgba(8,18,45,.90), rgba(8,18,45,.85));
  backdrop-filter: blur(18px);
  box-shadow:
    0 28px 70px rgba(8,18,45,.45),
    0 0 0 1px rgba(255,255,255,.08) inset;
  overflow:hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all .35s cubic-bezier(.4,0,.2,1);
}
.comments-panel.is-open{
  display:flex;
  flex-direction: column;
  opacity: 1;
  transform: translateY(0) scale(1);
}
.comments-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
}
.comments-header span{
  font-size: 16px;
  font-weight: 800;
  color: #eaf2ff;
  letter-spacing: -0.02em;
  display:flex;
  align-items:center;
  gap: 8px;
}
.comments-header span::before{
  content: "💬";
  font-size: 18px;
}
.comments-header button{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.08);
  color: #eaf2ff;
  cursor:pointer;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  transition: all .2s ease;
  display:flex;
  align-items:center;
  justify-content:center;
}
.comments-header button:hover{
  background: rgba(239,68,68,.35);
  border-color: rgba(239,68,68,.5);
  transform: rotate(90deg);
}

/* Liste des commentaires */
.comments-list{
  padding: 12px;
  overflow:auto;
  flex: 1 1 auto;
  display:flex;
  flex-direction: column;
  gap: 12px;
}
.comments-list::-webkit-scrollbar{
  width: 8px;
}
.comments-list::-webkit-scrollbar-track{
  background: rgba(255,255,255,.05);
  border-radius: 4px;
}
.comments-list::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.18);
  border-radius: 4px;
}
.comments-list::-webkit-scrollbar-thumb:hover{
  background: rgba(255,255,255,.28);
}
.comments-list > p{
  color: rgba(214,230,255,.7);
  text-align: center;
  padding: 40px 20px;
  font-size: 14px;
}

/* Carte de commentaire moderne */
.comment-item{
  display:flex;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.92));
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 4px 16px rgba(8,18,45,.12);
  transition: all .25s cubic-bezier(.4,0,.2,1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.comment-item::before{
  content:"";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(6,182,212,.05));
  opacity: 0;
  transition: opacity .25s ease;
}
.comment-item:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(8,18,45,.20);
  border-color: rgba(37,99,235,.35);
}
.comment-item:hover::before{
  opacity: 1;
}

/* Image miniature du commentaire */
.comment-item > img{
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.5);
  box-shadow: 0 4px 12px rgba(8,18,45,.15);
  transition: all .25s ease;
  position: relative;
  z-index: 1;
}
.comment-item:hover > img{
  transform: scale(1.05);
  border-color: rgba(37,99,235,.6);
  box-shadow: 0 6px 18px rgba(37,99,235,.25);
}

/* Détails du commentaire */
.comment-details{
  flex: 1;
  display:flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.comment-meta{
  display:flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.comment-name{
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  display:flex;
  align-items:center;
  gap: 6px;
}
.comment-name::before{
  content: "👤";
  font-size: 13px;
  opacity: .7;
}
.comment-date{
  font-size: 12px;
  color: var(--muted2);
  display:flex;
  align-items:center;
  gap: 4px;
}
.comment-date::before{
  content: "🕐";
  font-size: 12px;
  opacity: .6;
}
.comment-item p{
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Contrôles admin dans les commentaires récents */
.admin-controls{
  position: absolute;
  top: 8px;
  right: 8px;
  display:flex;
  gap: 6px;
  z-index: 2;
}
.admin-edit, .admin-delete{
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.6);
  background: rgba(255,255,255,.90);
  backdrop-filter: blur(8px);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 14px;
  transition: all .2s ease;
  box-shadow: 0 2px 8px rgba(8,18,45,.10);
}
.admin-edit:hover{
  background: rgba(37,99,235,.15);
  border-color: rgba(37,99,235,.4);
  transform: scale(1.1);
}
.admin-delete:hover{
  background: rgba(239,68,68,.15);
  border-color: rgba(239,68,68,.4);
  transform: scale(1.1);
}

/* Modals */
.modal{
  display:none;
  position: fixed;
  inset: 0;
  z-index: 11000;
  background: rgba(8,18,45,.62);
  backdrop-filter: blur(10px);
  padding: 18px;
}
.modal.is-open{ display:flex; align-items:center; justify-content:center; }
.modal-content{
  width: min(520px, 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(8,18,45,.86);
  box-shadow: var(--shadow);
  padding: 16px;
  color: #eaf2ff;
}
.modal-content h3{ margin: 0 0 10px; }
.modal-buttons{
  display:flex;
  gap: 10px;
  justify-content:flex-end;
  margin-top: 12px;
}
.modal-buttons .cancel, .modal-buttons .confirm{
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.20);
  cursor:pointer;
}
.modal-buttons .cancel{
  background: rgba(255,255,255,.92);
  color: var(--text);
}
.modal-buttons .cancel:hover{ background: rgba(255,255,255,1); }
.modal-buttons .confirm{
  background: linear-gradient(135deg, rgba(37,99,235,.96), rgba(6,182,212,.78));
  color: #051022;
  font-weight: 900;
}
.modal-buttons .confirm:hover{ box-shadow: 0 0 0 4px rgba(37,99,235,.14); }

/* Make forms/buttons inside legacy markup nicer */
form button:not(.btn){
  border-radius: 14px;
  border: 1px solid var(--stroke2);
  padding: 10px 14px;
  background: rgba(255,255,255,.90);
  color: var(--text);
  cursor:pointer;
  box-shadow: 0 10px 22px rgba(8,18,45,.12);
}
form button:not(.btn):hover{ background: rgba(255,255,255,.98); }

/* Responsive */
@media (max-width: 980px){
  #fullscreen-content{
    grid-template-columns: 1fr;
    inset: 70px 12px 12px;
  }
  #comments-section{ max-height: 40vh; }
}

@media (max-width: 520px){
  .gallery-container{
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }
  .desktop-label{ display:none; }
  .mobile-bubble{ display:inline; }
  #prev-button, #next-button{ display:none; }
}

/* Standalone header/footer (no haut_perso.php / bas.php) */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(8,18,45,.88), rgba(8,18,45,.40));
  border-bottom: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(16px);
}
.site-header__inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.22));
  box-shadow: 0 12px 28px rgba(8,18,45,.26);
  color: #eaf2ff;
}
.brand__dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, var(--accent2), var(--accent));
  box-shadow: 0 0 0 4px rgba(6,182,212,.14), 0 0 30px rgba(37,99,235,.40);
}
.brand__text{ font-weight: 900; letter-spacing: -0.02em; }
.site-header__hint{
  color: rgba(214,230,255,.92);
  font-size: 13px;
  opacity: .95;
  text-align:right;
}

.site-footer{
  border-top: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(8,18,45,.06), rgba(8,18,45,.18));
}
.site-footer__inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 14px 26px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  color: rgba(47,62,99,.88);
  font-size: 13px;
}
.site-footer__sep{ opacity: .6; }

@media (max-width: 560px){
  .site-header__hint{ display:none; }
}

/* Pagination des commentaires */
.comments-pagination{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 14px 12px 0;
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.pagination-btn{
  flex: 1;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.24);
  background: linear-gradient(135deg, rgba(37,99,235,.15), rgba(6,182,212,.10));
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s ease;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 6px;
}
.pagination-btn:hover:not(:disabled){
  background: linear-gradient(135deg, rgba(37,99,235,.25), rgba(6,182,212,.20));
  border-color: rgba(37,99,235,.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,.20);
}
.pagination-btn:active:not(:disabled){
  transform: translateY(0);
}
.pagination-btn:disabled{
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(255,255,255,.05);
}
.pagination-info{
  font-size: 13px;
  font-weight: 700;
  color: #eaf2ff;
  padding: 0 8px;
  white-space: nowrap;
}