/* ========== BASE ========== */
html, body { height: 100%; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;

    /* Sticky footer (toutes pages) */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main, .layout { flex: 1 0 auto; } /* pousse le footer en bas */

/* ========== HEADER ========== */
.full-width-header {
    width: 100%;
    box-sizing: border-box;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2c3e50;
    color: white;
    padding: 10px 15px;
    min-height: 60px;
}

/* Logo centré */
.site-title {
    margin: 0;
    font-size: 1.8em;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.site-title a {
    color: white;
    text-decoration: none;
}

/* Bouton burger (mobile) */
.burger-btn{
    background: none;
    border: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
    z-index: 2000;
    position: absolute;
    left: 10px;
}



/* Boutons standards */
nav a.btn {
    background-color: #3498db;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    margin: 0 5px;
    border-radius: 5px;
    font-size: 16px;
}
nav a.btn:hover { background-color: #2980b9; }

/* ——— Photo profil (pastille) dans le header ——— */
.header-photo{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 8px;
    flex: 0 0 24px;
    line-height: 0;
}
.header-photo img{
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.6);
}
.full-width-header img{ max-width: none; }

/* Assure la superposition des dropmenus en mode tablette/desktop */
.full-width-header { z-index: 1400; }


/* ======= NOUVEAUX DROPMENUS DESKTOP ======= okxx */
.nav-groups {
    display: none;
    align-items: center;
    gap: 12px;
    margin-left: 8px;
}
.nav-group { position: relative; }
.nav-group::after {
    content: "";
    position: absolute;
    left: 0;
    width: 240px;
    top: 100%;
    height: 12px;
    background: transparent;
    z-index: 1199;
    pointer-events: auto;
}

/* Bouton d’ouverture */
.nav-toggle {
    background: none;
    border: 1px solid rgba(236,240,241,0.25);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color .15s ease, border-color .15s ease;
}
.nav-toggle:hover,
.nav-toggle:focus-visible {
    background-color: rgba(236,240,241,0.12);
    border-color: rgba(236,240,241,0.45);
    outline: none;
}

/* Menu déroulant d’un groupe */
.nav-group .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: #2c3e50;
    border: 1px solid rgba(236,240,241,0.25);
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.18);
    padding: 6px;
    display: none;
    z-index: 1200;
    list-style: none;
    margin: 0;
}
.nav-group .dropdown-menu li { margin: 0; padding: 0; }
.nav-group .dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: #ecf0f1;
    text-decoration: none;
    transition: background-color .12s ease;
    line-height: 1.2;
}
.nav-group .dropdown-menu a:hover,
.nav-group .dropdown-menu a:focus-visible {
    background: rgba(236,240,241,0.12);
    outline: none;
}
/* Ouverture au clic (JS) */
.nav-group.open .dropdown-menu { display: block; }
/* Ouverture au survol desktop */
@media (hover: hover) and (pointer: fine) {
    .nav-group:hover .dropdown-menu { display: block; }
}

/* Était: @media (min-width: 768px) */
@media (min-width: 1024px) {
  .burger-btn{ display: none; }
  .menu-mobile-only { display: none; }
  .site-title { position: static; transform: none; }
  .nav-groups { display: flex; } /* dropmenus visibles seulement dès 1024px+ */
}
/* ---- DESKTOP ---- */
@media (min-width: 1024px) {
  .main-nav {
    position: static;
    top: auto; left: auto;
    width: auto; height: auto;
    background: transparent;
    transform: none;
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 0;
    overflow-y: visible;
    box-sizing: border-box;
  }
  .nav-groups, .header-photo, .notif-btn { display: flex; }
  .main-nav .menu-mobile-only,
  .main-nav a.btn.menu-mobile-only { display: none !important; }
}

/* Menu principal (conteneur) */
.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* ---- TABLETTE (768–1023px) : tes ajustements restent ---- */
@media (min-width: 768px) and (max-width: 1023px) {
  .main-nav { width: 260px; gap: 16px; padding: 20px; }
}

/* ---- DESKTOP (≥1024px) : déjà OK chez toi ---- */
@media (min-width: 1024px) {
  .burger-btn{ display: none; }
  .menu-mobile-only { display: none; }
  .site-title { position: static; transform: none; }
  .nav-groups { display: flex; }

  .main-nav {
    position: static;
    top: auto; left: auto;
    width: auto; height: auto;
    background: transparent;
    transform: none;          /* neutralise .open */
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 0;
    overflow-y: visible;
    box-sizing: border-box;
  }
  .nav-groups, .header-photo, .notif-btn { display: flex; }
  .main-nav .menu-mobile-only,
  .main-nav a.btn.menu-mobile-only { display: none !important; }
}


/* --- TABLETTE >767px à 1023px : ajustements si besoin --- */
@media (min-width: 768px) and (max-width: 1023px) {
  .main-nav {
    width: 60px;
    gap: 16px;
    padding: 20px;
  }
}

/* --- TABLETTE PORTRAIT : masquage des sides et élargissement du content --- */
@media (min-width: 768px) and (max-width: 1023px) {
  .side.left,
  .side.right {
    display: none !important;
  }
  .content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .layout {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
}


/* ===== Icône notifications (cloche) ===== */
.notif-btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  color: #ecf0f1;              /* texte clair sur header #2c3e50 */
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(236,240,241,0.25);
}
.notif-btn:hover,
.notif-btn:focus-visible{
  background-color: rgba(236,240,241,0.12);
  border-color: rgba(236,240,241,0.45);
  outline: none;
}
.notif-btn .icon{
  font-size: 20px;
  line-height: 1;
}

/* Badge compteur */
.notif-btn .badge{
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #E74C3C;        /* rouge alerte */
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #2c3e50;  /* anneau pour contraste sur header */
}

/* Si tu veux la cloche aussi en mobile, enlève cette règle ailleurs dans ton CSS : 
@media (max-width: 767px) { .notif-btn { display: none; } }
*/

/* ======= ACCESSIBILITÉ FOCUS ======= */
.nav-toggle:focus-visible,
.nav-group .dropdown-menu a:focus-visible,
.burger-btn:focus-visible,
.main-nav .btn:focus-visible,
.header-photo:focus-visible,
.notif-btn:focus-visible {
    outline: 2px solid #ecf0f1;
    outline-offset: 2px;
}

/* ========== CONTENU (aération légère) ========== */
main { padding: 36px 24px; text-align: center; } /* +6px vertical */
.content { padding-top: 8px; padding-bottom: 8px; }

/* ===== FOOTER (générique) ===== */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 15px;
    position: relative;
    bottom: 0;
    width: 100%;
    margin-top: auto; /* sticky via flex body */
}
footer a {
    color: #ecf0f1;
    margin: 0 10px;
    text-decoration: none;
}
footer a:hover { text-decoration: underline; }

