/* ===========================
   GN.css — Socle global (v7)
   Pattern : classes uniques GN-*, scope variables via body.GN-root
   =========================== */

/* --- Variables & reset léger (scopé) --- */
.GN-root, .GN-root *::before, .GN-root *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; } /* anti-scroll horizontal fantôme */

.GN-root{
  --brand:#20466e; --brand-2:#163152;
  --ok:#2f6fed;
  --text:#1f2a44; --muted:#64748b;
  --bg:#f8f9fa; --card-bg:#fff;
  --gap:16px; --radius:12px;
  --bd:rgba(16,24,40,.10);
  --shadow:0 8px 24px rgba(16,24,40,.12);
  margin:0;
  font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color:var(--text);
  background:var(--bg);
}

/* Liens et main (scopés) */
.GN-root a{ color:var(--brand); text-decoration:none; }
.GN-root a:hover{ text-decoration:underline; }
.GN-root main{ padding:16px 0; box-sizing:border-box; display:block; }

/* ===========================
   Layout (left | content | right)
   =========================== */
.GN-layout{
  display:grid;
  grid-template-columns:260px minmax(0,1fr) 260px;
  gap:var(--gap);
  max-width:1100px;
  width:100%;
  margin-left:auto;
  margin-right:auto;
  padding:0 12px;
  box-sizing:border-box;
}
.GN-side{ width:100%; max-width:260px; margin:0; }
.GN-side--left{}
.GN-side--right{}
.GN-content{ min-width:0; } /* empêche le débordement du centre */

@media (min-width:1024px){
  .GN-layout{
    grid-template-columns:260px minmax(0,2fr) 260px; /* content x2 */
    max-width:1400px;
  }
  .GN-side--right .GN-block{ position:sticky; top:12px; }
}
@media (max-width:1023px){
  .GN-layout{ display:block; max-width:none; padding:0 12px; }
  .GN-side{ display:none; }
}

/* Espacement naturel des blocs */
.GN-content > .GN-block,
.GN-side > .GN-block{ margin-bottom:16px; }

/* ===========================
   Blocs & typographie
   =========================== */
.GN-block{
  background:var(--card-bg);
  border:1px solid var(--bd);
  border-radius:var(--radius);
  padding:12px;
}
.GN-block-title{ margin:0 0 10px; font-size:1.05rem; }
.GN-muted{ color:var(--muted); }

/* ===========================
   Boutons (cohérents partout)
   =========================== */
.GN-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  padding:10px 14px;
  border-radius:10px;
  border:1px solid transparent;
  background:#fff;
  color:var(--brand);
  border-color:var(--brand);
  font-weight:600;
  line-height:1.2;
  text-decoration:none;
  cursor:pointer;
  transition:
    background .15s ease,
    color .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    transform .04s ease;
  box-shadow:0 1px 0 rgba(16,24,40,.05);
  -webkit-appearance:none; appearance:none;
}
.GN-btn:hover{ background:var(--brand); color:#fff; text-decoration:none; }
.GN-btn:active{ transform: translateY(1px); }
.GN-btn:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(47,111,237,.25);
}

