@font-face {
  font-family: "Ulife Fredoka";
  src: url("../assets/Fredoka-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Ulife Fredoka";
  src: url("../assets/Fredoka-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Ulife Fredoka";
  src: url("../assets/Fredoka-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}
@font-face {
  font-family: "Ulife Titan";
  src: url("../assets/TitanOne-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --primary: #4697d4;
  --primary-clair: #64b4ed;
  --accent: #3d8bc7;
  --or: #ffd166;
  --danger: #f06a5a;
  --succes: #41d6ad;
  --fond-sombre: #09131c;
  --fond-carte: #10263a;
  --bordure-verre: rgba(100, 180, 237, .28);
  --texte: #f0f4f8;
  --texte-tendre: #b2c8d9;
  --rayon-carte: 22px;
  --rayon-bouton: 16px;
  --police-titre: "Ulife Titan", "Titan One", sans-serif;
  --police-texte: "Ulife Fredoka", "Fredoka", sans-serif;
  --ink: #050d14;
  font-family: var(--police-texte);
  color-scheme: dark;
}

html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  font-family: var(--police-texte);
  background: var(--fond-sombre);
  color: var(--texte);
  line-height: 1.6;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--or) !important; outline-offset: 3px; }
::selection { color: var(--ink); background: var(--or); }

.fond-ambiance {
  z-index: -1;
  background:
    radial-gradient(ellipse at 5% 5%, rgba(70,151,212,.14), transparent 36rem),
    radial-gradient(ellipse at 100% 55%, rgba(61,139,199,.1), transparent 34rem),
    var(--fond-sombre);
}
.large { width: min(1220px, 100%); padding-inline: clamp(18px, 4vw, 40px); }

/* Header : panneau Ulife compact et navigable au clavier/sur mobile. */
.entete {
  padding: 12px 0;
  background: rgba(9,19,28,.94);
  border-bottom: 2px solid rgba(100,180,237,.35);
  box-shadow: 0 8px 24px rgba(3,9,15,.2);
  backdrop-filter: blur(14px);
}
.entete::after, .pied::before { display: none; }
.entete-rang { min-height: 58px; gap: 24px; }
.marque { display: inline-flex; align-items: center; flex: 0 0 auto; }
.logo-image { height: 48px; filter: drop-shadow(0 3px 0 var(--ink)); }
.nav-liens { position: relative; gap: 5px; margin-inline: auto; }
.nav-liens a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border: 2px solid transparent;
  border-radius: 13px;
  color: var(--texte-tendre);
  font-weight: 700;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.nav-liens a:hover { color: #fff; background: #173b58; transform: translateY(-1px); }
.nav-liens a.active { color: #fff; background: #173b58; border-color: var(--primary-clair); box-shadow: 2px 3px 0 var(--ink); }
.nav-liens a.nav-vip { color: var(--or); }
.pastille-vip { background: var(--or); color: var(--ink); border: 1px solid var(--ink); font-family: var(--police-texte); }
.nav-actions { gap: 10px; }
.pastille-direct {
  border: 2px solid var(--ink);
  background: #10263a;
  color: var(--texte);
  box-shadow: 2px 3px 0 var(--ink);
  font-weight: 700;
}
.pastille-direct .puce { background: var(--succes); }
.user-info, .logout-btn, .toggle-edit-mode-btn {
  background: #173b58;
  border: 2px solid var(--ink);
  box-shadow: 2px 3px 0 var(--ink);
  color: #fff;
}
.user-info { border-radius: 14px; font-weight: 700; }
.user-badge { text-transform: none; border: 1px solid var(--ink); }
.user-badge.joueur { background: #d8e9f7; color: #10263a; }
.user-badge.moderateur { background: var(--primary-clair); color: var(--ink); }
.user-badge.directeur { background: var(--or); color: var(--ink); }
.mobile-nav-toggle { display: none; }

/* Hero : capture de Rockford en décor et panneau d'accueil à forte identité. */
.hero-background-wrapper {
  min-height: clamp(600px, 76vh, 760px);
  justify-content: flex-start;
  align-items: center;
  padding: clamp(42px, 7vw, 88px) 0;
  background-image: linear-gradient(90deg, rgba(5,13,20,.83) 0%, rgba(5,13,20,.69) 42%, rgba(5,13,20,.12) 100%), url('../assets/fond4.png');
  background-position: center 47%;
  background-size: cover;
  animation: hero-arrive .7s cubic-bezier(.2,.8,.2,1) both;
}
.hero-background-wrapper::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 150px;
  background: linear-gradient(transparent, var(--fond-sombre));
  pointer-events: none;
}
.heros-corps { width: min(1220px, 100%); margin: 0 auto; padding-inline: clamp(18px, 4vw, 40px); z-index: 1; }
.heros-centre {
  position: relative;
  width: min(660px, 100%);
  max-width: 660px;
  align-items: flex-start;
  text-align: left;
  margin: 0;
  padding: clamp(26px, 4vw, 44px);
  border: 3px solid var(--ink);
  border-radius: 28px 36px 30px 34px;
  background: linear-gradient(145deg, rgba(16,38,58,.97), rgba(9,27,43,.96));
  box-shadow: 7px 9px 0 var(--ink), 0 0 0 3px rgba(100,180,237,.85), 0 24px 75px rgba(0,0,0,.28);
  animation: hero-card-in .65s .08s cubic-bezier(.2,.8,.2,1) both;
}
.hero-sticker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px;
  margin-bottom: 14px;
  border: 2px solid var(--ink);
  border-radius: 12px 16px 11px 15px;
  color: #08202f;
  background: var(--or);
  box-shadow: 2px 3px 0 var(--ink);
  font-weight: 700;
  transform: rotate(-1.5deg);
}
.hero-live-dot { width: 9px; height: 9px; border-radius: 50%; background: #138b6d; box-shadow: 0 0 0 3px rgba(19,139,109,.15); }
.hero-logo-main { height: clamp(72px, 8vw, 104px); margin: 0 0 16px; filter: drop-shadow(3px 5px 0 var(--ink)); }
.hero-title {
  max-width: 14ch;
  margin: 0 0 12px;
  color: #fff;
  font-family: var(--police-titre);
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 400;
  line-height: 1.07;
  letter-spacing: -.025em;
  text-shadow: 2px 3px 0 var(--ink);
}
.hero-title span { color: var(--or); }
.heros-ligne-blanc {
  max-width: 50ch;
  margin: 0 0 20px;
  color: #d6e5f0 !important;
  text-align: left;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.55;
  text-shadow: none;
}
.heros-direct-pill {
  align-self: flex-start;
  gap: 11px;
  margin-bottom: 22px;
  padding: 9px 15px;
  border: 2px solid var(--ink);
  border-radius: 14px 17px 13px 16px;
  background: #0a1d2c;
  box-shadow: 3px 4px 0 var(--ink);
  backdrop-filter: none;
}
.direct-nombre { color: var(--or); font-size: 25px; }
.direct-texte b { color: #fff; }
.heros-boutons { justify-content: flex-start; gap: 12px; margin-bottom: 18px; }
.heros-btn { border: 2px solid var(--ink) !important; border-radius: 14px 17px 13px 16px !important; box-shadow: 3px 4px 0 var(--ink), 0 5px 15px rgba(0,0,0,.15) !important; }
.heros-btn:hover { transform: translate(-1px,-2px); box-shadow: 4px 6px 0 var(--ink) !important; }
.heros-adresse-box {
  align-self: flex-start;
  max-width: 100%;
  border: 2px solid var(--ink);
  border-radius: 13px 16px 12px 15px;
  background: #0a1d2c;
  box-shadow: 2px 3px 0 var(--ink);
  backdrop-filter: none;
}
.adresse-texte { color: #b9def8; overflow-wrap: anywhere; }
.copier-btn { border: 2px solid var(--ink); border-radius: 10px 12px 9px 11px; background: #173b58; }
.heros-neon-ligne { height: 5px; background: var(--primary); box-shadow: 0 -2px 0 var(--ink), 0 -6px 0 var(--or); }

/* États et relief cartoon communs aux cartes, formulaires et menus. */
.bouton, .create-request-btn, .admin-tab, .dashboard-tab-btn, .google-btn, .copier-btn, .icon-btn {
  border: 2px solid var(--ink);
  border-radius: 14px 17px 13px 16px;
  box-shadow: 3px 4px 0 var(--ink);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background-color .18s ease;
}
.bouton { font-family: var(--police-texte); }
.bouton:hover, .create-request-btn:hover, .admin-tab:hover, .dashboard-tab-btn:hover, .google-btn:hover, .copier-btn:hover, .icon-btn:hover {
  transform: translate(-1px,-2px);
  box-shadow: 4px 6px 0 var(--ink);
  filter: brightness(1.06);
}
.bouton:active, .create-request-btn:active, .admin-tab:active, .dashboard-tab-btn:active { transform: translate(2px,2px); box-shadow: 1px 2px 0 var(--ink); }
.bouton.creux { background: #173b58; border: 2px solid var(--ink); }
.bouton.or { color: #17202a; }
.carte.glass, .dashboard-content.glass, .empty-state.glass, .modal-content.glass,
.rule-section-container, .notif, .request-card, .user-item, .admin-stat-card, .maintenance-box-admin {
  border: 2px solid var(--ink);
  border-radius: 20px 25px 19px 23px;
  background: linear-gradient(145deg, #173b58, #10263a);
  box-shadow: 4px 5px 0 var(--ink);
  backdrop-filter: none;
}
.carte.glass { padding: 27px 24px; }
.carte.glass:hover { border-color: var(--primary-clair); transform: translateY(-3px) rotate(-.25deg); }
.carte-icone { border: 2px solid var(--ink); border-radius: 15px 18px 14px 17px; box-shadow: 2px 3px 0 var(--ink); }
.preuves-bande { position: relative; z-index: 2; margin: -18px 0 10px; }
.notifs { gap: 14px; }
.notif { min-height: 94px; padding: 14px 16px; }
.notif-icone { border: 2px solid var(--ink); border-radius: 13px 16px 12px 15px; box-shadow: 2px 3px 0 var(--ink); }
.notif-valeur { font-size: 16px; }
.quartier { padding: clamp(40px, 6vw, 76px) 0; }
.entree-barre { margin-bottom: 24px; }
.mots { font-size: clamp(1.9rem, 3.8vw, 2.8rem); }
.mots .accent { color: var(--primary-clair); }
.chapo { color: var(--texte-tendre); }
.exclusivity-card { border: 3px solid var(--ink); border-radius: 20px 26px 19px 23px; box-shadow: 4px 5px 0 var(--ink); }
.exclusivity-overlay { background: linear-gradient(0deg, rgba(5,13,20,.96), rgba(5,13,20,.08) 85%); }
.rule-section-container { padding: clamp(20px, 3vw, 30px); margin-bottom: 22px; }
.rule-section-header { border-color: rgba(240,244,248,.16); }
.rule-section-header h3 { font-size: clamp(1.2rem, 2.6vw, 1.65rem); }
.rule-item { align-items: flex-start; border: 1px solid rgba(240,244,248,.12); border-radius: 13px 16px 12px 15px; background: rgba(5,13,20,.28); }
.rule-item p { line-height: 1.55; }
.rule-number-badge { border: 2px solid var(--ink); border-radius: 9px 11px 8px 10px; box-shadow: 1px 2px 0 var(--ink); }
.dashboard-content.glass { padding: clamp(17px, 3vw, 30px); }
.dashboard-tabs-nav { border-bottom-color: rgba(240,244,248,.16); }
.dashboard-tab-btn { color: var(--texte-tendre); border: 2px solid var(--ink); background: #0d2234; box-shadow: 2px 3px 0 var(--ink); }
.dashboard-tab-btn.active { background: var(--primary); color: #fff; border-color: var(--ink); }
.request-card { padding: 22px; }
.status-badge { border: 2px solid var(--ink); box-shadow: 1px 2px 0 var(--ink); }
.status-badge.accepted { background: #41d6ad; }
.empty-state { padding: clamp(24px, 4vw, 40px) 20px; }
.empty-state-icon { color: var(--primary-clair); }
.user-dropdown-menu { border: 2px solid var(--ink); border-radius: 14px 17px 13px 16px; background: #10263a; box-shadow: 4px 5px 0 var(--ink); }
.logout-btn:hover { background: var(--danger); }
.toggle-edit-mode-btn:hover, .toggle-edit-mode-btn.active-mode { background: var(--succes); color: var(--ink); }

/* Modales facture, champs explicites et retours visuels cohérents. */
.modal { background: rgba(3,9,15,.76); backdrop-filter: blur(5px); }
.modal-content.glass { border: 3px solid var(--ink); border-radius: 22px 28px 21px 25px; background: #10263a; box-shadow: 7px 8px 0 var(--ink), 0 0 0 2px var(--primary-clair); }
.modal-header { border-bottom: 1px dashed rgba(240,244,248,.2); padding-bottom: 14px; }
.close-modal { width: 42px; height: 42px; border: 2px solid var(--ink); border-radius: 12px; background: #173b58; box-shadow: 2px 3px 0 var(--ink); color: #fff; }
.close-modal:hover { color: var(--or); transform: rotate(4deg); }
.form-group label { color: #d6e5f0; font-size: 14px; font-weight: 700; }
.form-group input, .form-group textarea, .form-group select { border: 2px solid rgba(5,13,20,.82); border-radius: 12px 15px 11px 14px; background: #091a28; color: #fff; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary-clair); box-shadow: 0 0 0 3px rgba(100,180,237,.22); }
.google-btn { margin-top: 12px; background: #f0f4f8; color: #152638; }
.custom-notification { border: 2px solid var(--ink); border-radius: 14px 18px 13px 16px; box-shadow: 3px 4px 0 var(--ink); }
.custom-notification.error { background: var(--danger); }
.custom-notification.success { background: #1ba985; }
.custom-notification.info { background: var(--primary); }
.full-screen-blocker { background: #09131c; }
.pied { margin-top: 48px; padding: 46px 0 24px; border-top: 4px solid var(--primary); background: #07111a; }
.pied-colonnes { gap: 28px; }
.pied-colonnes h2 { color: #fff; }
.pied-colonnes ul li a { transition: color .16s ease; }
.pied-colonnes ul li a:hover { color: var(--or); }

/* Une entrée en scène unique, les survols restent brefs et liés à l'action. */
@keyframes hero-arrive { from { background-position: center 52%; } to { background-position: center 47%; } }
@keyframes hero-card-in { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 1000px) {
  .nav-liens { gap: 0; }
  .nav-liens a { padding-inline: 10px; font-size: 14px; }
  .pastille-direct { padding-inline: 10px; }
}
@media (max-width: 850px) {
  .entete-rang { gap: 12px; }
  .nav-actions { margin-left: auto; }
  .mobile-nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 43px;
    height: 43px;
    border: 2px solid var(--ink);
    border-radius: 12px 15px 11px 14px;
    color: #fff;
    background: #173b58;
    box-shadow: 2px 3px 0 var(--ink);
    cursor: pointer;
  }
  .mobile-nav-toggle[aria-expanded="true"] { color: var(--ink); background: var(--or); }
  .nav-liens {
    display: none;
    position: absolute;
    top: calc(100% + 9px);
    left: 18px;
    right: 18px;
    z-index: 1100;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    padding: 10px;
    border: 2px solid var(--ink);
    border-radius: 16px 20px 15px 18px;
    background: #10263a;
    box-shadow: 4px 5px 0 var(--ink);
  }
  body.mobile-nav-open .nav-liens { display: flex; }
  .nav-liens li { width: 100%; }
  .nav-liens a { width: 100%; }
  .nav-indicator { display: none !important; }
  .pastille-direct { min-height: 40px; }
  .pied-colonnes { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (max-width: 640px) {
  .large { padding-inline: 18px; }
  .entete { padding-block: 8px; }
  .entete-rang { min-height: 50px; }
  .logo-image { height: 40px; max-width: 115px; }
  .nav-actions { gap: 8px; }
  .pastille-direct { width: 39px; min-width: 39px; height: 39px; justify-content: center; padding: 0; }
  .pastille-direct .reste { display: none; }
  .hero-background-wrapper { min-height: 700px; min-height: min(780px, calc(100svh - 66px)); padding: 32px 0 45px; background-position: 57% center; }
  .hero-background-wrapper::before { height: 100px; }
  .heros-corps { padding-inline: 18px; }
  .heros-centre { width: 100%; padding: 23px 20px 25px; border-radius: 22px 27px 21px 25px; box-shadow: 5px 6px 0 var(--ink), 0 0 0 2px rgba(100,180,237,.85); }
  .hero-logo-main { height: 72px; }
  .hero-title { font-size: clamp(1.9rem, 9vw, 2.7rem); max-width: 13ch; }
  .heros-ligne-blanc { font-size: 1rem; }
  .heros-boutons { display: grid; grid-template-columns: 1fr; width: 100%; }
  .heros-btn { width: 100%; min-height: 48px; }
  .heros-adresse-box { width: 100%; justify-content: space-between; gap: 8px; padding-left: 12px; }
  .adresse-texte { min-width: 0; font-size: 12px; }
  .copier-btn { padding-inline: 12px; white-space: nowrap; }
  .preuves-bande { margin-top: -6px; }
  .notifs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .notif { min-height: 90px; align-items: flex-start; gap: 9px; padding: 11px; }
  .notif-icone { width: 36px; height: 36px; flex: 0 0 36px; font-size: 16px; }
  .notif-titre { font-size: 11px; line-height: 1.25; }
  .notif-valeur { font-size: 13px; line-height: 1.25; }
  .cartes-grille { grid-template-columns: 1fr; gap: 14px; }
  .carte.glass { padding: 22px; }
  .dashboard-tabs-nav { gap: 8px; }
  .dashboard-tab-btn { flex: 1 1 145px; }
  .requests-list { grid-template-columns: 1fr; }
  .request-card { padding: 18px; }
  .rule-section-header { align-items: flex-start; gap: 12px; }
  .rule-item { gap: 10px; padding: 12px; }
  .rule-item p { min-width: 0; overflow-wrap: anywhere; }
  .modal { align-items: flex-end; padding: 10px; }
  .modal-content.glass { max-height: min(88svh, 760px); padding: 22px 18px; border-radius: 20px 24px 18px 22px; }
  .pied { margin-top: 25px; }
  .pied-colonnes { grid-template-columns: 1fr 1fr; gap: 26px 18px; }
  .pied-colonnes > div:first-child { grid-column: 1 / -1; }
  .pied-bas { font-size: 11px; }
}
@media (max-width: 390px) {
  .large { padding-inline: 14px; }
  .heros-corps { padding-inline: 14px; }
  .heros-centre { padding-inline: 16px; }
  .notifs { grid-template-columns: 1fr; }
  .notif { min-height: 76px; align-items: center; }
  .direct-texte small { font-size: 11px; }
  .pied-colonnes { grid-template-columns: 1fr; }
  .pied-colonnes > div:first-child { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