/* ===== BOUTONS INSCRIPTION / DÉSINSCRIPTION ===== */
.btn-inscription {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.btn-inscription:hover { background-color: #2980b9; }
.btn-desinscription {
    background-color: #e67e22;
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.btn-desinscription:hover { background-color: #d35400; }

/* ===== BLOCS PROFIL / ÉVÉNEMENTS ===== */
.profil-evenements { margin-top: 30px; }
.profil-evenements h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #2980b9;
}
.event-list { display: flex; flex-wrap: wrap; gap: 15px; }
.event-info {
    padding: 10px;
    font-size: 0.9em;
    color: #555;
}
.event-createur {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    font-size: 0.95em;
    color: #333;
    text-align: center;
    width: 100%;
}
.event-createur span { font-weight: normal; color: #555; }
.event-createur img {
    width: 40px; height: 40px; border-radius: 50%;
    object-fit: cover; border: 1px solid #ccc;
}
.event-createur a { font-weight: bold; text-decoration: none; color: #2980b9; }
.event-createur a:hover { text-decoration: underline; }

/* ===== FORMULAIRE ÉVÉNEMENT ===== */
.form-event {
    max-width: 600px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}
.form-event label { font-weight: bold; margin-bottom: 5px; }
.form-event input[type="text"],
.form-event input[type="file"],
.form-event textarea {
    padding: 8px; border: 1px solid #ccc; border-radius: 5px;
    font-size: 1em; width: 100%; box-sizing: border-box;
}
.form-event input[type="date"] {
    padding: 8px; border: 1px solid #ccc; border-radius: 5px;
    font-size: 1em; width: 200px;
}
.form-event textarea { min-height: 100px; resize: vertical; }
.form-event img {
    display: block; margin: 5px 0 10px;
    max-width: 150px; border-radius: 8px;
}
.form-event .btn { align-self: center; padding: 10px 20px; }

/* ===== BLOCS GROUPES ===== */
.groupe-bloc {
    border: 1px solid #ddd; border-radius: 8px; padding: 10px 15px;
    margin-bottom: 20px; background: #fafafa;
}
.groupe-bloc h4 { margin: 0 0 5px; color: #2980b9; }
.groupe-participants { list-style: none; padding: 0; margin: 10px 0 0; }
.groupe-participants li {
    margin-bottom: 5px; display: flex; align-items: center; gap: 8px; font-size: 0.95em;
}

/* Liens mobiles supplémentaires masqués en desktop */
@media (min-width: 768px) { .menu-mobile-only { display: none !important; } }

/* ===== LISTING MEMBRES ===== */
.members-list {
    display: flex; flex-wrap: wrap; gap: 20px;
    justify-content: center; margin-top: 20px;
}
.member-card {
    width: 200px; background: #fff; border: 1px solid #ddd;
    border-radius: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden; transition: transform 0.2s ease; text-align: center;
}
.member-card:hover { transform: translateY(-3px); }
.member-card img { width: 100%; height: 200px; object-fit: cover; }
.member-info { padding: 10px; }
.member-info h3 { margin: 5px 0; font-size: 1.2em; color: #2980b9; }
.member-info h3 a { text-decoration: none; color: #2980b9; }
.member-info p { margin: 5px 0; font-size: 0.9em; color: #555; }
.member-info .desc { font-size: 0.85em; color: #777; }

/* ===== Notifications ===== */
.notifications-list { list-style: none; padding: 0; margin: 20px 0; }
.notification-item {
    padding: 15px; border-bottom: 1px solid #ddd; text-align: left;
}
.notification-item.non-lu { background-color: #f0f8ff; }
.notification-item p { margin: 0; font-size: 1em; }
.notification-item small { color: #666; font-size: 0.85em; }

.notif-event-card {
    display: flex; gap: 15px; text-decoration: none; color: inherit;
    border: 1px solid #ddd; border-radius: 8px; overflow: hidden;
    background: #fff; transition: box-shadow 0.3s ease; margin-bottom: 10px;
}
.notif-event-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.notif-event-image img { width: 100px; height: 100px; object-fit: cover; }
.notif-event-details { flex: 1; text-align: left; }
.notif-event-details h4 { margin: 5px 0; font-size: 1.1em; color: #2980b9; }
.notif-event-details p { margin: 3px 0; font-size: 0.9em; color: #555; }
.notif-desc { color: #777; font-style: italic; }

.notif-lue { background: #fff !important; opacity: 0.6; transition: opacity 0.3s ease, background 0.3s ease; }
.notif-disparition { opacity: 0; transition: opacity 0.5s ease; }
.notifications-list li.non-lue {
    border: 2px solid #0078d7; border-radius: 8px; padding: 10px;
    margin-bottom: 20px; background: #f9fcff;
}
.notifications-list li.lue {
    border: 1px solid #ddd; border-radius: 8px; padding: 10px;
    margin-bottom: 20px; background: #fff; transition: border 0.3s ease, background 0.3s ease;
}

/* ===== Cartouche évènement ===== */
.cartouche-evenement {
    display: flex; flex-direction: row; align-items: flex-start;
    border: 1px solid #ddd; border-radius: 8px; overflow: hidden;
    margin-bottom: 15px; position: relative; background: #fff;
}
.cartouche-photo { flex: 0 0 120px; height: 120px; overflow: hidden; margin-right: 15px; }
.cartouche-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cartouche-infos { flex: 1; padding: 10px 12px; display: flex; flex-direction: column; justify-content: center; }
.cartouche-infos h3 { margin: 0 0 5px; font-size: 1.1em; }
.cartouche-infos .meta { font-size: 0.9em; color: #666; margin-bottom: 8px; }
.cartouche-infos .desc { font-size: 0.9em; color: #333; }
.cartouche-organisateur { position: absolute; top: 8px; right: 8px; display: block; }
.cartouche-organisateur img {
    width: 24px; height: 24px; border-radius: 50%;
    border: 1px solid #ccc; object-fit: cover;
}
.cartouche-lien { text-decoration: none; color: inherit; display: flex; flex: 1; }
.cartouche-lien:hover .cartouche-evenement { background: #f0f8ff; transition: background 0.2s ease; }

/* ======= MOBILE: UNIFICATION CARRE POUR PHOTOS EVENEMENT/CARTOUCHE ======= */
@media (max-width: 767px) {
  /* Conteneurs en colonne */
  .cartouche-lien,
  .cartouche-evenement {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
  }

  /* Vignette et conteneur photo d’événement = carré */
  .cartouche-photo,
  .event-photo {
    width: 100% !important;
    max-width: 180px !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 auto 12px auto !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    background: #eee !important;
    flex: none !important;
    height: auto !important;
    min-width: 100px !important;
    min-height: 100px !important;
    box-sizing: border-box !important;
    position: relative !important;
  }

  /* L’image remplit le carré */
  .cartouche-photo img,
  .event-photo img,
  .event-main-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    aspect-ratio: 1 / 1 !important;
    display: block !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    position: static !important;
    box-sizing: border-box !important;
  }

  .cartouche-infos {
    text-align: center !important;
    padding: 8px 2px !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Fallback anciens navigateurs sans aspect-ratio */
  @supports not (aspect-ratio: 1/1) {
    .cartouche-photo,
    .event-photo {
      position: relative !important;
      height: 0 !important;
      padding-bottom: 100% !important;
      max-width: 180px !important;
    }
    .cartouche-photo img,
    .event-photo img,
    .event-main-photo {
      position: absolute !important;
      top: 0; left: 0;
      width: 100% !important;
      height: 100% !important;
    }
  }
}

/* ===== Ajustements généraux ===== */
@media (max-width: 768px) {
    .full-width-header {
        padding-left: 0;
        padding-right: 0;
    }
    .content {
        padding-left: 0;
        padding-right: 0;
    }
}

/* ===== Grille 3 colonnes StopSolo ===== */
.layout{
  display:grid;
  grid-template-columns: minmax(220px,1fr) 2fr minmax(220px,1fr);
  gap:28px; /* +4px aération */
  padding:28px; /* +4px aération */
  align-items:start;
}
.side.left, .side.right{ min-height: 40px; }
.content{ min-width:0; }
@media (max-width: 767px){
  .layout{ grid-template-columns: 1fr; }
  .side.left, .side.right{ display:none; }
}

/* ===== Pages Auth ===== */
body.page-auth{ background:#ffffff; }
.layout{ background: transparent; }
:root{ --surface-page: #f2f4f7; }
.side.left, .side.right, .content{ background: var(--surface-page); }
.content{ display: flex; flex-direction: column; align-items: center; }
.page-header{ margin: 0 0 20px; }
.page-title{ margin: 0 0 6px; }
.page-subtitle{ margin: 0; }
.card{
  background: #ffffff; border: 1px solid rgba(0,0,0,.06); box-shadow: 0 10px 24px rgba(0,0,0,.06);
}
.form-card{ width: 100%; max-width: 560px; margin: 12px auto 24px; border-radius: 14px; padding: 24px; }
.side.left, .side.right{ padding: 16px; min-height: 100%; }
@media (max-width:767px){
  .layout{ grid-template-columns: 1fr; }
  .side.left, .side.right{ display: none; }
  .content{ padding: 20px; }
}
.input, .select, .textarea{
  background:#ffffff; border:1px solid rgba(0,0,0,.12); color:#111;
}
.input:focus, .select:focus, .textarea:focus{
  border-color:#0056B3; box-shadow: 0 0 0 3px rgba(0,86,179,.18);
}
.link{ color:#3b5fa7; }
.link:hover{ color:#214d9f; }
.page-auth main { padding-top: 20px; }
.page-auth .content{ background-color: #fff; }
.page-auth .form-card{
  width: 100%; max-width: 560px; margin: 12px auto 24px; border-radius: 8px; padding: 20px;
  background: #fff; border: 1px solid #ddd; box-shadow: 0 10px 24px rgba(0,0,0,.06);
}
.page-auth .page-header{ margin: 0 0 16px; }
.page-auth .page-title{ margin: 0 0 6px; }
.page-auth .page-subtitle{ margin: 0; color:#555; }
.page-auth .input, 
.page-auth .select, 
.page-auth .textarea{
  background:#fff; border:1px solid #ccc; color:#111; border-radius:6px; padding:10px 12px;
}
.page-auth .input:focus, 
.page-auth .select:focus, 
.page-auth .textarea:focus{
  border-color:#0078d7; outline:none; box-shadow: 0 0 0 3px rgba(0,120,215,.15);
}
.page-auth .alert{ 
  padding:12px 14px; border-radius:8px; border:1px solid #f1c4c4; background:#ffe8e8; color:#7a1f1f;
}
.page-auth .btn-primary{
  background-color:#3498db; color:#fff; padding:10px 16px; border-radius:6px; text-decoration:none;
  border: none; font-weight: 600; display:inline-flex; align-items:center; gap:8px;
}
.page-auth .btn-primary:hover{ background-color:#2980b9; }
.page-auth .btn-ghost{ background:#fff; border:1px solid #ccc; color:#333; padding:10px 16px; border-radius:6px; }
.page-auth .btn-ghost:hover{ background:#f5f5f5; }
/* Masque les éléments de header sur la page de connexion */
.page-auth .main-nav,
.page-auth .burger-btn{ display: none !important; }

/* ===== Formulaire inscription ===== */
.page-inscription .auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.page-inscription .grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.page-inscription .form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #2c3e50;
}

.page-inscription .form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
  background-color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.page-inscription .form-input:focus {
  border-color: #0078d7;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,120,215,.15);
}

.page-inscription .auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
}

.page-inscription .btn {
  border-radius: 8px;
}
/* Espacement vertical entre champs inscription */
.page-inscription .auth-form > .grid-two > div {
    width: 100%;
    display: block;
    margin-bottom: 16px;
}

.page-inscription .form-input {
    width: 100%;
    box-sizing: border-box;
}
/* Centrage propre de la page inscription */
.page-inscription main,
.page-inscription .content {
  text-align: left;                 /* annule le centrage global */
}

.page-inscription .content {
  display: flex;                    /* centre horizontalement le bloc */
  justify-content: center;
}

.page-inscription .auth-container {
  width: 100%;
  max-width: 600px;                 /* largeur maîtrisée de la box */
  margin: 0 auto;
}

.page-inscription .auth-card {
  width: 100%;
  box-sizing: border-box;
}

/* Une ligne par champ (si tu gardes grid-two) */
.page-inscription .grid-two { display: block; }
.page-inscription .grid-two > div { margin-bottom: 14px; }

/* Assure la largeur des inputs */
.page-inscription .form-input {
  width: 100%;
  box-sizing: border-box;
}
.page-inscription .grid-two {
    display: flex;
    flex-direction: column;
    align-items: center; /* centre horizontalement */
    gap: 16px; /* espace entre les champs */
}

.page-inscription .grid-two > div {
    width: 100%;
    max-width: 320px; /* largeur max d’un champ */
}

.page-inscription .form-input {
    width: 100%;
    box-sizing: border-box;
}


/* ===== Profil ===== */
.profile-header {
    display: flex; align-items: center; gap: 20px;
    padding: 16px; background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.avatar-wrap { flex: 0 0 auto; }
.avatar {
    width: 120px; height: 120px; border-radius: 50%;
    object-fit: cover; border: 2px solid #ecf0f1; cursor: pointer;
}
.profile-titles { display: flex; flex-direction: column; gap: 4px; }
.profile-name { margin: 0; }
.profile-location, .profile-email { margin: 0; color: #7f8c8d; }
.block { margin-top: 24px; background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.block-title { margin: 0 0 12px 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; }
.link-cta { color: #2c3e50; text-decoration: underline; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }

.profile-stats { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.profile-stats li { display: flex; align-items: center; justify-content: space-between; }
.profile-stats span { color: #7f8c8d; }
.btn-stack { display: grid; gap: 8px; }
.btn.ghost { background: transparent; border: 1px solid #2c3e50; color: #2c3e50; }
.btn.ghost:hover { background: #2c3e50; color: #ffffff; }

.relation-area { display: flex; align-items: center; gap: 8px; }
.inline { display: inline; }
.relation-badge { padding: 4px 10px; border-radius: 999px; font-size: 0.85em; background: #ecf0f1; color: #2c3e50; }
.relation-badge.ami { background: #2c3e50; color: #ffffff; }
.relation-badge.connaissance { background: #bdc3c7; color: #2c3e50; }
.relation-badge.alien { background: #f1c40f; color: #2c3e50; }
.relation-badge.refuse { background: #e74c3c; color: #ffffff; }

.thumb-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.thumb { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; cursor: pointer; }

/* Modal photos */
.modal.hidden { display: none; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  /* par défaut cachée (pas de display:flex ici) */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal:not(.hidden) { display: flex; } /* s’affiche seulement quand on retire .hidden */

.modal-img { max-width: 90vw; max-height: 80vh; border-radius: 8px; }
.modal-close { position: absolute; top: 20px; right: 24px; font-size: 32px; color: #fff; cursor: pointer; }
.modal-nav { position: absolute; width: 100%; display: flex; justify-content: space-between; top: 50%; transform: translateY(-50%); padding: 0 20px; }
.nav-btn { background: rgba(44,62,80,.9); color: #fff; border: none; padding: 10px 14px; border-radius: 8px; cursor: pointer; }
.nav-btn:hover { filter: brightness(1.1); }


/* ===== Mon Compte (avec photos) ===== */
.account-header{ display: flex; gap: 20px; align-items: center; margin: 16px auto 0; padding: 16px; }
.account-avatar{ display:flex; flex-direction:column; align-items:center; gap:8px; }
.account-avatar .avatar{ width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 2px solid #ecf0f1; cursor: pointer; }
.avatar-actions .btn.tiny{ padding: 6px 10px; border-radius: 10px; font-size: .9em; }

.account-titles{ display:flex; flex-direction:column; gap:4px; }
.profile-name{ margin: 0; }
.profile-location, .profile-email{ margin: 0; color: #7f8c8d; }

.account-form{ margin-top: 8px; }
.form-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}
.form-field{ display: flex; flex-direction: column; gap: 6px; }
.form-field label{ font-weight: 600; color: #2c3e50; }
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="date"],
.form-field textarea{
    border: 1px solid #e0e4e8; background: #fff;
    border-radius: 10px; padding: 10px 12px; font: inherit; outline: none;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.form-field input:focus,
.form-field textarea:focus{
    border-color: #2c3e50; box-shadow: 0 0 0 3px rgba(44,62,80,.15);
}
.form-field textarea{ resize: vertical; }
.span-2{ grid-column: span 2; }
#code_postal{ max-width: 160px; }
#date_naissance{ max-width: 220px; }
#pseudo{ max-width: 320px; }
.thumb-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.thumb{ width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; cursor: pointer; }
@media (max-width: 900px){ .thumb-grid{ grid-template-columns: repeat(3, 1fr);} }
@media (max-width: 640px){ .thumb-grid{ grid-template-columns: repeat(2, 1fr);} }

.form-actions{ display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; }
.btn{
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 14px; border-radius: 12px; border: none;
    background: #2c3e50; color: #ffffff; text-decoration: none; cursor: pointer;
    transition: transform .05s ease, filter .15s ease;
}
.btn:hover{ filter: brightness(1.1); }
.btn:active{ transform: translateY(1px); }
.btn.ghost{ background: transparent; color: #2c3e50; border: 1px solid #2c3e50; }
.btn.ghost:hover{ background: #2c3e50; color: #fff; }

.block{ margin-top: 16px; background:#fff; border-radius:12px; padding:16px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.block-title{ margin:0 0 12px 0; }

@media (max-width: 767px){
    .account-header{ flex-direction: column; align-items: flex-start; }
    .form-grid{ grid-template-columns: 1fr; }
    .span-2{ grid-column: span 1; }
}

/* ===== Mes Photos ===== */
.photos-header { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.photos-header .avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 2px solid #ecf0f1; cursor: pointer; }
.avatar-wrap { flex: 0 0 auto; }
.head-texts h2 { margin: 0 0 4px 0; }

.upload-form { display: grid; gap: 8px; }
.upload-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.small { font-size: 0.9em; }

.gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.photo-card {
    position: relative; background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
    overflow: hidden; display: flex; flex-direction: column;
}
.photo-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.photo-actions { display: flex; gap: 8px; justify-content: space-between; padding: 10px; align-items: center; }
.badge-primary {
    position: absolute; top: 8px; left: 8px; background: #2c3e50; color: #fff; font-size: 0.8em;
    padding: 4px 8px; border-radius: 999px;
}

.btn.tiny { padding: 6px 10px; border-radius: 10px; font-size: .9em; }

• Notifications (side right) */
.notif-list { display: grid; gap: 10px; }
.notif { list-style: none; }
.notif-link {
    display: flex; gap: 10px; align-items: flex-start; text-decoration: none; color: inherit;
    background: #fff; border-radius: 10px; padding: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.notif-link:hover { filter: brightness(1.03); }
.notif-thumb { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 8px; object-fit: cover; border: 1px solid #ecf0f1; }
.notif-body { display: grid; gap: 4px; min-width: 0; }
.notif-title { font-weight: 600; color: #2c3e50; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-meta { font-size: 0.9em; color: #7f8c8d; }
.notif-text { font-size: 0.95em; color: #2c3e50; }

/* ===== Agenda ===== */
.agenda-head { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px; margin-bottom: 8px; }
.agenda-title { margin: 0; text-align: center; }
.agenda-nav { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; text-decoration: none; color: #2c3e50; background: #ecf0f1; }
.agenda-nav:hover { filter: brightness(1.03); }
.agenda-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.agenda-cell {
    background: #fff; border-radius: 8px; padding: 8px; text-align: center; min-height: 42px;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.agenda-cell.head { background: #ecf0f1; color: #2c3e50; font-weight: 600; min-height: 36px; box-shadow: none; }
.agenda-cell.empty { background: transparent; box-shadow: none; }
.agenda-cell.day { color: #2c3e50; }
.agenda-cell.day.today { border: 2px solid #3498db; border-radius: 6px; background-color: #ecf6fb; font-weight: bold; }
.agenda-cell.day.has-event { background-color: #eaf7ea; border: 1px solid #2ecc71; cursor: pointer; color: #2c3e50; }
.agenda-cell.day.has-event:hover { background-color: #d4f0d4; }
.agenda-cell.day.create-day { cursor: pointer; }
.agenda-cell.day.create-day:hover { background-color: #f0f0f0; border: 1px dashed #7f8c8d; }
.agenda-cell.day { display: flex; align-items: center; justify-content: center; min-height: 40px; text-decoration: none; color: inherit; transition: background-color 0.2s ease, border 0.2s ease; }
.agenda-cell.day:hover { text-decoration: none; }
a.agenda-cell { text-decoration: none; }

/* compact côtés */
.side.right .agenda-head, .side.left .agenda-head{ grid-template-columns: 32px 1fr 32px; gap: 6px; }
.side.right .agenda-title, .side.left .agenda-title{ font-size: 1rem; line-height: 1.2; }
.side.right .agenda-nav, .side.left .agenda-nav{ width: 30px; height: 30px; border-radius: 6px; font-size: 16px; }
.side.right .agenda-grid, .side.left .agenda-grid{ gap: 4px; }
.side.right .agenda-cell, .side.left .agenda-cell{ padding: 6px; min-height: 34px; font-size: .95rem; }
.side.right .agenda-cell.head, .side.left .agenda-cell.head{ min-height: 28px; padding: 4px 6px; font-size: .9rem; }
@media (max-width: 1280px){
  .side.right .agenda-head, .side.left .agenda-head{ grid-template-columns: 28px 1fr 28px; }
  .side.right .agenda-nav, .side.left .agenda-nav{ width: 26px; height: 26px; font-size: 14px; }
  .side.right .agenda-cell, .side.left .agenda-cell{ min-height: 30px; font-size: .9rem; }
  .side.right .agenda-grid, .side.left .agenda-grid{ gap: 3px; }
}
@media (max-width: 1024px){
  .side.right .agenda-title, .side.left .agenda-title{ font-size: .95rem; }
  .side.right .agenda-cell, .side.left .agenda-cell{ min-height: 28px; padding: 5px; font-size: .85rem; }
  .side.right .agenda-cell.head, .side.left .agenda-cell.head{ font-size: .85rem; }
}
.side.right .card, .side.left .card{ overflow: hidden; }
.side.right .agenda-grid, .side.left .agenda-grid{ width: 100%; }

/* ===== Images événement ===== */
.event-main-photo{
    display:block;
    max-width:100%;
    height:500px;
    border-radius:12px;
    object-fit:cover;
}

/* ===== Footer clair alternatif ===== */
.site-footer {
    background: #f5f7fa;
    color: #3f5fa7;
    text-align: center;
    padding: 18px 0 10px 0;
    border-top: 1px solid #e1e5eb;
    font-size: 1rem;
    margin-top: 40px;
}
.site-footer .footer-content { font-weight: 500; letter-spacing: 0.03em; }
@media (max-width: 600px) {
    .site-footer { font-size: 0.95rem; padding: 16px 0 8px 0; }
}

/* ===== Admin ===== */
.admin-sidebar ul { list-style: none; padding: 0; margin: 0; }
.admin-sidebar li + li { margin-top: 8px; }
.admin-sidebar a {
  display: block; padding: 10px; border-radius: 4px; color: #333333;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background-color: #007BFF; color: #FFFFFF; }

.kpi-cards { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 20px; }
.kpi-cards .card { background: #F9F9F9; border: 1px solid #DDDDDD; border-radius: 8px; padding: 20px; flex: 1 1 200px; text-align: center; font-size: 1.2em; }

.admin-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.admin-table th, .admin-table td { border: 1px solid #DDDDDD; padding: 8px; text-align: left; }
.admin-table th { background: #007BFF; color: #FFFFFF; }
.admin-table tr:nth-child(even) { background: #FAFAFA; }

/* Masquer les liens individuels en desktop (existent pour mobile) */
@media (min-width: 768px) {
    .main-nav .menu-mobile-only { display: none !important; }
}

/* =========================
   Page : Connexion (scopée)
   ========================= */
body.page-connexion {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #eef3f7 0%, #f7f9fb 60%, #eef2f6 100%);
}
.page-connexion .auth-layout { flex: 1; }
.page-connexion .content { display: flex; align-items: center; justify-content: center; }
.page-connexion .auth-container { width: 100%; max-width: 460px; padding: 32px 16px; }
.page-connexion .auth-card {
    background: #ffffff;
    border: 1px solid #e4e9ef;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow:
        0 8px 24px rgba(44, 62, 80, 0.08),
        0 2px 8px rgba(44, 62, 80, 0.06);
    text-align: left;
    padding-left: 32px;
    padding-right: 32px; /* <- FIX: accolade fermée juste après */
}
.page-connexion .auth-title {
    margin: 0 0 16px 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    letter-spacing: 0.2px;
}
.page-connexion .auth-alert {
    background: #eaf1ff;
    border: 1px solid #c9d7f2;
    color: #1f3658;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
}
.page-connexion .auth-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 8px;
}
.page-connexion .form-label { font-size: 0.92rem; color: #3c4d63; }
.page-connexion .form-input {
    display: block;
    width: 100%;
    border: 1px solid #cfd8e3;
    background: #ffffff;
    color: #2c3e50;
    border-radius: 10px;
    padding: 10px 12px;
    outline: none;
    transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.page-connexion .form-input::placeholder { color: #9aa7b5; }
.page-connexion .form-input:focus {
    border-color: #2c3e50;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.18);
    background: #fbfdff;
}
.page-connexion .auth-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 6px;
}
.page-connexion .btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 90ms ease, box-shadow 120ms ease, background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.page-connexion .btn:active { transform: translateY(1px); }
.page-connexion .btn-primary {
    background: #2c3e50;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(44, 62, 80, 0.25);
}
.page-connexion .btn-primary:hover { background: #253646; }
.page-connexion .btn-secondary {
    background: #ffffff;
    color: #2c3e50;
    border-color: #cfd8e3;
}
.page-connexion .btn-secondary:hover { background: #f2f5f8; border-color: #b9c6d3; }
.page-connexion .btn-icon { margin-right: 8px; }
.page-connexion .auth-links { text-align: center; margin-top: 8px; }
.page-connexion .auth-links a {
    color: #2c3e50;
    text-decoration: none;
    border-bottom: 1px dashed rgba(44,62,80,0.35);
    padding-bottom: 1px;
}
.page-connexion .auth-links a:hover { border-bottom-color: rgba(44,62,80,0.6); }
.page-connexion .full-width-footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 14px 16px;
    margin-top: auto;
}
.page-connexion .full-width-footer .footer-inner {
    display: flex;
    gap: 14px;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
.page-connexion .full-width-footer .footer-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.page-connexion .full-width-footer a {
    color: #ecf0f1;
    text-decoration: none;
    opacity: 0.95;
}
.page-connexion .full-width-footer a:hover {
    text-decoration: underline;
    opacity: 1;
}
@media (max-width: 520px) {
    .page-connexion .auth-card {
        border-radius: 14px;
        padding: 22px 18px;
    }
}

/* ===== Page Inscription : aligner labels/inputs en colonnes ===== */
body.page-inscription main,
body.page-inscription .content { 
    text-align: left; /* stoppe le centrage global sur cette page */
}

body.page-inscription .auth-form{
    display: grid;
    grid-template-columns: max-content 1fr; /* 1ère col = largeur du + long label */
    column-gap: 14px;
    row-gap: 12px;
    align-items: center;
}

/* Labels à droite de leur colonne, sans retour à la ligne intempestif */
body.page-inscription .auth-form label{
    grid-column: 1;
    justify-self: end;
    white-space: nowrap;
    margin: 0;
}

/* Tous les champs commencent exactement sous ceux du dessus (colonne 2) */
body.page-inscription .auth-form input[type="text"],
body.page-inscription .auth-form input[type="email"],
body.page-inscription .auth-form input[type="password"],
body.page-inscription .auth-form input[type="date"],
body.page-inscription .auth-form input[type="number"],
body.page-inscription .auth-form input[type="file"],
body.page-inscription .auth-form select,
body.page-inscription .auth-form textarea{
    grid-column: 2;
    width: 100%;
    box-sizing: border-box;
}

/* Zone d’actions (boutons) = centrée et sur toute la largeur */
body.page-inscription .auth-form .auth-actions,
body.page-inscription .auth-form .form-actions{
    grid-column: 1 / -1;
    justify-self: center;
}

/* Messages d’alerte / aide éventuels */
body.page-inscription .auth-form .alert,
body.page-inscription .auth-form .hint{
    grid-column: 1 / -1;
}

/* Responsive : on repasse en pile sur petits écrans */
@media (max-width: 560px){
    body.page-inscription .auth-form{
        grid-template-columns: 1fr;
    }
    body.page-inscription .auth-form label{
        justify-self: start;
        margin-bottom: 2px;
    }
    body.page-inscription .auth-form .auth-actions,
    body.page-inscription .auth-form .form-actions{
        justify-self: stretch;
    }
}
/* ==== Page inscription : aide & jauge mot de passe ==== */
body.page-inscription .form-hint{
    margin: 6px 0 8px 0;
    font-size: .92rem;
    color: #3c4d63;
}
body.page-inscription .pwd-strength{
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
    margin: 6px 0 4px 0;
}
body.page-inscription .pwd-strength-bar{
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: #ecf0f1;
    overflow: hidden;
}
body.page-inscription .pwd-strength-bar::after{
    content: "";
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 0%;
    background: #e74c3c;
    transition: width .18s ease;
    border-radius: 999px;
}
body.page-inscription .pwd-strength-label{
    font-size: .92rem;
    color: #2c3e50;
    white-space: nowrap;
    font-weight: 600;
}
/* Niveaux 0→4 (couleur + largeur) */
body.page-inscription .pwd-strength-bar.level-0::after{ width: 0%;   background:#e74c3c; }
body.page-inscription .pwd-strength-bar.level-1::after{ width: 25%;  background:#e67e22; }
body.page-inscription .pwd-strength-bar.level-2::after{ width: 50%;  background:#f1c40f; }
body.page-inscription .pwd-strength-bar.level-3::after{ width: 75%;  background:#3498db; }
body.page-inscription .pwd-strength-bar.level-4::after{ width: 100%; background:#2ecc71; }

body.page-inscription .pwd-missing{
    margin: 6px 0 0 0;
    padding-left: 18px;
    color: #7f8c8d;
    font-size: .9rem;
}
body.page-inscription .pwd-missing li{ margin: 2px 0; }

/* ===== Page Inscription : limiter la largeur des champs ===== */
body.page-inscription .auth-container { max-width: 640px; margin: 0 auto; }
body.page-inscription .auth-card     { max-width: 560px; margin: 0 auto; }

/* Le grid ne s’étire plus sur toute la .content */
body.page-inscription .auth-form{
    /* 1ère col = label, 2e col = largeur limitée */
    grid-template-columns: max-content min(420px, 90vw);
    justify-content: center; /* centre le bloc labels+champs, sans l’étirer */
}

/* Les champs prennent 100% de leur colonne limitée (pas plus) */
body.page-inscription .auth-form input[type="text"],
body.page-inscription .auth-form input[type="email"],
body.page-inscription .auth-form input[type="password"],
body.page-inscription .auth-form input[type="date"],
body.page-inscription .auth-form input[type="number"],
body.page-inscription .auth-form input[type="file"],
body.page-inscription .auth-form select,
body.page-inscription .auth-form textarea{
    width: 100%;
    max-width: 100%;
}

/* Jauge/infos alignées à la même largeur que le champ */
body.page-inscription #pwd-requirements,
body.page-inscription .pwd-strength,
body.page-inscription #pwd-missing{
    grid-column: 2;           /* sous le champ */
    max-width: 420px;         /* calé sur la colonne 2 */
}

/* Responsive : sur petits écrans on repasse en pile */
@media (max-width: 560px){
    body.page-inscription .auth-form{
        grid-template-columns: 1fr;
        justify-content: stretch;
    }
    body.page-inscription #pwd-requirements,
    body.page-inscription .pwd-strength,
    body.page-inscription #pwd-missing{
        grid-column: 1;
        max-width: 100%;
    }
}

/* ===== Page Confirmation d'inscription ===== */
body.page-confirmation .content{
    display: flex;
    justify-content: center;
    align-items: start;
}

.confirm-card{
    width: 100%;
    max-width: 640px;
    padding: 24px;
    text-align: left;
}

.confirm-icon{
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: #fff;
}
.confirm-icon.success{ background: #2ecc71; }
.confirm-icon.error{ background: #e74c3c; }

.confirm-title{
    margin: 6px 0 8px 0;
    font-size: 1.6rem;
    color: #2c3e50;
}
.confirm-lead{
    margin: 0 0 10px 0;
    color: #3c4d63;
}

.confirm-next{
    margin: 10px 0 16px 0;
    padding-left: 18px;
    color: #2c3e50;
}
.confirm-next li{ margin: 6px 0; }

.confirm-actions{
    display: flex; gap: 10px; flex-wrap: wrap;
}
.confirm-actions .btn{ min-width: 140px; }



/* ===== Onglets profil ===== */
.tabs {
  display: inline-flex;
  gap: 8px;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  margin: 0 0 12px 0;
}
.tab {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 12px; border-radius: 10px; text-decoration: none;
  color: #2c3e50; border: 1px solid transparent;
}
.tab:hover { background: #f2f4f7; }
.tab.active {
  background: #ecf0f1; border-color: rgba(44,62,80,.15); font-weight: 600;
}
/* ====== Upload ====== */
.input-file-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ====== Photo principale avec incrustation ====== */
.photo-principale .img-wrap {
  position: relative;
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  max-width: 100%;
}
.photo-principale img {
  display: block;
  width: 100%;
  height: auto;
}
.overlay-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(44,62,80,0.85); /* #2c3e50 avec alpha */
  color: #ecf0f1;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: .2px;
}

/* ====== Grille vignettes uniformes ====== */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.photo-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.preview-btn {
  display: block;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
/* cadre carré + recadrage propre */
.thumb-frame {
  width: 100%;
  aspect-ratio: 1 / 1;      /* carré moderne */
  overflow: hidden;
}
.thumb-frame .thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;        /* remplissage uniforme */
  display: block;
}

/* fallback si aspect-ratio indisponible (anciens navigateurs) */
@supports not (aspect-ratio: 1 / 1) {
  .thumb-frame { position: relative; padding-top: 100%; }
  .thumb-frame .thumb { position: absolute; top: 0; left: 0; }
}

/* Actions sous la vignette */
.photo-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.photo-actions .btn { padding: 6px 10px; }
.photo-actions .badge {
  background: #ecf0f1;
  color: #2c3e50;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
}

.selected-files {
  font-size: 0.85rem;
  margin-top: 4px;
}
.btn-home {
  display: inline-block;
  padding: 6px 14px;
  background-color: #ecf0f1;
  color: #2c3e50;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-home:hover {
  background-color: #bdc3c7;
  color: #2c3e50;
}

/* ===== Gazette ===== */
.gazette-block { padding: 12px; }
.block-title { margin: 0 0 8px 0; font-size: 1.2rem; font-weight: 600; }

.gazette-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gazette-item { display: flex; gap: 10px; align-items: flex-start; }
.gazette-thumb { display: block; flex: 0 0 64px; width: 64px; height: 64px; overflow: hidden; border-radius: 10px; }
.gazette-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gazette-meta { display: flex; flex-direction: column; gap: 4px; }
.gazette-title { font-weight: 600; color: #2c3e50; text-decoration: none; }
.gazette-title:hover { text-decoration: underline; }
.gazette-chapo { margin: 0; color: #555; font-size: .9rem; }
.gazette-actions { margin-top: 10px; }

.gazette-article { padding: 16px; }
.gazette-article-title { margin-top: 0; }
.gazette-figure { margin: 0 0 12px 0; border-radius: 12px; overflow: hidden; }
.gazette-figure img { width: 100%; height: auto; display: block; }
.gazette-article-chapo { font-weight: 600; margin: 0 0 10px 0; }
.gazette-article-content { white-space: pre-line; }

.gazette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 12px; }
.gazette-card { display: block; padding: 12px; text-decoration: none; }
.gazette-card-thumb { width: 100%; height: 140px; object-fit: cover; border-radius: 12px; }
.gazette-card-title { margin: 8px 0 4px 0; color: #2c3e50; font-size: 1.05rem; }
.gazette-card-chapo { margin: 0; color: #555; font-size: .95rem; }

/* Admin petites touches réutilisables */
.toolbar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.form .form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.form .form-row.inline { flex-direction: row; gap: 12px; }
.form .hint { margin: 6px 0 0 0; font-size: .9rem; color: #666; }

/* Bouton d'édition d'événement (créateur) */
.owner-actions {
    margin: 10px 0 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-edit {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #2c3e50;    /* couleur header */
    color: #2c3e50;
    background: #ffffff;           /* fond clair pour contraste */
    text-decoration: none;
    font-weight: 600;
    transition: transform .02s ease, background-color .2s ease, color .2s ease;
}

.btn-edit:hover {
    background: #2c3e50;
    color: #ffffff;
    transform: translateY(-1px);
}

/* ===== Limite taille photo dans la page événement ===== */
.page-evenement .event-photo img {
    max-width: 80%;
    max-height: 500px; /* Ajuste selon ton design */
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

/* ===== Limite taille photo dans la page gazette ===== */
.page-gazette .gazette-photo img {
    max-width: 100%;
    max-height: 350px; /* Ajuste selon ton design */
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.cartouche-relation{display:flex;gap:12px;align-items:center;border:1px solid #e5e7eb;border-radius:12px;padding:12px}
.cr-avatar{display:block}
.cr-img{width:56px;height:56px;object-fit:cover;border-radius:9999px}
.cr-body{flex:1}
.cr-text{margin:0 0 .5rem 0}
.cr-name{text-decoration:none}
.cr-actions{display:flex;gap:.5rem;flex-wrap:wrap}

.relation-card { padding: 12px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; margin-bottom: 12px; }
.relation-user { display: flex; gap: 10px; align-items: center; }
.relation-user .avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.relation-user .info .pseudo { font-weight: 600; }
.relation-actions { margin-top: 10px; display: grid; gap: 10px; }
.niveau-choice { border: 0; padding: 0; margin: 0; display: flex; gap: 12px; align-items: center; }
.niveau-choice .radio { display: inline-flex; gap: 6px; align-items: center; }
.relation-actions .buttons { display: flex; gap: 8px; }

.photo-item .preview-btn {
  display:block;
  width:100%;
  aspect-ratio:1/1; /* ou 4/3 si tu préfères */
  padding:0;
  border:0;
  background:transparent;
}

.photo-item img {
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

/* === Theme picker === */
.block-theme-picker { margin-top: 1rem; }
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: .8rem;
}
.theme-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .8rem .6rem;
    border: 1px solid var(--border, #ddd);
    border-radius: .75rem;
    background: var(--tile-bg, #f7f7f7);
    cursor: pointer;
    font-weight: 600;
    transition: transform .05s ease, background .2s ease, border-color .2s ease;
}
.theme-tile:hover { transform: translateY(-1px); }
.theme-tile.active {
    background: var(--accent-soft, #eef5ff);
    border-color: var(--accent, #3b82f6);
}

.switch-row {
    display: inline-flex;
    gap: .5rem;
}
.switch-btn {
    padding: .5rem .8rem;
    border: 1px solid var(--border, #ddd);
    border-radius: .5rem;
    background: #fafafa;
    cursor: pointer;
    font-weight: 600;
}
.switch-btn.active {
    background: var(--accent-soft, #eef5ff);
    border-color: var(--accent, #3b82f6);
}

/* Autocomplétion type évènement (reuse pattern villes) */
.suggestions {
    position: absolute;
    z-index: 30;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: .5rem;
    margin-top: .25rem;
    width: min(520px, 100%);
    display: none;
    max-height: 280px;
    overflow: auto;
}
.field { position: relative; margin-top: .9rem; }
.suggestion-item { padding: .5rem .7rem; cursor: pointer; }
.suggestion-item:hover { background: #f5f5f5; }
.suggestion-item.disabled { color: #888; cursor: default; }

.form-sep {
    margin-top: 1.5rem;
}
/* Champ description dans le formulaire de création d’événement */
.formulaire textarea {
    min-height: 140px;         /* Hauteur confortable, ajustable */
    resize: vertical;          /* Autorise l’utilisateur à agrandir si besoin */
    width: 100%;               /* Prend toute la largeur disponible */
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
    color: #111;
}
.form-evenement textarea {
    min-height: 140px;
    resize: vertical;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
    color: #111;
}


/* ===== Icône notifications (cloche) (fallback data-count) ===== */
.notif-btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  color: #ecf0f1;              /* texte clair sur header #2c3e50 */
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(236,240,241,0.25);
}
.notif-btn:hover,
.notif-btn:focus-visible{
  background-color: rgba(236,240,241,0.12);
  border-color: rgba(236,240,241,0.45);
  outline: none;
}
.notif-btn .icon{
  font-size: 20px;
  line-height: 1;
}

/* Badge compteur */
.notif-btn .badge{
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #E74C3C;        /* rouge alerte */
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #2c3e50;  /* anneau pour contraste sur header */
}

/* Fallback: pastille via pseudo-élément si .badge est perturbé */
.notif-btn[data-count]:after{
  content: attr(data-count);
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 6px;
  border-radius: 999px; background:#e74c3c; color:#fff;
  font-size:12px; font-weight:700; display:inline-flex;
  align-items:center; justify-content:center;
  border:2px solid #2c3e50;
}
.notif-btn .badge{ display:none; } /* optionnel si tu veux n’avoir qu’un seul rendu */

/* ===== Patch centrage inscription (neutralise la grille ratée) ===== */
body.page-inscription .auth-form {
  display: block !important;        /* on annule le display:grid déclaré plus haut */
}

body.page-inscription .grid-two {
  display: flex !important;         /* une seule colonne centrée */
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 420px;                 /* largeur uniforme des champs */
  margin: 0 auto;                   /* centre dans .content */
  align-items: stretch;             /* les champs prennent toute la largeur */
}

body.page-inscription .grid-two > div {
  width: 100%;
}

body.page-inscription .form-label {
  display: block;
  margin-bottom: 6px;
}

body.page-inscription .form-input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  padding: 10px 12px;
}
/* Visibilité & mise à niveau du champ mot de passe dans les formulaires génériques */
.form-card .form-field input[type="password"] {
  display: block !important;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  background: #ffffff;
  color: #2c3e50;
}

.bloc-side.alert-profil {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
}
.bloc-side.alert-profil h3 {
    margin-top: 0;
    color: #856404;
    font-size: 1.1em;
}
.bloc-side.alert-profil p {
    font-size: 0.9em;
    color: #856404;
    margin: 10px 0;
}
.bloc-side.alert-profil .btn {
    background-color: #ffc107;
    color: #212529;
    padding: 8px 14px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
}
.bloc-side.alert-profil .btn:hover {
    background-color: #e0a800;
}

.relation-edit-menu {
  position: relative;
  display: inline-block;
}
.relation-edit-menu .edit-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  margin-left: 6px;
  font-size: 1em;
  color: #3498db;
  vertical-align: middle;
}
.relation-edit-menu .menu {
  display: none;
  position: absolute;
  left: 0; top: 110%;
  background: #fff;
  border: 1px solid #cdd;
  border-radius: 8px;
  min-width: 140px;
  box-shadow: 0 2px 10px #0001;
  z-index: 99;
  padding: 6px 0;
}
.relation-edit-menu.open .menu { display: block; }
.relation-edit-menu .menu form {
  margin: 0;
}
.relation-edit-menu .menu button {
  display: block;
  width: 100%;
  padding: 6px 16px;
  border: none;
  background: none;
  text-align: left;
  color: #333;
  cursor: pointer;
}
.relation-edit-menu .menu button:hover {
  background: #eef6fb;
}
.relation-edit-menu .menu .danger {
  color: #c00;
}

/* ======= (Fin) ========= */

/* Réglages mobiles généraux (hors diagnostic) */
@media (max-width: 767px) {
  .layout {
    grid-template-columns: 1fr !important;
    padding: 8px !important;
    gap: 8px !important;
  }
  .side.left, .side.right {
    display: none !important;
  }
  .content {
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: 100vw !important;
  }
  /* Formulaire recherche */
  .formulaire {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 8px !important;
    margin: 0 !important;
    box-sizing: border-box;
  }
  .formulaire .champ {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
    width: 100%;
  }
  /* Grille des catégories = 1 col */
  .cat-grid {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  .cat-btn {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    font-size: 1em;
  }
  /* Résultats en colonne */
  #resultats, .event-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .cartouche-evenement {
    width: 100% !important;
    min-width: 0 !important;
    border-radius: 14px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  /* Pour éviter tout débordement horizontal */
  body, html {
    overflow-x: hidden !important;
  }
  /* Boutons touch-friendly */
  .formulaire .btn, .formulaire button, .btn {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    font-size: 1.08em;
    margin: 8px 0 !important;
    padding: 12px 0 !important;
    border-radius: 10px !important;
  }
}
@media (max-width: 767px) {
  .layout {
    grid-template-columns: 1fr !important;
    padding: 0 !important;
    gap: 0 !important;
  }
  .side.left, .side.right {
    display: none !important;
    width: 0 !important;
    padding: 0 !important;
  }
  .content {
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 0 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }
  .formulaire {
    margin: 0 auto !important;
    padding: 12px 6px !important;
    max-width: 100vw !important;
    box-sizing: border-box;
  }
}
@media (max-width: 767px) {
  .layout {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100vw !important;
    box-sizing: border-box !important;
    background: none !important;
  }
  .side.left, .side.right {
    display: none !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .content {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    padding: 0 0 !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    background: none !important;
  }
  .formulaire {
    margin: 0 auto !important;
    padding: 18px 6px !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
}

/* utilitaires */
.break-mobile { display: none; }
@media (max-width: 767px) {
  .break-mobile { display: block; }
}
/* =========================================================
   [S36-R] Recherche d’événements — correctifs responsive
   Ciblage strict: .page-recherche pour éviter tout débordement
   ========================================================= */

.page-recherche main { padding: 20px 12px; }

/* Grille & colonnes */
@media (max-width: 767px){
  .page-recherche .layout{
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
  }
  .page-recherche .side.left,
  .page-recherche .side.right{ display: none; }

  /* ⚠️ Annule les 100vw hérités (source du "décalage à droite") */
  .page-recherche .content,
  .page-recherche .layout,
  .page-recherche #resultats,
  .page-recherche .event-list{
    width: 100% !important;
    max-width: 100% !important;
  }

  html, body{ overflow-x: hidden; }
}

/* Formulaire */
.page-recherche .formulaire{
  width: 100%;
  max-width: 100%;
  padding: 8px;
  margin: 0;
  box-sizing: border-box;
}
.page-recherche .formulaire .champ{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  width: 100%;
}

/* Catégories (ex-styles inline) */
.page-recherche .cat-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}
@media (max-width: 900px){
  .page-recherche .cat-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px){
  .page-recherche .cat-grid{ grid-template-columns: 1fr; }
}
.page-recherche .cat-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cfd6e4;
  background: #f7f9fc;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  text-align: center;
  min-height: 44px;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
  width: 100%;                /* plein conteneur en mobile */
  box-sizing: border-box;
}
.page-recherche .cat-btn:hover{ background: #f0f4fb; }
.page-recherche .cat-btn.selected{
  background: #2f6fed;
  color: #fff;
  border-color: #2f6fed;
}
.page-recherche .hint{ font-size: 12px; color: #64748b; margin-bottom: 6px; }

/* Autocomplétion ville: largeur conteneur */
.page-recherche #suggestions-ville.suggestions{
  left: 0;
  right: 0;
  width: 100%;
}

/* Résultats: colonne en mobile */
@media (max-width: 767px){
  .page-recherche #resultats,
  .page-recherche .event-list{
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}

/* Cartouches évènement (version mobile stable et unique) */
@media (max-width: 767px){
  .page-recherche .cartouche-lien{
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .page-recherche .cartouche-evenement{
    width: 100% !important;
    margin: 0 !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
  }
  .page-recherche .cartouche-photo{
    width: 100% !important;
    max-width: 180px !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 auto 10px auto !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    background: #eee !important;
    flex: none !important;
  }
  .page-recherche .cartouche-photo img{
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }
  .page-recherche .cartouche-infos{
    padding: 8px 4px !important;
    text-align: center !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* Boutons touch-friendly dans le form de recherche */
@media (max-width: 767px){
  .page-recherche .formulaire .btn,
  .page-recherche .formulaire button,
  .page-recherche .btn{
    width: 100% !important;
    min-width: 0 !important;
    font-size: 1.08em;
    margin: 8px 0 !important;
    padding: 12px 0 !important;
    border-radius: 10px !important;
  }
}
/* Page Recherche événements : masquer les sides en mobile */
@media (max-width: 767px){
  .page-recherche .layout{
    grid-template-columns: 1fr;
  }
  .page-recherche .side.left,
  .page-recherche .side.right{
    display: none !important;
  }
}



  /* 4) Neutralise la règle fautive qui créait des espaces */
  .main-nav .menu-mobile-only {
    display: block !important;     /* pas de flex colonne ici */
    gap: 0 !important;             /* supprime tout espacement interne */
  }


/* 6) Sécurité : en mobile, aucun lien burger ne reprend la marge générique */
@media (max-width: 767px) {
  nav a.btn.menu-mobile-only { margin: 0 !important; }
}
/* ===== Menus déroulants : tailles accessibles ===== */

/* Base desktop : taille confortable */
select,
.custom-select,
.dropdown .trigger,
.dropdown-toggle,
.dropdown .btn {
  min-height: 40px;
  padding: 10px 12px;
  line-height: 1.2;
}

/* Éléments de liste dans les dropdowns "custom" */
.dropdown-menu li,
.dropdown-menu a,
.dropdown-menu button,
.autocomplete-list li,
.autocomplete-item {
  display: block;
  padding: 10px 12px;
  line-height: 1.2;
}

/* --- MOBILE : on triple la hauteur --- */
@media (max-width: 900px) {
  select,
  .custom-select,
  .dropdown .trigger,
  .dropdown-toggle,
  .dropdown .btn {
    min-height: 60px;         /* ~x3 vs 20px classiques */
    padding: 18px 14px;        /* zones de touche plus grandes */
    font-size: 1.05rem;        /* un léger boost de lisibilité */
  }

  .dropdown-menu li,
  .dropdown-menu a,
  .dropdown-menu button,
  .autocomplete-list li,
  .autocomplete-item {
    padding: 18px 14px;        /* triple la hauteur par item */
    font-size: 1.05rem;
  }
}

/* Optionnel : limite de hauteur avec scroll interne si besoin */
.dropdown-menu {
  max-height: 60vh;
  overflow-y: auto;
}
/* ===== Form fields: tailles mobiles unifiées (généralisé) ===== */
@media (max-width: 900px) {
  /* Champs standards (toutes pages) */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="date"],
  input[type="number"],
  input[type="tel"],
  input[type="file"],
  select,
  textarea {
    padding: 16px 14px;     /* ↑ zone de touche */
    min-height: 52px;       /* ≈ x2.5–x3 vs défauts étroits */
    font-size: 1.05rem;     /* légère lisibilité */
    line-height: 1.25;
  }

  /* Textareas : un peu plus haut par défaut */
  textarea {
    min-height: 160px;
  }

  /* Items des listes déroulantes "custom" et autocomplétions */
  .dropdown-menu li,
  .dropdown-menu a,
  .dropdown-menu button,
  .autocomplete-list li,
  .autocomplete-item,
  .suggestion-item {
    padding: 18px 14px;     /* x3 hauteur cliquable */
    font-size: 1.05rem;
    line-height: 1.25;
  }

  /* Conteneurs de suggestions : confort de toucher/scroll */
  .suggestions,
  .dropdown-menu {
    -webkit-overflow-scrolling: touch;
    max-height: 60vh;
    overflow-y: auto;
  }

  /* Labels courants (optionnel, pour respiration) */
  .form-field label,
  .formulaire .champ label,
  .form-event label {
    margin-bottom: 6px;
    line-height: 1.25;
  }
}

/* iOS/Android : apparence native propre des selects, sans zoom auto */
@media (max-width: 900px) {
  select {
    -webkit-appearance: none;
    appearance: none;
    background-clip: padding-box;
  }
  input, select, textarea {
    font-size: 16px; /* évite le zoom iOS à la focale */
  }
}
/* ===== Mobile: champs & menus avec texte agrandi X2 ===== */
@media (max-width: 900px) {
  /* Champs standards */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="date"],
  input[type="number"],
  input[type="tel"],
  input[type="file"],
  select,
  textarea {
    font-size: 1.64rem;   /* environ x2 par rapport à 1.12rem précédent */
    line-height: 1.3;
  }

  /* Placeholders */
  input::placeholder,
  textarea::placeholder {
    font-size: 1.62rem;
    opacity: .9;
  }

  /* Options <select> */
  select option {
    font-size: 1.64rem;
  }

  /* Items de listes custom & autocomplétion */
  .dropdown-menu li,
  .dropdown-menu a,
  .dropdown-menu button,
  .autocomplete-list li,
  .autocomplete-item,
  .suggestion-item {
    font-size: 1.64rem;
    line-height: 1.3;
  }

  /* Labels de champs */
  .form-field label,
  .formulaire .champ label,
  .form-event label {
    font-size: 1.62rem;
    line-height: 1.3;
  }
}
/* ============================================
   Page modifier évènement (scopée)
   ============================================ */
.page-evenement-edit .content {
  text-align: left;
}

/* Grille catégories : on reprend le pattern "recherche" mais sans dupliquer le code */
.page-evenement-edit .cat-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 8px 0;
}
@media (max-width: 1000px){ .page-evenement-edit .cat-grid{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .page-evenement-edit .cat-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .page-evenement-edit .cat-grid{ grid-template-columns: 1fr; } }

.page-evenement-edit .cat-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cfd6e4;
  background: #f7f9fc;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  text-align: center;
  min-height: 44px;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
  width: 100%;
  box-sizing: border-box;
}
.page-evenement-edit .cat-btn:hover{ background: #f0f4fb; }
.page-evenement-edit .cat-btn.selected{
  background: #2f6fed;
  color: #fff;
  border-color: #2f6fed;
}

.page-evenement-edit .hint{ font-size: 12px; color: #64748b; margin-top: 6px; }

/* Bloc sous-catégories */
.page-evenement-edit .subcats-container { margin-top: 6px; }
.page-evenement-edit .subcat-wrap{
  margin: 8px 0 0;
  padding: 10px;
  border: 1px dashed #cfd6e4;
  border-radius: 10px;
  background: #fafcff;
}
.page-evenement-edit .subcat-row{
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 10px;
  align-items: center;
  margin: 6px 0;
}
@media (max-width: 640px){ .page-evenement-edit .subcat-row{ grid-template-columns: 1fr; } }

.page-evenement-edit .subcat-label{ font-weight: 600; }
.page-evenement-edit .subcat-input{
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cfd6e4;
  border-radius: 8px;
  font: inherit;
}

/* Form & actions */
.page-evenement-edit .formulaire .champ{ margin: 10px 0; }
.page-evenement-edit .form-sep{ height: 10px; }
.page-evenement-edit .form-row{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px){
  .page-evenement-edit .form-row{ grid-template-columns: 1fr; }
}

/* Autocomplétion : on réutilise .suggestions / .suggestion-item définies globalement */
.page-evenement-edit #suggestions-ville.suggestions{
  left: 0;
  right: 0;
  width: 100%;
}

/* Photo actuelle */
.page-evenement-edit .form-photo-preview{
  display:block;
  margin: 6px 0 10px;
  max-width: 240px;
  border-radius: 8px;
}
.page-evenement-edit .form-help{ color:#64748b; font-size:.95rem; }

/* Boutons : on garde la charte */
.page-evenement-edit .form-actions{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 12px;
}
.page-evenement-edit .btn{ background:#2c3e50; color:#fff; }
.page-evenement-edit .btn.btn-secondary{
  background:#fff; color:#2c3e50; border:1px solid #2c3e50;
}
.page-evenement-edit .btn.btn-secondary:hover{ background:#2c3e50; color:#fff; }

/* Mobile: champs/menus + typo déjà amplifiés par tes règles globales @media(max-width:900px) */


/* =========================================================
   Page Modifier Évènement : empêcher tout débordement horizontal
   (neutralise les width:100vw hérités et force le fit contenu)
   ========================================================= */
.page-evenement-edit .layout,
.page-evenement-edit .content {
  width: 100% !important;      /* au lieu de 100vw */
  max-width: 100% !important;
  overflow-x: hidden;           /* coupe toute fuite résiduelle */
}

/* Les blocs de formulaire ne dépassent jamais le content */
.page-evenement-edit .formulaire,
.page-evenement-edit .formulaire .champ,
.page-evenement-edit .form-row,
.page-evenement-edit .form-group {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Champs : occupent 100% de leur colonne sans déborder */
.page-evenement-edit input[type="text"],
.page-evenement-edit input[type="email"],
.page-evenement-edit input[type="password"],
.page-evenement-edit input[type="date"],
.page-evenement-edit input[type="time"],
.page-evenement-edit input[type="number"],
.page-evenement-edit input[type="tel"],
.page-evenement-edit input[type="file"],
.page-evenement-edit select,
.page-evenement-edit textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;       /* padding + border inclus */
  min-width: 0;                 /* évite l’élargissement forcé en grid/flex */
}

/* Grilles du formulaire : repli propre en mobile */
@media (max-width: 900px){
  .page-evenement-edit .form-row{
    grid-template-columns: 1fr !important;
  }
}

/* Catégories : boutons et conteneur 100% de la colonne */
.page-evenement-edit .cat-grid { width: 100%; max-width: 100%; }
.page-evenement-edit .cat-btn  { width: 100%; box-sizing: border-box; }

/* Autocomplétion : ne dépasse jamais le parent */
.page-evenement-edit #suggestions-ville.suggestions{
  left: 0; right: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Images d’aperçu : toujours contenues */
.page-evenement-edit .form-photo-preview{
  max-width: 100%;
  height: auto;
}

/* Sécurité : évite qu’un texte long force un scroll horizontal */
.page-evenement-edit .content,
.page-evenement-edit .formulaire {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Option mini-tél. : si l’écran est très étroit, on garde la lisibilité
   sans créer de scroll horizontal, tout en respectant la taille mobile x2 */
@media (max-width: 360px){
  .page-evenement-edit input,
  .page-evenement-edit select,
  .page-evenement-edit textarea,
  .page-evenement-edit .suggestion-item,
  .page-evenement-edit .dropdown-menu a,
  .page-evenement-edit .dropdown-menu button {
    font-size: clamp(16px, 4.8vw, 2.24rem); /* ≤ taille cible, mais adaptatif */
  }
}

/* ===== Page créer événement (responsive) ===== */
.page-creer-evenement .cat-section { margin: 16px 0 8px; }

.page-creer-evenement .cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 1000px) {
  .page-creer-evenement .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .page-creer-evenement .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .page-creer-evenement .cat-grid { grid-template-columns: 1fr; }
}

.page-creer-evenement .cat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cfd6e4;
  background: #f7f9fc;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
  text-align: center;
  min-height: 44px;
}
.page-creer-evenement .cat-btn:hover { background: #f0f4fb; }
.page-creer-evenement .cat-btn.selected {
  background: #2f6fed; color: #fff; border-color: #2f6fed;
}

/* Bloc sous-catégories */
.page-creer-evenement .subcat-wrap {
  margin: 6px 0 0;
  padding: 10px;
  border: 1px dashed #cfd6e4;
  border-radius: 10px;
  background: #fafcff;
}
.page-creer-evenement .subcat-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 10px;
  align-items: center;
  margin: 6px 0;
}
@media (max-width: 640px) {
  .page-creer-evenement .subcat-row { grid-template-columns: 1fr; }
}
.page-creer-evenement .subcat-label { font-weight: 600; }
.page-creer-evenement .subcat-input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #cfd6e4;
  border-radius: 8px;
}
.page-creer-evenement .hint { font-size: 12px; color: #64748b; margin-top: 4px; }

/* Formulaire générique local à la page (sans impacter le reste) */
.page-creer-evenement .formulaire .champ { margin: 10px 0; }
.page-creer-evenement .form-sep { height: 10px; }
.page-creer-evenement .btn {
  padding: 10px 16px;
  border-radius: 8px;
  border: 0;
  background: #2f6fed;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

/* Autocomplétion ville */
.page-creer-evenement .rel { position: relative; }
.page-creer-evenement .suggestions {
  position: absolute;
  background: #fff;
  border: 1px solid #cfd6e4;
  width: 100%;
  max-height: 220px;
  overflow: auto;
  display: none;
  z-index: 1200; /* au-dessus du contenu */
}
.page-creer-evenement .suggest-item { padding: 6px 10px; cursor: pointer; }
.page-creer-evenement .suggest-item:hover { background: #f1f5f9; }

/* Groupes */
.page-creer-evenement .groupes-container { display: none; margin-top: 15px; }
.page-creer-evenement .groupes-container.is-open { display: block; }

.page-creer-evenement .grp-item {
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin: 6px 0;
}


/* ===== Contention globale pour éviter les débordements ===== */
html, body { overflow-x: hidden; }

/* ===== Header au-dessus du contenu ===== */
.full-width-header { position: sticky; top: 0; z-index: 2000; }

/* ===== Dropmenus : base ===== */
.nav-group { position: relative; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  min-width: 220px; /* évite les sauts de ligne hasardeux */
  max-height: calc(100vh - 80px);
  overflow: auto;
  /* garder vos couleurs/ombres existantes */
}
.nav-group.open > .dropdown-menu { display: block; }

/* ===== Desktop : hover actif uniquement à la souris ===== */
@media (hover: hover) and (pointer: fine) {
  .nav-group:hover > .dropdown-menu { display: block; }
}


/* ============================
   DESKTOP NUKE (≥1024px)
   ============================ */
@media (min-width: 1024px) {
  /* 1) Efface tout le contenu mobile dans .main-nav (même forcé) */
  .full-width-header .main-nav .menu-mobile-only,
  .full-width-header .main-nav .mobile-only,
  .full-width-header .main-nav a.btn.menu-mobile-only,
  .full-width-header .main-nav .btn.menu-mobile-only,
  /* blanket: cache toutes les .btn dans la nav… */
  .full-width-header .main-nav a.btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    width: 0 !important; height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
  }

  /* 2) …puis on RÉ-AFFICHE explicitement le contenu desktop */
  .full-width-header .main-nav .nav-groups,
  .full-width-header .main-nav .nav-groups > *,
  .full-width-header .main-nav .nav-groups a.btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: auto !important; height: auto !important;
    overflow: visible !important;
    pointer-events: auto !important;
    white-space: normal !important;
  }

  /* 3) Annule tout comportement "tiroir" même si .open reste */
  .full-width-header .main-nav {
    position: static !important;
    top: auto !important; left: auto !important;
    transform: none !important;
    width: auto !important; height: auto !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    overflow: visible !important;
    z-index: auto !important;
    padding: 0 !important;
  }
  .full-width-header .burger-btn { display: none !important; }
}



/* Desktop : le groupe sert d'ancre, le menu est caché par défaut */
@media (min-width:1024px){
  .nav-group{ position: relative !important; }   /* ancre du dropdown */
  .nav-group .dropdown-menu{ display:none; left:0 !important; right:auto !important; }
  .nav-group.open > .dropdown-menu{ display:block; } /* ouverture au clic */
  .main-nav{ overflow:visible !important; }          /* laisser dépasser le menu */
}

/* Mobile/Tablet : on neutralise les dropdowns desktop */
@media (max-width:1023px){
  .nav-group .dropdown-menu{ display:none !important; position:static !important; }
}


.dropdown-menu {
  background: rgba(255,0,0,0.2); /* fond rouge transparent juste pour voir */
  border: 1px solid red;
}

/* ===== Catégories : style chips moderne (page créer évènement) ===== */
.page-creer-evenement .cat-section { margin: 16px 0 8px; }

.page-creer-evenement .cat-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 1000px){ .page-creer-evenement .cat-grid{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .page-creer-evenement .cat-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .page-creer-evenement .cat-grid{ grid-template-columns: 1fr; } }

/* Palette (facile à ajuster) */
.page-creer-evenement{
  --cat-bg:            #f7f9fc;
  --cat-border:        #cfd6e4;
  --cat-text:          #1f2a44;
  --cat-hover-bg:      #f0f4fb;
  --cat-selected-bg:   #2f6fed;
  --cat-selected-text: #ffffff;
  --cat-selected-bd:   #2f6fed;
  --cat-shadow:        0 1px 2px rgba(16,24,40,.06), 0 1px 1px rgba(16,24,40,.04);
  --cat-shadow-in:     inset 0 1px 0 rgba(255,255,255,.25), inset 0 -1px 0 rgba(0,0,0,.06);
}

.page-creer-evenement .cat-btn{
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  width: 100%;

  border-radius: 12px;
  border: 1px solid var(--cat-border);
  background: linear-gradient(180deg, var(--cat-bg), #eef3fb);
  color: var(--cat-text);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  user-select: none;

  box-shadow: var(--cat-shadow);
  transition: transform .06s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.page-creer-evenement .cat-btn:hover{ background: var(--cat-hover-bg); }
.page-creer-evenement .cat-btn:active{ transform: translateY(1px); }

/* Focus clavier bien visible */
.page-creer-evenement .cat-btn:focus-visible{
  outline: 3px solid rgba(47,111,237,.35);
  outline-offset: 2px;
}

/* État sélectionné */
.page-creer-evenement .cat-btn.selected{
  background: linear-gradient(180deg, #3a79ff, var(--cat-selected-bg));
  color: var(--cat-selected-text);
  border-color: var(--cat-selected-bd);
  box-shadow: var(--cat-shadow-in), 0 6px 18px rgba(47,111,237,.22);
}

/* Option : petite pastille à gauche quand sélectionné */
.page-creer-evenement .cat-btn.selected::before{
  content: "✓";
  font-weight: 800;
  margin-right: 2px;
}

/* Raccourcis mobiles : confort tactile */
@media (max-width: 767px){
  .page-creer-evenement .cat-btn{ font-size: 1.05rem; }
}

/* Respecte l’utilisateur qui préfère moins d’animations */
@media (prefers-reduced-motion: reduce){
  .page-creer-evenement .cat-btn{ transition: none; }
}
/* Logo du header toujours en blanc */
.full-width-header .site-title a {
  color: #ffffff !important;
  text-decoration: none;
}

.full-width-header .site-title a:visited,
.full-width-header .site-title a:hover,
.full-width-header .site-title a:active {
  color: #ffffff !important;
  text-decoration: none;
}
/* Jour d’inscription : légère surbrillance + point indicateur */
.agenda-cell.day.signup-day {
  position: relative;
  background-color: #eef6ff;           /* bleu très clair */
  border: 2px solid #2f6fed;           /* ta couleur d’accent */
  font-weight: 700;
}

.agenda-cell.day .day-number {
  display: inline-block;
  margin-right: 6px;
}

.agenda-cell.day .signup-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  vertical-align: middle;
  border-radius: 50%;
  background: #2f6fed;
  box-shadow: 0 0 0 2px #ffffff;       /* lisible sur fond clair */
}

/* Focus clavier bien visible */
.agenda-cell.day.signup-day:focus-visible {
  outline: 3px solid rgba(47,111,237,.35);
  outline-offset: 2px;
}
/* ====== ACCOUNT FORM – reset & unification ====== */
.account-form .form-field { position: relative; margin-bottom: 14px; }

/* Base commune inputs/selects/textarea */
.account-form .form-field input[type="text"],
.account-form .form-field input[type="email"],
.account-form .form-field input[type="date"],
.account-form .form-field input[type="time"],
.account-form .form-field input[type="number"],
.account-form .form-field input[type="password"],
.account-form .form-field select,
.account-form .form-field textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  color: #111827;
  background: #fff;
  border: 1px solid #d8dee9;
  border-radius: 10px;
  padding: 12px;             /* padding par défaut UNIFIÉ */
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none;
  appearance: none;
}

/* Focus */
.account-form .form-field input:focus,
.account-form .form-field select:focus,
.account-form .form-field textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* Select : flèche custom (pas de décalage visuel) */
.account-form .form-field select {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="12" viewBox="0 0 24 24" fill="none" stroke="%23677" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px; /* place pour la flèche */
}

/* Labels */
.account-form .form-field > label {
  display:block;
  margin: 0 0 6px;
  font-weight: 600;
  color:#374151;
}

/* Champ VILLE : on ajoute l’icône et l’espace clear, mais on ne modifie pas la base */
.account-form #ville {
  padding-left: 38px;   /* place icône */
  padding-right: 42px;  /* place clear */
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%2388a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 10c0 7-9 12-9 12S3 17 3 10a9 9 0 1 1 18 0z"/><circle cx="12" cy="10" r="3"/></svg>');
  background-repeat: no-repeat;
  background-position: 12px center;
}

/* Bouton clear: réutilise .btn .ghost, on ne change que la position */
.account-form .btn-clear-ville {
  position: absolute;
  right: 8px; top: calc(100% - 32px); /* vertical centré par rapport à l'input (12px padding + approx) */
  transform: translateY(-50%);
  padding: 4px 10px;
  line-height: 1;
  font-size: 16px;
  border-radius: 8px;
  display: none;  /* visible si .has-value sur le parent */
}
.account-form .form-field.rel.has-value .btn-clear-ville { display: inline-block; }

/* Loading léger pendant la requête (piloté par data-loading) */
.account-form .form-field.rel[data-loading="1"]::after{
  content:"";
  position:absolute; right: 44px; top: calc(100% - 32px);
  transform: translateY(-50%);
  width:16px; height:16px;
  border:2px solid #cbd5e1; border-top-color:#3b82f6; border-radius:50%;
  animation: spin .7s linear infinite;
}
@keyframes spin{ to{ transform: translateY(-50%) rotate(360deg); } }

/* Suggestions dropdown (scopée) */
.account-form #suggestions-ville{
  position:absolute; top: calc(100% + 6px); left:0; right:0;
  background:#fff; border:1px solid #d8dee9; border-radius:10px;
  box-shadow: 0 12px 24px rgba(0,0,0,.08);
  display:none; max-height: 320px; overflow:auto; z-index: 3000;
  font-size: 0.97rem;
}
.account-form #suggestions-ville .suggest-item{
  padding: 10px 12px; cursor: pointer;
  border-bottom: 1px dashed #eef2f7;
}
.account-form #suggestions-ville .suggest-item:last-child{ border-bottom:none; }
.account-form #suggestions-ville .suggest-item:hover,
.account-form #suggestions-ville .suggest-item.active{ background:#f0f6ff; }

/* IMPORTANT : rien ne doit couper la dropdown */
.account-form, .content, .layout, .block, .card { overflow: visible !important; }


#cat-sortable-list {
  min-height: 50px;
  padding: 8px 0;
}
.sortable-item {
  display: flex;
  align-items: center;
  background: #f4f6fb;
  border: 1px solid #d1dbeb;
  border-radius: 7px;
  margin: 8px 0;
  padding: 8px 14px;
  font-size: 1.08em;
  box-shadow: 0 2px 8px rgba(32,70,110,.07);
  transition: background 0.18s;
  cursor: grab;
  position: relative;
}
.sortable-item:active {
  background: #e7f0ff;
  cursor: grabbing;
}

/* Rang à gauche */
.cat-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2em;
  margin-right: 12px;
  width: 2em;
  height: 2em;
  border-radius: 50%;
  background: #e0e8f7;
  color: #274080;
  border: 2px solid #b4c8e9;
  box-shadow: 0 1px 3px rgba(32,70,110,.06);
  flex-shrink: 0;
}

/* TOP 1,2,3 effet */
.top-rank { background: #f0ca34; color: #342700; border-color: #e3b800; }
.sortable-item.top1 .cat-rank { background: #f0ca34; color: #342700; border-color: #e3b800; }
.sortable-item.top2 .cat-rank { background: #b4c8e9; color: #143873; border-color: #7ba4df; }
.sortable-item.top3 .cat-rank { background: #98dfba; color: #176940; border-color: #58b774; }

/* Option : label de la catégorie */
.cat-label {
  flex: 1;
  font-size: 1.06em;
  padding-left: 2px;
}
.sortable-structure {
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.cat-nums-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-right: 10px;
  user-select: none;
}
.cat-rank {
  width: 2.2em;
  height: 2.2em;
  font-weight: bold;
  font-size: 1.12em;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e0e8f7;
  color: #274080;
  border: 2px solid #b4c8e9;
  border-radius: 50%;
  margin-bottom: 8px;
}
.cat-rank.top-rank {
  background: #f0ca34;
  color: #342700;
  border-color: #e3b800;
}
#cat-sortable-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.sortable-item {
  display: flex;
  align-items: center;
  background: #f4f6fb;
  border: 1px solid #d1dbeb;
  border-radius: 7px;
  padding: 8px 14px;
  font-size: 1.08em;
  box-shadow: 0 2px 8px rgba(32,70,110,.07);
  cursor: grab;
  transition: background 0.18s;
  min-height: 2.2em;
}
.sortable-item:active {
  background: #e7f0ff;
  cursor: grabbing;
}
.cat-label {
  flex: 1;
  font-size: 1.06em;
  padding-left: 2px;
}
.sortable-structure {
  display: flex;
  align-items: flex-start;
}
.cat-nums-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-right: 10px;
  /* retire user-select:none si besoin */
}
.cat-rank {
  width: 2.2em;
  min-height: 40px; /* même valeur que le min-height du bouton */
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.12em;
  background: #e0e8f7;
  color: #274080;
  border: 2px solid #b4c8e9;
  border-radius: 50%;
  margin-bottom: 8px;
}
.cat-rank.top-rank {
  background: #f0ca34;
  color: #342700;
  border-color: #e3b800;
}
/* Ajoute ceci pour garder aligné sur plusieurs lignes */
#cat-sortable-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.sortable-item {
  display: flex;
  align-items: center;
  background: #f4f6fb;
  border: 1px solid #d1dbeb;
  border-radius: 7px;
  padding: 8px 14px;
  font-size: 1.08em;
  box-shadow: 0 2px 8px rgba(32,70,110,.07);
  cursor: grab;
  transition: background 0.18s;
  min-height: 40px; /* même que .cat-rank */
  /* si tu as des items sur deux lignes, mets align-items:flex-start ici */
}
.sortable-item:active {
  background: #e7f0ff;
  cursor: grabbing;
}
.cat-label {
  flex: 1;
  font-size: 1.06em;
  padding-left: 2px;
  word-break: break-word;
}
.sortable-structure2 {
  display: flex;
  align-items: flex-start;
}
.cat-numbers {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-right: 10px;
}
.cat-rank {
  width: 2.3em;
  height: 44px; /* identique à la hauteur du .sortable-item */
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.13em;
  background: #e0e8f7;
  color: #274080;
  border: 2px solid #b4c8e9;
  border-radius: 50%;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.cat-rank.top-rank {
  background: #f0ca34;
  color: #342700;
  border-color: #e3b800;
}
.sortable-list2 {
  display: flex;
  flex-direction: column;
  gap: 100px;
  flex: 1;
}
.sortable-item {
  display: flex;
  align-items: center;
  background: #f4f6fb;
  border: 1px solid #d1dbeb;
  border-radius: 7px;
  padding: 8px 14px;
  font-size: 1.08em;
  box-shadow: 0 2px 8px rgba(32,70,110,.07);
  cursor: grab;
  min-height: 44px; /* pareil que .cat-rank */
  margin-bottom: 8px;
  transition: background 0.18s;
}
.sortable-item:active {
  background: #e7f0ff;
  cursor: grabbing;
}
.cat-label {
  flex: 1;
  font-size: 1.06em;
  padding-left: 2px;
  word-break: break-word;
}
.sortable-structure2 {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
}
.cat-numbers {
  display: flex;
  flex-direction: column;
  margin-right: 12px;
  min-width: 32px;
}
.cat-rank {
  background: #e4e8f5;
  color: #2c3e50;
  border-radius: 7px;
  font-weight: 700;
  font-size: 1.15em;
  text-align: center;
  margin-bottom: 8px;
  margin-top: 0;
  box-shadow: 0 2px 6px rgba(32,70,110,.05);
  transition: background 0.18s;
  min-width: 28px;
  user-select: none;
  /* La hauteur sera synchronisée par JS */
}
.cat-rank.top-rank {
  background: #ffd700;
  color: #6a5316;
  font-size: 1.23em;
  border: 2px solid #cfb300;
}
.sortable-list2 {
  display: flex;
  flex-direction: column;
    gap: 100px;
  flex: 1;
}
.sortable-item {
  display: flex;
  align-items: center;
  background: #f4f6fb;
  border: 1px solid #d1dbeb;
  border-radius: 7px;
  margin-bottom: 8px;
  padding: 10px 14px;
  font-size: 1.08em;
  box-shadow: 0 2px 8px rgba(32,70,110,.07);
  cursor: grab;
  transition: background 0.18s;
  min-width: 0;
}
.sortable-item:active { background: #e7f0ff; cursor: grabbing; }
.cat-label { flex: 1; }


.stopsolo-highlights { max-width: 440px; margin: 0 auto 28px; }
.stopsolo-highlights .highlight-card {
  background: #f7fafc;
  border-radius: 12px;
  border-left: 4px solid #2c3e50;
  padding: 14px 18px 10px 20px;
  box-shadow: 0 2px 8px rgba(44,62,80,.06);
  width: flex;
}
.stopsolo-highlights h3 {
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-size: 1.09em;
  font-weight: 700;
  letter-spacing: .1px;
}
.stopsolo-highlights p { margin: 0 0 3px 0; font-size: 1em; color: #1f2a44;}
@media (max-width: 520px) {
  .stopsolo-highlights { max-width: 98%; padding: 0 2vw; }
}
.sortable-list.is-locked .sortable-item {
  cursor: default;
  background: #f8f9fb;
  opacity: 1;
}
.account-form.block { background:#fff; border-radius:12px; box-shadow:0 2px 14px rgba(37,77,133,.06); padding:25px 20px 18px; margin-bottom:25px;}
.block-head { margin-bottom:18px;}
.block-title { font-size:1.28em; color:#254d85; font-weight:bold; letter-spacing:.01em;}
.form-label { font-weight:500; color:#1a2949; margin-bottom:3px; display:block;}
.form-field { margin-bottom:19px;}
.form-input, select { width:100%; padding:7px 11px; border:1px solid #c4c7d1; border-radius:6px; font-size:1.03em; }
.btn-primary { background:#254d85; color:#fff; border:0; border-radius:8px; padding:10px 28px; font-weight:bold; box-shadow:0 2px 10px rgba(37,77,133,.08);}
.btn-primary:hover { background:#183664;}
.muted { color:#6a7894;}
.membre-card a:hover { text-decoration:underline;}


/* TABLETTE (portrait et paysage) : sides masquées */
@media (min-width: 768px) and (max-width: 1023px) {
  .side.left,
  .side.right {
    display: none !important;
  }
  .content {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}
@media (min-width: 1024px) {
  .side.left,
  .side.right {
    display: block;
  }
  /* Remets si besoin la largeur du content ici */
}
@media (max-width: 767px) {
  .content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
  }
}
@media (max-width: 767px) {
  .content, .content * {
    box-sizing: border-box !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    word-break: break-word !important;
  }
  img, video, iframe {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  table {
    display: block;
    overflow-x: auto;
    max-width: 100% !important;
  }
}
<style>
@media (max-width: 767px) {
  body, .content, .container, .profil, .profil-main, #profil-main {
    box-sizing: border-box !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    overflow-x: hidden !important;
    word-break: break-word !important;
  }
  img, video, iframe {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  table, .table {
    display: block !important;
    overflow-x: auto !important;
    max-width: 100% !important;
  }
}
</style>

@media (max-width: 767px) {
  html, body {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .content, .profil, .profil-main, #profil-main, .container {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  * {
    box-sizing: border-box !important;
  }
}
@media (max-width: 767px) {
  html, body, .content, #profil-main, .profil-main, .container, main, #main, .profile-header, .block, .profil, .account-header {
    margin-left: 0 !important;
    padding-left: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  * {
    box-sizing: border-box !important;
  }
}
.profile-header .profil-row-1,
.profile-header .profil-row-2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}

@media (max-width: 767px) {
  .profile-header .profil-row-1 {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
  }
  .profile-header .profil-row-2 {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 0;  /* colle bien sous la ligne précédente */
  }
  .profile-header .profil-row-1 > *,
  .profile-header .profil-row-2 > * {
    margin-bottom: 0 !important;
  }
}
/* Masque le bloc mobile sur desktop, affiche sur mobile */
.identite-mobile {
  display: none;
}
@media (max-width: 767px) {
  .identite-mobile {
    display: block !important;
    margin-bottom: 16px;
    width: 100vw !important;   /* Prend toute la largeur de la fenêtre */
    max-width: 100vw !important;
    margin-left: -6px !important; /* Décale pour compenser le padding éventuel du .content */
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
  .identite-mobile > .block,
  .identite-mobile > .cartouche-identite {
    width: 100vw !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    margin: 0 auto;
  }
}

form {
  position: relative;
  z-index: 10;
  background: #fff;
}
nav, .mobile-nav, .footer-nav {
  z-index: 20; /* Doit être inférieur au formulaire pour tester */
}
