/* ================================
   Reset léger & base
================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f4f7fa;
  color: #222;
  line-height: 1.6;
}

/* Liens généraux */
a { color: #0d47a1; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ================================
   Navbar fixe (haut)
================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; width: 100%;
  background: #1565c0;
  display: flex; justify-content: center; gap: 2rem;
  padding: 0.8rem;
  z-index: 1000;
}
.navbar a {
  color: #fff; font-weight: bold; font-size: 1.1rem;
  text-decoration: none; transition: color 0.2s;
}
.navbar a:hover { color: #ffeb3b; }

/* ================================
   Header (compense la navbar fixe)
================================ */
header {
  margin-top: 70px; /* ajuste si ta navbar change de hauteur */
  background: #0d47a1;
  color: #fff;
  text-align: center;
  padding: 1.5rem 1rem;
}
header h1 { margin-bottom: .5rem; font-size: 2rem; }
header h2 { font-weight: 400; font-size: 1.2rem; }

/* ================================
   Contenu principal
================================ */
main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Sections & titres */
section {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,.08);
  margin-bottom: 2rem;
}
h2 { color: #0d47a1; margin: 1.5rem 0 1rem; }
h3 { color: #1565c0; margin: 1rem 0 .5rem; }

/* Listes */
ul, ol { margin-left: 1.5rem; margin-top: .5rem; }
ul { list-style-type: "✔ "; }
ol { list-style-type: decimal; }

/* Boutons & CTA */
.btn {
  display: inline-block;
  padding: .7rem 1.2rem;
  background: #0d47a1;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background .3s;
}
.btn:hover { background: #1565c0; }

button {
  background: #1565c0;
  color: #fff;
  padding: .6rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}
button:hover { background: #1976d2; }

/* Formulaire trame */
.trame-form {
  display: flex; flex-direction: column; gap: 1rem; width: 100%;
}
.trame-form label { font-weight: bold; margin-top: .5rem; }
.trame-form textarea {
  width: 100%; min-height: 80px; font-size: 1rem;
  padding: .8rem; border: 1px solid #ccc; border-radius: 6px; resize: vertical;
}
textarea {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1rem; padding: 1rem;
  border: 1px solid #ccc; border-radius: 6px; resize: vertical;
}

/* Actions groupées */
.actions { display: flex; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.actions button, .actions .btn { flex: 1; text-align: center; }

/* Encadré 5W */
.fivew {
  background: #e3f2fd;
  border-left: 5px solid #0d47a1;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 6px;
}
.fivew li { margin: .3rem 0; }

/* Bloc export PDF */
.export {
  margin-top: 1rem;
  padding: 1rem;
  background: #fff3e0;
  border: 1px solid #ffa726;
  border-radius: 6px;
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
}
.export label { font-weight: bold; }
.export select, .export input, .export button {
  padding: .4rem .6rem; font-size: 1rem; border-radius: 6px; border: 1px solid #ccc;
}
.export button { background: #1565c0; color: #fff; border: none; cursor: pointer; }
.export button:hover { background: #1976d2; }

/* Outil d’enregistrement (annexe) */
.outil-enregistrement {
  margin-top: 20px; padding: 12px;
  border: 2px solid #444; border-radius: 6px;
  background-color: #f9f9f9; font-size: 1.1em;
}
.outil-enregistrement a { font-weight: bold; color: #0066cc; text-decoration: none; }
.outil-enregistrement a:hover { text-decoration: underline; }

/* Onglets */
.tab-btn {
  border: 1px solid #90caf9;
  background: #e3f2fd;
  color: #0d47a1;
  padding: .5rem .75rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.tab-btn.active { background: #1565c0; border-color: #1565c0; color: #fff; }
.tab-btn:hover { background: #bbdefb; }
.tab-btn:focus-visible { outline: 3px solid #ffeb3b; outline-offset: 2px; }

/* Bouton IA locale */
#btnRewriteLocal { background: #1565c0; color: #fff; }
#btnRewriteLocal:hover { background: #1976d2; }

/* Chips toggle */
.chip-toggle {
  padding: .35rem .6rem;
  border-radius: 999px;
  border: 1px solid #c9d6ff;
  background: #eef3ff;
  color: #0d47a1;
  cursor: pointer;
  font-size: .9rem;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.chip-toggle:hover { background: #e2ebff; border-color: #b8caff; }
.chip-toggle[aria-pressed="true"] { background: #1565c0; border-color: #1565c0; color: #fff; }
.chip-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(21,101,192,.25); }

/* Presets */
.preset-btn {
  padding: .3rem .55rem;
  border-radius: 8px;
  border: 1px solid #c9d6ff;
  background: #eef3ff;
  color: #0d47a1;
  cursor: pointer;
  font-size: .9rem;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.preset-btn:hover { background:#e2ebff; border-color:#b8caff; }
.preset-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(21,101,192,.25); }

/* ================================
   Sticky footer (layout flex)
================================ */
.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

/* Footer */
.site-footer {
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
  padding: 12px 16px;
  text-align: center;
  font-size: .95rem;
  color: #374151;
}
.site-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}
.site-footer a:hover { border-bottom-color: currentColor; }
