/* ==========================================================================
   Tout Simplement — thème "Nature & épure" pour WonderCMS
   Palette : vert forêt, beige lin, terracotta discrète
   ========================================================================== */

:root {
  --vert:        #3d5a3d;   /* vert forêt — titres, boutons, liens */
  --vert-fonce:  #2f3a2f;   /* titres principaux */
  --terre:       #b5622f;   /* terracotta — accents, survols */
  --lin:         #f7f5f0;   /* fond de page */
  --lin-carte:   #fdfcf9;   /* fond des cartes / lignes paires */
  --trait:       #e0dcd0;   /* filets, séparateurs */
  --texte:       #4a473f;   /* corps de texte */
  --texte-doux:  #7a7566;   /* texte secondaire */
  --serif: Georgia, 'Times New Roman', serif;
  --sans:  -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --arrondi: 4px;           /* rayon commun boutons + tableaux */
}

/* --- Base ---------------------------------------------------------------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--lin);
  color: var(--texte);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;   /* évite le débordement des longues URL */
}

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Les images collées dans l'éditeur ne débordent jamais */
img { max-width: 100%; height: auto; }

/* Repère visible au clavier (accessibilité) */
:focus-visible { outline: 2px solid var(--terre); outline-offset: 2px; }

/* --- Titres -------------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--vert-fonce);
  line-height: 1.3;
}
h1 { font-size: 2.1rem; margin: 0 0 .6em; }

/* Titre de page inséré automatiquement par theme.php.
   Pour le masquer sur une page précise (l'accueil par exemple),
   ajoutez dans son contenu, via Code View :
   <style>.titre-page{display:none}</style>                                  */
.titre-page { margin-bottom: .8em; }

/* Titre de section : filet vert de séparation */
h2 {
  font-size: 1.5rem;
  color: var(--vert);
  margin: 2.4em 0 .5em;
  padding-bottom: .3em;
  border-bottom: 1px solid var(--vert);
}
h3 { font-size: 1.2rem; color: var(--vert); margin: 1.8em 0 .4em; }

/* Pas d'espace superflu si la page commence par un titre */
main > .container > :first-child,
#content > :first-child { margin-top: 0; }

p { margin: 0 0 1.2em; }

/* --- Listes -------------------------------------------------------------- */
/* Tirets à la place des puces, dans le contenu uniquement
   (le menu et les listes numérotées ne sont pas touchés) */
main ul {
  list-style: none;
  margin: 0 0 1.2em;
  padding: 0;
}
main ul > li {
  position: relative;
  padding: 6px 0 6px 20px;
}
main ul > li::before {
  content: "\2014";
  position: absolute;
  left: 0;
  color: var(--trait);
}
main ol { padding-left: 1.4em; }
main li p { margin: 0; }

/* --- Liens --------------------------------------------------------------- */
a {
  color: var(--vert);
  text-decoration: none;
  border-bottom: 1px solid var(--trait);
  transition: color .2s, border-color .2s;
}
a:hover { color: var(--terre); border-color: var(--terre); }

/* --- En-tête ------------------------------------------------------------- */
header {
  border-bottom: 1px solid var(--trait);
  background: var(--lin);
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-top: 18px;
  padding-bottom: 18px;
}

/* Nom du site */
header h1, .logo, #logo,
a.logo {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--vert);
  letter-spacing: .5px;
  margin: 0;
  border: 0;
  text-decoration: none;
}
a.logo:hover { color: var(--terre); }

/* --- Navigation ---------------------------------------------------------- */
nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
nav li { padding: 0; }
nav li::before { content: none; }   /* pas de tiret dans le menu */
nav a {
  border: 0;
  font-size: .95rem;
  color: var(--texte-doux);
  letter-spacing: .3px;
}
/* WonderCMS marque la page courante avec id="active" sur le lien */
nav a:hover,
nav a#active,
nav .active a,
nav li.active a { color: var(--vert); }

/* --- Contenu ------------------------------------------------------------- */
main, #content {
  padding: 48px 0 64px;
}