/* --- Anti-conflit liens sur boutons (placé avant les variantes) --- */
.GN-btn, .GN-btn:link, .GN-btn:visited{ color:var(--brand); text-decoration:none; }
.GN-btn:hover{ text-decoration:none; }
.GN-btn--primary, .GN-btn--primary:link, .GN-btn--primary:visited{ color:#fff; }
.GN-btn--ghost, .GN-btn--ghost:link, .GN-btn--ghost:visited{ color:var(--brand); }
.GN-btn--secondary, .GN-btn--secondary:link, .GN-btn--secondary:visited{ color:var(--brand); }
.GN-btn--inscription, .GN-btn--inscription:link, .GN-btn--inscription:visited{ color:#fff; }

/* Variantes */
.GN-btn--ghost{ background:#fff; color:var(--brand); border-color:#d6dbe3; }
.GN-btn--ghost:hover{ background:#eef3f9; }

.GN-btn--primary{ background:var(--brand); color:#fff; border-color:transparent; }
.GN-btn--primary:hover{ background:var(--brand-2); }

.GN-btn--secondary{ background:#fff; color:var(--brand); border-color:var(--brand); }
.GN-btn--secondary:hover{ background:var(--brand); color:#fff; }

.GN-btn--inscription{ background:var(--ok); color:#fff; border-color:transparent; }
.GN-btn--inscription:hover{ filter:brightness(.95); }

/* Variante danger */
.GN-btn--danger{ background:#fff; color:#b42318; border-color:#f3b0a9; }
.GN-btn--danger:hover{ background:#fee4e2; border-color:#b42318; }

/* Tailles & utilitaires */
.GN-btn--sm{ padding:8px 12px; font-size:.92rem; border-radius:9px; }
.GN-btn--lg{ padding:12px 18px; font-size:1.03rem; border-radius:12px; }
.GN-btn--pill{ border-radius:999px; }
.GN-btn--full{ display:flex; width:100%; }

.GN-btn-stack{ display:flex; flex-direction:column; gap:10px; }

/* ===========================
   Formulaires (socle)
   =========================== */
.GN-form-label{ display:block; margin:0 0 6px; font-weight:600; }
.GN-form-actions{ margin-top:10px; }

.GN-root .GN-form-input,
.GN-root select,
.GN-root input[type="text"],
.GN-root input[type="email"],
.GN-root input[type="date"],
.GN-root input[type="password"],
.GN-root textarea{
  width:100%;
  padding:10px 12px;
  border:1px solid #d6dbe3;
  border-radius:10px;
  background:#fff;
  box-sizing:border-box;
}

.GN-form-grid{ display:grid; grid-template-columns:1fr; gap:12px; }
@media (min-width:768px){
  .GN-form-grid{ grid-template-columns:1fr 1fr; }
}
.GN-form-field{ display:flex; flex-direction:column; gap:6px; }
.GN-form-field--span2{ grid-column:1 / -1; }

/* ===========================
   Listes utiles
   =========================== */
.GN-profile-stats{
  list-style:none; padding:0; margin:0;
  display:flex; flex-direction:column; gap:8px;
}
.GN-profile-stats > li{
  display:flex; justify-content:space-between; align-items:center;
  padding:8px 10px; background:#fff; border:1px solid var(--bd); border-radius:10px;
}

/* ===========================
   Grilles génériques
   =========================== */
.GN-photos-grid{
  display:grid; gap:10px;
  grid-template-columns: repeat(3, minmax(0,1fr));
}
@media (min-width:768px){
  .GN-photos-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (min-width:1100px){
  .GN-photos-grid{ grid-template-columns: repeat(5, minmax(0,1fr)); }
}
.GN-thumb{
  width:100%;
  aspect-ratio:1 / 1;
  object-fit:cover;
  border-radius:10px;
  display:block;
  cursor:zoom-in;
  transition: transform .15s ease, box-shadow .15s ease;
}
.GN-thumb:hover{ transform: translateY(-1px); box-shadow:0 6px 16px rgba(16,24,40,.18); }

.GN-cards-grid{ display:grid; grid-template-columns:1fr; gap:16px; }
@media (min-width:768px){
  .GN-cards-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width:1100px){
  .GN-cards-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}

/* ===========================
   Cartouche Événement
   =========================== */
.GN-cartouche-lien{ text-decoration:none; color:inherit; display:block; }
.GN-cartouche-evenement{ /* spécifique dans CE.css */ }

/* ===========================
   Modale
   =========================== */
.GN-hidden{ display:none !important; }
.GN-modal{
  position:fixed; inset:0;
  background:rgba(0,0,0,.72);
  display:none;
  align-items:center; justify-content:center;
  z-index:2000;
}
.GN-modal.is-open{ display:flex; }
.GN-modal-img{ max-width:90vw; max-height:88vh; border-radius:12px; display:block; }
.GN-modal-close{
  position:absolute; top:16px; right:20px; font-size:32px; color:#fff; cursor:pointer; line-height:1; user-select:none;
}
.GN-modal .GN-nav-btn{
  position:absolute; top:50%; transform:translateY(-50%);
  background:#fff; border:1px solid #d6dbe3; border-radius:10px; padding:8px 10px; cursor:pointer; user-select:none;
}
#prevBtn.GN-nav-btn{ left:20px; }
#nextBtn.GN-nav-btn{ right:20px; }

/* ===========================
   Notifications & cartouches relation
   =========================== */
.GN-notifList .CE .cartouche-evenement{ padding:10px; gap:10px; }
.GN-notifList .CE .cartouche-photo img{ width:100%; height:120px; object-fit:cover; display:block; }
.GN-notifList .CE .cartouche-infos .desc{
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;
}
.GN-notifList .CE .cartouche-cta{ margin-top:8px; }

.GN-root .cartouche-relation .cr-main{ display:flex; gap:12px; align-items:flex-start; }
.GN-root .cartouche-relation .cr-avatar{
  display:block; flex:0 0 56px; width:56px; height:56px;
  border-radius:50%; overflow:hidden;
}
.GN-root .cartouche-relation .cr-avatar .cr-img{
  width:56px !important; height:56px !important;
  object-fit:cover; display:block; border-radius:50%;
}
.GN-root .GN-notif .cartouche-relation .cr-img{ max-width:none !important; }

/* =========================================================
   GN.css — Additions v7.1 pour index.php
   ========================================================= */
.GN-card{ background:var(--card-bg); border:1px solid var(--bd); border-radius:var(--radius); padding:12px; }
.GN-cardTitle{ margin:0 0 10px; font-size:1.05rem; line-height:1.25; }
.GN-blockTitle{ margin:0 0 10px; font-size:1.05rem; line-height:1.25; }
.GN-h2{ margin:16px 0 8px; font-size:1.25rem; line-height:1.3; font-weight:700; }
.GN-info{ color:var(--muted); }

.GN-flow, .GN-cartoucheList{ display:grid; grid-template-columns:1fr; gap:16px; }
@media (min-width:768px){ .GN-cartoucheList{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (min-width:1100px){ .GN-cartoucheList{ grid-template-columns:repeat(3, minmax(0,1fr)); } }

.GN-sep{ border:0; border-top:1px solid var(--bd); margin:16px 0; }

.GN-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.GN-list--links li a{
  display:block; padding:8px 10px; background:#fff;
  border:1px solid var(--bd); border-radius:10px; text-decoration:none;
}
.GN-list--links li a:hover{ background:#eef3f9; }

.GN-list--events .GN-eventItem{
  display:flex; flex-direction:column; gap:2px;
  padding:8px 10px; background:#fff; border:1px solid var(--bd); border-radius:10px;
}

.GN-link{ color:var(--brand); text-decoration:none; }
.GN-link:hover{ text-decoration:underline; }
.GN-meta{ color:var(--muted); font-size:.92em; }

.GN-notifList{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:12px; }
.GN-notif{ background:#fff; border:1px solid var(--bd); border-radius:12px; padding:10px; }
.GN-notifLink{ display:flex; gap:10px; align-items:center; color:inherit; text-decoration:none; }
.GN-notifThumb{ width:40px; height:40px; flex:0 0 40px; border-radius:50%; object-fit:cover; display:block; }
.GN-notifBody{ min-width:0; flex:1; }
.GN-notifTitle{ margin:0; font-size:1rem; line-height:1.25; }
.GN-notifText{ margin:2px 0 0; color:var(--muted); font-size:.95em; line-height:1.35; }

.GN-form{ display:block; }
.GN-formSep{ height:8px; }
.GN-field{ display:flex; flex-direction:column; gap:6px; }
.GN-field > label{ font-weight:600; margin-bottom:6px; }

.GN-cartouche{
  border:1px solid var(--bd); border-radius:12px; background:#fff; overflow:hidden; display:block;
}
.GN-cartouche--link{ display:block; text-decoration:none; color:inherit; }
.GN-cartouchePhoto img{ width:100%; height:140px; object-fit:cover; display:block; }
.GN-cartoucheInfos{ padding:10px; }
.GN-cartoucheTitle{ margin:0 0 4px; font-size:1rem; line-height:1.25; }
.GN-cartoucheMeta{ color:var(--muted); font-size:.92em; }


.GN-modal[hidden]{ display:none; }
.GN-modal{ position:fixed; inset:0; background:rgba(0,0,0,.4); display:grid; place-items:center; z-index:9999; }
.GN-modal__panel{ background:#fff; border-radius:14px; padding:16px 18px; width:min(520px, 92vw); box-shadow:0 10px 30px rgba(0,0,0,.2); }
.GN-modal__actions{ display:flex; gap:10px; justify-content:flex-end; margin-top:12px; }
.btn{ padding:.6rem .9rem; border-radius:10px; border:1px solid #ccd2da; background:#fff; }
.btn--danger{ background:#163152; color:#fff; border-color:#163152; } /* bleu StopSolo */
