/* =============================================================
   styles.css — Photothèque
   Charte dérivée du logo Agence 24-33 :
     bleu marine #001A48 (foncé) + bleu vif #0091DE (accent)
   Polices : Oswald (titres) + Raleway (corps)
   ============================================================= */

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

:root {
  --navy:      #001A48;   /* bleu marine du logo : sidebar, titres */
  --navy-dk:   #001334;
  --navy-lt:   #012A63;
  --blue:      #0091DE;   /* bleu vif du logo : accent, actions */
  --blue-dk:   #0060A4;
  --blue-lt:   #33A8E6;
  --blue-bg:   #E7F3FB;   /* fond de sélection */
  --blue-mid:  #A8D4F0;
  --dark:      #1C1C1C;
  --gray-900:  #1a1a1a;
  --gray-700:  #3d3d3d;
  --gray-500:  #7a7a7a;
  --gray-300:  #d1d5db;
  --gray-100:  #f1f3f6;
  --gray-50:   #fafbfc;
  --white:     #ffffff;
  --sidebar-w: 272px;
  --radius:    10px;
  --shadow:    0 1px 4px rgba(0,0,0,.07);
  --font-body: 'Raleway', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-head: 'Oswald', sans-serif;
}

body {
  font-family: var(--font-body);
  background: var(--gray-100);
  color: var(--gray-900);
  font-size: 13px;
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }

/* ── LOGIN PAGE ── */
body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
}

.login-wrap { width: 400px; }

.login-card {
  background: var(--white);
  border-radius: 14px;
  padding: 44px 40px;
  box-shadow: 0 2px 24px rgba(0,0,0,.10);
  border-top: 4px solid var(--blue);
}

.login-logo { text-align: center; margin-bottom: 22px; }
.login-logo svg { height: 56px; width: 56px; }

.login-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--navy);
  text-align: center;
  margin-bottom: 28px;
  text-transform: uppercase;
}

.login-field { margin-bottom: 16px; }

.login-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 6px;
}

.login-field input {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--gray-300);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--gray-900);
  outline: none;
  transition: border-color .15s;
}

.login-field input:focus { border-color: var(--blue); }

.login-souvenir {
  display: flex; align-items: center; gap: 8px;
  margin: -2px 0 18px; font-size: 13px; color: var(--gray-700); cursor: pointer;
}
.login-souvenir input { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }
.login-souvenir span { color: var(--gray-500); font-size: 12px; }

.login-btn {
  width: 100%;
  padding: 12px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-head);
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 8px;
  transition: background .15s;
}
.login-btn:hover { background: var(--blue-dk); }

.login-error {
  background: #fdecec;
  border: 1px solid #f5b5b5;
  color: #b32020;
  padding: 10px 13px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 16px;
  text-align: center;
}

/* ── LAYOUT ── */
.bo-layout { display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
.bo-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--navy);
  color: #c5cfe0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sb-header {
  padding: 20px 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sb-logo svg { height: 40px; width: 40px; display: block; }
.sb-logo-label {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--white);
  text-transform: uppercase;
}

.sb-nav { padding: 12px 8px; flex: 1; overflow-y: auto; }

.sb-section-collapsible { margin-bottom: 2px; }
.sb-section-collapsible summary {
  list-style: none;
  cursor: pointer;
}
.sb-section-collapsible summary::-webkit-details-marker,
.sb-section-collapsible summary::marker { display: none; }

.sb-section-label {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #9fb0cc;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.sb-section-label:hover { background: var(--navy-lt); color: var(--white); }

.sb-chevron {
  width: 14px; height: 14px;
  margin-left: auto;
  transition: transform .18s;
}
.sb-section-collapsible[open] .sb-chevron { transform: rotate(90deg); }

.sb-section-links { padding-top: 2px; }

.sb-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px 8px 22px;
  font-size: 12.5px;
  color: #c5cfe0;
  border-radius: 8px;
  position: relative;
  transition: background .15s, color .15s;
}
.sb-item:hover { background: var(--navy-lt); color: var(--white); }
.sb-item.active {
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
}
.sb-item.active .sb-icon { opacity: 1; }
.sb-icon { width: 16px; height: 16px; opacity: .7; flex-shrink: 0; }

/* ── FOOTER SIDEBAR (utilisateur) ── */
.sb-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sb-user { display: flex; align-items: center; gap: 10px; }
.sb-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.sb-user-info { flex: 1; min-width: 0; }
.sb-user-name {
  font-size: 12.5px; font-weight: 600; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sb-user-role { font-size: 11px; color: #8fa0bd; }
.sb-logout {
  color: #8fa0bd; font-size: 18px; padding: 4px 8px;
  border-radius: 6px; transition: background .15s, color .15s;
}
.sb-logout:hover { background: var(--navy-lt); color: var(--white); }

/* ── MAIN ── */
.bo-main { flex: 1; padding: 26px 30px; min-width: 0; }

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.page-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: .02em;
}
.page-subtitle { font-size: 12.5px; color: var(--gray-500); margin-top: 2px; }

/* ── BOUTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: var(--font-head);
  letter-spacing: .03em;
  cursor: pointer;
  border: none;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-blue    { background: var(--blue); color: var(--white); }
.btn-blue:hover  { background: var(--blue-dk); }
.btn-navy    { background: var(--navy); color: var(--white); }
.btn-navy:hover  { background: var(--navy-lt); }
.btn-ghost   { background: transparent; color: var(--gray-700); border: 1.5px solid var(--gray-300); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-sm      { padding: 4px 10px; font-size: 11px; }

/* ── CARTE / ENCADRÉ ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

/* ── BADGE ── */
.sb-badge {
  display: inline-flex;
  align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: var(--blue);
  color: #fff;
  font-size: 10px; font-weight: 700;
  border-radius: 9px;
  margin-left: auto; margin-right: 8px;
}