/* Bandeau d'accroche : <div class="accroche"> ... </div> */
.accroche {
  text-align: center;
  padding: 24px 0 40px;
}
.accroche .surtitre {
  display: block;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: .78rem;
  color: #a89f8a;
  margin-bottom: 14px;
}
.accroche h1 { font-size: 2.4rem; }
.accroche p { color: var(--texte-doux); max-width: 460px; margin: 0 auto 1.4em; }

/* --- Boutons ------------------------------------------------------------- */
.bouton, a.bouton {
  display: inline-block;
  background: var(--vert);
  color: var(--lin);
  border: 0;
  border-radius: var(--arrondi);
  padding: 12px 28px;
  font-size: .95rem;
  letter-spacing: .3px;
}
.bouton:hover, a.bouton:hover { background: var(--terre); color: var(--lin); }

/* --- Citations et séparateurs (boutons de l'éditeur) --------------------- */
blockquote {
  margin: 1.6em 0;
  padding: .2em 0 .2em 20px;
  border-left: 3px solid var(--trait);
  color: var(--texte-doux);
  font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

hr {
  border: 0;
  border-top: 1px solid var(--trait);
  margin: 2.4em 0;
}

/* --- Cartes (trois colonnes) --------------------------------------------
   <div class="cartes">
     <div class="carte"><h3>Nos ateliers</h3><p>…</p></div> …
   </div>
------------------------------------------------------------------------- */
.cartes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--trait);
  border: 1px solid var(--trait);
  border-radius: 6px;
  overflow: hidden;
  margin: 40px 0;
}
.carte {
  background: var(--lin-carte);
  padding: 26px 24px;
}
.carte h3 { margin-top: 0; }
.carte p { color: var(--texte-doux); margin: 0; font-size: .95rem; }

/* --- Aperçu d'articles --------------------------------------------------- */
.article-apercu {
  padding: 22px 0;
  border-bottom: 1px solid var(--trait);
}
.article-apercu .date {
  font-size: .8rem;
  color: #a89f8a;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.article-apercu h3 { margin: .3em 0; }

/* --- Tableaux ------------------------------------------------------------ */
table {
  width: 100%;
  border-collapse: separate;   /* requis pour l'arrondi visible */
  border-spacing: 0;
  margin: 1.8em 0;
  font-size: .95rem;
  border: 1px solid var(--trait);
  border-radius: var(--arrondi);
  overflow: hidden;            /* rogne les coins des cellules d'angle */
}
th {
  background: var(--vert);
  color: var(--lin);
  font-weight: 400;
  text-align: left;
  letter-spacing: .5px;
  padding: 12px 16px;
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--trait);
  vertical-align: top;
}
tr:nth-child(even) td { background: var(--lin-carte); }
tr:nth-child(odd)  td { background: var(--lin); }
tr:last-child td { border-bottom: 0; }
/* Annule les marges des paragraphes dans les cellules */
td p, th p { margin: 0; }

/* Summernote ne génère pas de <thead> : on habille la première ligne */
table tr:first-child td {
  background: var(--vert);
  color: var(--lin);
  letter-spacing: .5px;
  border-bottom: 0;
}
table tr:first-child td a { color: var(--lin); }

/* --- Pied de page -------------------------------------------------------- */
footer {
  border-top: 1px solid var(--trait);
  padding: 32px 0;
  text-align: center;
  color: var(--texte-doux);
  font-size: .88rem;
}
footer a { border: 0; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  header .container { flex-direction: column; gap: 14px; }
  nav ul { justify-content: center; gap: 18px; }
  .accroche h1 { font-size: 1.9rem; }
  th, td { padding: 10px 12px; }
  table { font-size: .88rem; }
}

/* --- Impression ---------------------------------------------------------- */
@media print {
  header nav, footer, #adminPanel { display: none; }
  body { background: #fff; font-size: 12pt; }
  main, #content { padding: 0; }
  a { color: inherit; border: 0; }
  h2, h3 { page-break-after: avoid; }
  li, tr { page-break-inside: avoid; }
}

/* --- Zone d'admin WonderCMS (ne pas y toucher) -------------------------- */
#save, #adminPanel, .marginTop5 { font-family: var(--sans); }
#adminPanel ul li::before { content: none; }
#adminPanel ul li { padding: 0; }