/* =========================================================
   LUTRA BUMP : feuille de style principale
   Palette : nuit fluviale + accent sarcelle/indigo
   ========================================================= */

/* polices dediees aux nouveaux themes de personnalisation
   (uniquement chargees par le navigateur si un theme les utilise,
   le reste du site continue de tourner sur les polices auto-hebergees ci-dessous) */
@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Fredoka:wght@600;700&family=Luckiest+Guy&family=Teko:wght@500;700&family=Rajdhani:wght@600;700&family=Zen+Maru+Gothic:wght@700&family=Creepster&family=Nosifer&display=swap');

/* polices auto-hebergees, aucune requete vers un service tiers */
@font-face{
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face{
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face{
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face{
  font-family: "Sora";
  src: url("../assets/fonts/sora-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face{
  font-family: "Sora";
  src: url("../assets/fonts/sora-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face{
  font-family: "Sora";
  src: url("../assets/fonts/sora-latin-800-normal.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face{
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

:root{
  --bg-0: #0B0F17;
  --bg-1: #10151F;
  --bg-2: #161C29;
  --bg-3: #1D2433;
  --line: #262E40;
  --line-soft: #1C2330;

  --text-0: #EDF0F6;
  --text-1: #B7BFD1;
  --text-2: #7D869C;

  --teal: #2FD3C4;
  --teal-dim: #1C8C82;
  --indigo: #6C7CF0;
  --indigo-dim: #4C58B5;
  --amber: #E8B95C;
  --red: #E5626B;
  --red-dim: #3A1F26;

  --grad-signature: linear-gradient(135deg, var(--teal) 0%, var(--indigo) 100%);

  --font-display: "Sora", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius-s: 6px;
  --radius-m: 9px;
  --radius-l: 13px;
  --shadow-card: 0 1px 0 rgba(255,255,255,0.03) inset, 0 8px 24px rgba(0,0,0,0.35);
  --container: 1240px;
}

*, *::before, *::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg-0);
  color: var(--text-0);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; }

.wrap{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* =========================================================
   EN-TETE
   ========================================================= */
.site-header{
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11,15,23,0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header .wrap{
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.logo{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.logo .mark{
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--grad-signature);
  position: relative;
  flex-shrink: 0;
}
.logo .mark::after{
  content: "";
  position: absolute; inset: 7px;
  border-radius: 5px;
  background: var(--bg-0);
  clip-path: path("M2 12 C 2 4, 10 2, 14 6 C 8 6, 6 10, 12 14 C 6 16, 2 18, 2 12 Z");
}
.logo b{ color: var(--text-0); }
.logo span{ color: var(--teal); }

.header-actions{
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-ghost{
  background: transparent;
  color: var(--text-1);
  border-color: var(--line);
}
.btn-ghost:hover{ color: var(--text-0); border-color: var(--indigo-dim); }

.btn-primary{
  background: var(--indigo);
  color: #fff;
}
.btn-primary:hover{ background: #5c6ce0; }

.btn-signature{
  background: var(--teal);
  color: #06231F;
}
.btn-signature:hover{ background: #29c2b4; }

.btn-outline{
  background: transparent;
  border-color: var(--indigo-dim);
  color: var(--text-0);
}
.btn-outline:hover{ border-color: var(--indigo); }

.btn-danger{
  background: var(--red);
  color: #fff;
}
.btn-danger:hover{ background: #d1505a; }

.btn-block{ width: 100%; justify-content: center; }
.btn-sm{ padding: 7px 12px; font-size: 13px; }
.btn[disabled]{ opacity: .45; cursor: not-allowed; }

.discord-ico{ width: 16px; height: 16px; flex-shrink: 0; }

.user-chip{
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  cursor: pointer;
}
.user-chip:hover{ border-color: var(--indigo-dim); }
.user-chip img{ width: 30px; height: 30px; border-radius: 50%; }
.user-chip b{ font-size: 13.5px; font-weight: 600; }

/* =========================================================
   HERO / RECHERCHE
   ========================================================= */
.hero{ padding: 64px 0 40px; text-align: center; }
.eyebrow{
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid rgba(47,211,196,0.28);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.eyebrow::before{ content: "¤"; }

.hero h1{
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.08;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.hero h1 .accent{ color: var(--teal); }
.hero p.lead{
  color: var(--text-1);
  font-size: 16.5px;
  max-width: 560px;
  margin: 0 auto 34px;
}

.search-panel{
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.search-row{ display: flex; gap: 10px; position: relative; }
.search-row input[type="search"]{
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 14px 16px;
  color: var(--text-0);
  font-size: 15px;
}
.search-row input[type="search"]::placeholder{ color: var(--text-2); }

.search-suggest{
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-m); box-shadow: var(--shadow-card);
  padding: 6px; z-index: 30; display: none; flex-direction: column;
}
.search-suggest.visible{ display: flex; }
.search-suggest a{
  padding: 10px 12px; border-radius: 7px; font-size: 13.5px; color: var(--text-1);
}
.search-suggest a:hover{ background: var(--bg-3); color: var(--text-0); }
.search-suggest small{ display: block; color: var(--text-2); font-size: 11px; margin-top: 2px; }

/* =========================================================
   CARTES DE RACCOURCI (accueil)
   ========================================================= */
.shortcut-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 46px 0 50px;
}
@media (max-width: 980px){ .shortcut-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 660px){ .shortcut-grid{ grid-template-columns: 1fr; } }

.shortcut-card{
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 24px;
  text-align: left;
  transition: border-color .15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shortcut-card:hover{ border-color: var(--indigo-dim); }
.shortcut-card .glyph{
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--grad-signature);
  flex-shrink: 0;
}
.shortcut-card h3{ font-family: var(--font-display); font-size: 16px; margin: 4px 0 0; }
.shortcut-card p{ color: var(--text-2); font-size: 13.5px; margin: 0; line-height: 1.6; }

/* =========================================================
   PAGE CATEGORIE
   ========================================================= */
.section-head{
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 6px 0 22px;
  flex-wrap: wrap; gap: 10px;
}
.section-head h2{ font-family: var(--font-display); font-size: 21px; margin: 0; }
.section-head .hint{ color: var(--text-2); font-size: 13.5px; }

.article-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 50px;
}
@media (max-width: 760px){ .article-grid{ grid-template-columns: 1fr; } }

.article-card{
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 18px;
  transition: border-color .15s;
}
.article-card:hover{ border-color: var(--indigo-dim); }
.article-card h3{ font-family: var(--font-display); font-size: 15.5px; margin: 0 0 8px; }
.article-card p{ color: var(--text-2); font-size: 13px; margin: 0 0 12px; line-height: 1.6; }
.article-card .article-meta{
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--text-2);
}
.article-card .article-meta img{ width: 20px; height: 20px; border-radius: 50%; }

.empty-state{
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-l);
  background: var(--bg-1);
}
.empty-state .glyph{
  width: 52px; height: 52px; margin: 0 auto 18px;
  border-radius: 14px;
  background: var(--indigo);
  opacity: 0.85;
}
.empty-state h3{ font-family: var(--font-display); font-size: 18px; margin: 0 0 8px; }
.empty-state p{ color: var(--text-2); font-size: 14px; max-width: 380px; margin: 0 auto 22px; }

/* =========================================================
   PAGE ARTICLE
   ========================================================= */
.breadcrumb{ font-size: 12.5px; color: var(--text-2); margin-bottom: 18px; }
.breadcrumb a{ color: var(--text-2); }
.breadcrumb a:hover{ color: var(--text-0); }
.breadcrumb span{ margin: 0 6px; }

.article-page-card{
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 30px;
  max-width: 820px;
}
.article-page-title{ font-family: var(--font-display); font-size: 26px; margin: 0 0 14px; }
.article-author-line{ display: flex; align-items: center; gap: 10px; margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.article-author-line img{ width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); }
.article-author-line b{ font-size: 13.5px; }
.article-author-line span{ font-size: 12px; color: var(--text-2); display: block; }

.article-body{ color: var(--text-1); font-size: 14.5px; line-height: 1.8; }
.article-body p{ margin: 0 0 16px; }
.article-body img{ border-radius: var(--radius-m); margin: 12px 0; border: 1px solid var(--line); }
.article-body ul, .article-body ol{ margin: 0 0 16px; padding-left: 22px; }

.article-page-actions{ display: flex; gap: 10px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line-soft); }

/* =========================================================
   MODALE MOT DE PASSE ADMIN
   ========================================================= */
.modal-backdrop{
  position: fixed; inset: 0;
  background: rgba(6,8,13,0.72);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal-backdrop.visible{ display: flex; }

.modal-card{
  width: 100%; max-width: 420px;
  background: rgba(22,28,41,0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-l);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  padding: 26px;
  position: relative;
}
.modal-card.shake{ animation: modal-shake .35s ease; }
@keyframes modal-shake{
  0%, 100%{ transform: translateX(0); }
  25%{ transform: translateX(-8px); }
  75%{ transform: translateX(8px); }
}
.modal-close{
  position: absolute; top: 18px; right: 18px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text-1);
  cursor: pointer;
  font-size: 15px;
}
.modal-head h2{ font-family: var(--font-display); font-size: 18.5px; margin: 0 0 6px; }
.modal-head p{ color: var(--text-2); font-size: 13px; margin: 0 0 20px; }
.modal-error{
  color: var(--red); font-size: 12.5px; margin-top: 10px; display: none;
}
.modal-error.visible{ display: block; }

/* =========================================================
   FORMULAIRES
   ========================================================= */
.field-group{ margin-bottom: 18px; }
.field-group label{
  display: flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; margin-bottom: 8px;
}
.field-group input, .field-group select, .field-group textarea{
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 12px 14px;
  color: var(--text-0);
  font-size: 14px;
  font-family: inherit;
}

.card-panel{
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 24px;
}

/* =========================================================
   EDITEUR D'ARTICLE
   ========================================================= */
.editor-toolbar{
  display: flex; flex-wrap: wrap; gap: 6px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-s) var(--radius-s) 0 0;
  padding: 8px;
}
.editor-toolbar button{
  background: var(--bg-3); border: 1px solid var(--line);
  color: var(--text-1); border-radius: 6px;
  padding: 7px 11px; font-size: 13px; cursor: pointer;
}
.editor-toolbar button:hover{ color: var(--text-0); border-color: var(--indigo-dim); }
.editor-toolbar input[type="color"]{
  width: 34px; height: 34px; padding: 2px;
  border-radius: 6px; border: 1px solid var(--line); background: var(--bg-3); cursor: pointer;
}
.editable-box{
  min-height: 46px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius-s) var(--radius-s);
  padding: 12px 14px;
  color: var(--text-0);
  font-size: 15px;
  outline: none;
}
.editable-box[data-content="true"]{ min-height: 220px; font-size: 14px; line-height: 1.75; }
.editable-box:empty::before{ content: attr(data-placeholder); color: var(--text-2); }
.editable-box img{ max-width: 260px; border-radius: 8px; margin: 6px 0; }

.editor-preview-card{
  border: 1px dashed var(--line);
  border-radius: var(--radius-l);
  padding: 26px;
  margin-top: 18px;
  display: none;
}
.editor-preview-card.visible{ display: block; }

.toast{
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 13px 18px; border-radius: var(--radius-m);
  font-size: 13.5px; box-shadow: var(--shadow-card);
  opacity: 0; pointer-events: none; transition: all .2s;
  z-index: 200;
}
.toast.visible{ opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error{ border-color: rgba(229,98,107,0.4); color: var(--red); }

/* =========================================================
   PIED DE PAGE
   ========================================================= */
.site-footer{
  border-top: 1px solid var(--line-soft);
  margin-top: 60px;
  padding: 40px 0 50px;
  color: var(--text-2);
  font-size: 13px;
}
.site-footer .wrap{ display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.site-footer a{ color: var(--text-2); }
.site-footer a:hover{ color: var(--text-0); }

.container-page{ padding: 44px 0 70px; }

.error-page{ text-align: center; padding: 100px 20px; }
.error-page h1{ font-family: var(--font-display); font-size: 60px; margin: 0; color: var(--teal); }
.error-page p{ color: var(--text-2); margin: 10px 0 26px; }

@media (max-width: 860px){
  .article-grid{ grid-template-columns: 1fr; }
}

/* Ajout pour les images de logos dans l'en-tete et les cartes raccourcis */
.shortcut-glyph{
  width: 42px; height: 42px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.logo-img{
  width: 30px; height: 30px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
}
