/* Generateur.tools — ENKI P1 */
:root {
  --primary: #1B3A6B;
  --primary-light: #2A5298;
  --accent: #C9A84C;
  --accent-light: #E0C66A;
  --sand: #F5EDD6;
  --white: #FFFFFF;
  --text: #1A1A2E;
  --text-light: #6B7280;
  --border: #E5E7EB;
  --bg: #F9F7F2;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 4px 16px rgba(0,0,0,.1);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --max-width: 1100px;
}

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

html { height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

.page { display: flex; flex-direction: column; min-height: 100vh; }
.main-content { flex: 1; }

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

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  text-decoration: none;
}
.main-nav { display: flex; gap: 24px; }
.main-nav a {
  color: var(--text-light);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: color .2s;
}
.main-nav a:hover { color: var(--primary); }

/* Lang switcher */
.lang-box { position: relative; }
.lang-btn {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
  font-size: .85rem;
  color: var(--text);
}
.lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  min-width: 190px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0;
}
.lang-menu.show { display: block; }
.lang-menu a {
  display: block;
  padding: 7px 14px;
  text-decoration: none;
  color: var(--text);
  font-size: .85rem;
}
.lang-menu a:hover { background: var(--bg); }
.lang-menu a.current { font-weight: 600; background: var(--sand); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}
.hero p {
  font-size: 1.1rem;
  opacity: .9;
  max-width: 700px;
  margin: 0 auto 24px;
  line-height: 1.7;
}
.hero-cta {
  display: inline-block;
  background: var(--accent);
  color: var(--primary);
  padding: 12px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: background .2s;
}
.hero-cta:hover { background: var(--accent-light); }

/* Section */
.section { padding: 48px 0; }
.section-alt { background: var(--white); }
.section-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}
.section-desc {
  color: var(--text-light);
  margin-bottom: 24px;
  font-size: .95rem;
}

/* Tools grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.tool-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  transition: box-shadow .2s, transform .2s;
}
.tool-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.tool-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}
.tool-card p {
  color: var(--text-light);
  font-size: .85rem;
  line-height: 1.5;
}

/* Tool page */
.tool-section { padding: 40px 0; }
.breadcrumb {
  font-size: .85rem;
  color: var(--text-light);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 6px; color: var(--border); }
.tool-section h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
.tool-desc {
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 32px;
  max-width: 700px;
}

/* Tool interface */
.tool-interface {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 40px;
}
.tool-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-end;
}
.control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.control-group label {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text);
}
.control-group input[type="number"],
.control-group input[type="text"],
.control-group select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .9rem;
  font-family: var(--font-body);
  min-width: 80px;
}
.control-group input[type="range"] { width: 160px; }
.control-group input[type="checkbox"] { margin-right: 4px; }
.checkbox-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .85rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, opacity .2s;
  font-family: var(--font-body);
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-light); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-ghost { background: transparent; color: var(--text-light); }
.btn-ghost:hover { background: var(--bg); }

.tool-result {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.tool-result output {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  font-size: .95rem;
  line-height: 1.6;
  min-height: 60px;
  word-break: break-all;
  margin-bottom: 12px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.tool-result .btn-group { display: flex; gap: 8px; }

/* Strength indicator */
.strength-bar {
  height: 4px;
  border-radius: 2px;
  margin-top: 8px;
  transition: width .3s, background .3s;
  width: 0;
}

/* Color swatches */
.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.color-swatch {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 6px;
  font-size: .7rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--white);
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
  transition: transform .2s;
}
.color-swatch:hover { transform: scale(1.1); }

/* Howto & FAQ */
.howto, .faq { margin-bottom: 40px; }
.howto h2, .faq h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
}
.howto p { color: var(--text-light); line-height: 1.7; }
details {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}
details summary {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 500;
  font-size: .95rem;
  background: var(--white);
  transition: background .2s;
}
details summary:hover { background: var(--bg); }
details[open] summary { border-bottom: 1px solid var(--border); }
details p { padding: 14px 16px; color: var(--text-light); font-size: .9rem; line-height: 1.6; }

/* Related */
.related { margin-bottom: 40px; }
.related h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,.8);
  padding: 48px 0 0;
  margin-top: auto;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
}
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 12px;
}
.footer-col p { font-size: .85rem; line-height: 1.6; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col ul a {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: .85rem;
  transition: color .2s;
}
.footer-col ul a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0;
  text-align: center;
  font-size: .8rem;
  color: rgba(255,255,255,.5);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .tools-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .tool-section h1 { font-size: 1.5rem; }
  .tool-interface { padding: 20px; }
  .tool-controls { flex-direction: column; }
  .main-nav { gap: 12px; }
  .main-nav a { font-size: .8rem; }
}

@media (max-width: 480px) {
  .hero { padding: 40px 0; }
  .hero h1 { font-size: 1.5rem; }
  .section { padding: 32px 0; }
  .color-swatches { gap: 8px; }
  .color-swatch { width: 60px; height: 60px; font-size: .6rem; }
}
