/* =============================================================
   PREMIUM FOOD — Documentation Theme (New Orange/Blue Theme)
   ============================================================= */

:root {
  --pf-primary: #F58220;
  --pf-primary-light: #FFF4ED;
  --pf-primary-dark: #E67A00;
  --pf-secondary: #1778B5;
  --pf-secondary-hover: #125C8A;
  --pf-background: #F8FAFC;
  --pf-content: #FFFFFF;
  --pf-text: #1F2937;
  --pf-border: #E2E8F0;
  --pf-sidebar-bg: #1F2937;
  --pf-sidebar-text: #CBD5E1;
  --pf-sidebar-active: #F58220;
  --pf-sidebar-hover: rgba(255,255,255,0.05);
  --pf-radius: 8px;
  --pf-shadow: 0 2px 8px rgba(0,0,0,0.1);
  --pf-shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
  --pf-transition: all 0.2s ease;
}

/* Justifier tous les paragraphes */
.rst-content p,
.document p,
.body p,
.content p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    color: var(--pf-text);
}

/* Garder code et tableaux alignés à gauche */
pre, code, .highlight, table, th, td {
    text-align: left !important;
}

/* =============================================================
   GLOBAL STYLES
   ============================================================= */
html, body {
  margin: 0;
  padding: 0;
  background: var(--pf-background);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--pf-text);
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* =============================================================
   SIDEBAR
   ============================================================= */
.wy-nav-side {
  background: var(--pf-sidebar-bg);
  width: 280px;
  box-shadow: 2px 0 12px rgba(0,0,0,0.1);
}

.wy-side-nav-search {
  background: var(--pf-primary);
  padding: 1.5em;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.wy-menu-vertical a {
  color: var(--pf-sidebar-text);
  padding: 0.8em 1.5em;
  transition: var(--pf-transition);
}

.wy-menu-vertical a:hover {
  background: var(--pf-sidebar-hover);
  color: white;
}

.wy-menu-vertical li.current > a {
  background: var(--pf-sidebar-active);
  color: white;
  border-left: 4px solid var(--pf-primary);
}

/* =============================================================
   MAIN CONTENT
   ============================================================= */
.wy-nav-content {
  background: var(--pf-content);
  max-width: 1200px;
  margin: 0 auto;
  padding: 2em 3em;
  box-shadow: var(--pf-shadow-lg);
  border-radius: var(--pf-radius);
  margin-top: 2em;
  margin-bottom: 2em;
}

/* =============================================================
   TYPOGRAPHY
   ============================================================= */
.rst-content h1, .rst-content h2, .rst-content h3, .rst-content h4 {
  color: var(--pf-text);
}

.rst-content h2 {
  border-bottom: 3px solid var(--pf-primary);
  padding-bottom: 0.3em;
}

.rst-content h3 {
  border-bottom: 2px solid var(--pf-primary-light);
  padding-bottom: 0.2em;
}

.rst-content strong {
  color: var(--pf-primary);
  font-weight: 600;
}

.rst-content a {
  color: var(--pf-primary);
  text-decoration: none;
}

.rst-content a:hover {
  text-decoration: underline;
}

/* =============================================================
   TABLES
   ============================================================= */
.rst-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5em 0;
  box-shadow: var(--pf-shadow);
  border-radius: var(--pf-radius);
  overflow: hidden;
}

.rst-content th {
  background: var(--pf-primary-light);
  color: var(--pf-primary-dark);
  font-weight: 600;
}

.rst-content tr:hover {
  background: var(--pf-primary-light);
}

/* =============================================================
   CODE BLOCKS
   ============================================================= */
.rst-content code {
  background: var(--pf-primary-light);
  color: var(--pf-primary-dark);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
}

.rst-content pre {
  background: #2D3748;
  color: #E2E8F0;
  padding: 1.5em;
  border-radius: var(--pf-radius);
  overflow-x: auto;
  box-shadow: var(--pf-shadow);
}

/* =============================================================
   NAVIGATION BUTTONS
   ============================================================= */
.rst-footer-buttons .btn-neutral {
  background: var(--pf-primary);
  color: white;
  border: 1px solid var(--pf-primary);
  padding: 0.8em 1.5em;
  border-radius: var(--pf-radius);
  text-decoration: none;
  transition: var(--pf-transition);
}

.rst-footer-buttons .btn-neutral:hover {
  background: var(--pf-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--pf-shadow-lg);
}

/* =============================================================
   FOOTER
   ============================================================= */
footer {
  background: var(--pf-sidebar-bg);
  color: var(--pf-sidebar-text);
  padding: 2em;
  text-align: center;
  margin-top: 3em;
  border-radius: var(--pf-radius);
}

footer a {
  color: var(--pf-sidebar-active);
  text-decoration: none;
  transition: var(--pf-transition);
}

footer a:hover {
  color: white;
}

/* =============================================================
   SCROLLBAR
   ============================================================= */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--pf-background);
}

::-webkit-scrollbar-thumb {
  background: var(--pf-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--pf-primary-dark);
}

