/* ==========================================================
   bernard-defrance.net - habillage modernisé SPIP
   SPIP 4.4 - squelettes historiques modernisés progressivement
   ========================================================== */

/* ----------------------------------------------------------
   Variables générales
   ---------------------------------------------------------- */

:root {
  --fond-page: #f7f3ea;
  --fond-contenu: #fffdf8;
  --fond-menu: #fff8ec;
  --fond-accent: #fffaf0;

  --texte: #232323;
  --texte-doux: #5f5f5f;

  --accent: #8a3d22;
  --accent-fonce: #5f1f12;
  --accent-clair: #ff9933;

  --bordure: #e2d7c5;
  --ombre: 0 10px 35px rgba(80, 55, 25, 0.08);
}


/* ----------------------------------------------------------
   Base générale
   ---------------------------------------------------------- */

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--fond-page);
  color: var(--texte);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
}

* {
  box-sizing: border-box;
}


/* ----------------------------------------------------------
   Compatibilité avec les anciennes tables HTML
   ---------------------------------------------------------- */

table {
  max-width: 100%;
}

td {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  vertical-align: top;
}


/* ----------------------------------------------------------
   Liens
   ---------------------------------------------------------- */

a,
a:link,
a:visited {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--accent-fonce);
  text-decoration-thickness: 0.12em;
}


/* ----------------------------------------------------------
   Conteneurs principaux existants
   ---------------------------------------------------------- */

#page,
#conteneur,
#contenu {
  max-width: 820px;
  margin: 0 auto;
}

#conteneur,
#contenu {
  background: var(--fond-contenu);
  border: 1px solid var(--bordure);
  border-radius: 18px;
  box-shadow: var(--ombre);
  padding: clamp(1.2rem, 3vw, 2.5rem);
}


/* ----------------------------------------------------------
   Titres
   ---------------------------------------------------------- */

h1,
h2,
h3,
p.titre1,
p.titre1left,
p.titre2,
p.titre3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
  color: #2b2118;
}

h1,
.entry-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.7rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

p.titre1,
p.titre1left {
  font-size: 1.55rem;
  margin-top: 2rem;
}

p.titre2 {
  font-size: 1.25rem;
}


/* ----------------------------------------------------------
   Texte courant
   ---------------------------------------------------------- */

p,
p.texte,
p.txtleft,
.texte,
.entry-content,
.chapo,
.ps,
.notes {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.75;
}

p {
  margin-top: 0;
  margin-bottom: 1.15rem;
}

p.texte,
.entry-content p {
  text-align: left;
}

.chapo {
  font-size: 1.1rem;
  color: #3f352b;
  border-left: 4px solid var(--accent-clair);
  padding-left: 1rem;
  margin: 1.5rem 0;
}


/* ----------------------------------------------------------
   Images
   ---------------------------------------------------------- */

img,
.spip_logo,
.spip_logos {
  max-width: 100%;
  height: auto;
}

.cartouche img {
  border-radius: 12px;
}


/* ----------------------------------------------------------
   Cartouche article
   ---------------------------------------------------------- */

.cartouche {
  margin-bottom: 2rem;
}

.cartouche small,
.published {
  color: var(--texte-doux);
  font-size: 0.95rem;
}


/* ----------------------------------------------------------
   Séparateurs
   ---------------------------------------------------------- */

hr {
  border: 0;
  border-top: 1px solid var(--bordure);
  margin: 2rem 0;
}


/* ----------------------------------------------------------
   Menu principal gauche
   ---------------------------------------------------------- */

td[width="180"] {
  background: var(--fond-menu);
  border-right: 1px solid var(--bordure);
}

.menu-principal {
  padding: 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.menu-principal ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.menu-principal li {
  margin: 0 0 0.65rem;
}

.menu-principal ul ul {
  margin-top: 0.45rem;
  padding-left: 1rem;
  border-left: 2px solid var(--bordure);
}

.menu-principal a {
  display: inline-block;
  text-decoration: none;
}

.menu-principal a:hover,
.menu-principal a:focus,
.menu-principal a.on,
.menu-principal a.active {
  text-decoration: underline;
}


/* ----------------------------------------------------------
   Entête actuelle
   ---------------------------------------------------------- */

body > table:first-of-type > tbody > tr:first-child td {
  background: #fff8ec;
}

.formulaire_recherche {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

.formulaire_recherche input.text,
.formulaire_recherche input[type="search"],
.formulaire_recherche input[type="text"] {
  max-width: 220px;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--bordure);
  border-radius: 999px;
  background: #ffffff;
}

.formulaire_recherche input.submit,
.formulaire_recherche button,
.formulaire_recherche input[type="submit"] {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--bordure);
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent);
  cursor: pointer;
}


/* ----------------------------------------------------------
   Page d'accueil
   ---------------------------------------------------------- */

.accueil {
  max-width: 980px;
  margin: 0 auto;
}

.accueil-message {
  margin: 0 auto 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 5px solid var(--accent-clair);
  border-radius: 14px;
  background: var(--fond-accent);
  box-shadow: var(--ombre);
  color: #3f352b;
  font-size: 1.05rem;
}

.accueil-message p:last-child {
  margin-bottom: 0;
}

.accueil-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 2rem;
  align-items: start;
  margin: 0 auto 2rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--bordure);
  border-radius: 20px;
  background: var(--fond-contenu);
  box-shadow: var(--ombre);
}

.accueil-hero-texte {
  min-width: 0;
}

.accueil-photo {
  margin: 0;
  text-align: center;
}

.accueil-photo img {
  width: 210px;
  max-width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--bordure);
  box-shadow: 0 8px 22px rgba(80, 55, 25, 0.12);
}

.accueil-photo figcaption {
  margin-top: 0.5rem;
  color: var(--texte-doux);
  font-size: 0.85rem;
  line-height: 1.4;
}

.accueil-bloc {
  margin: 0 auto 1.5rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--bordure);
  border-radius: 18px;
  background: var(--fond-contenu);
  box-shadow: var(--ombre);
}

.accueil-bloc h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  color: #2b2118;
}

.accueil-bloc-lien {
  background: var(--fond-accent);
}

.accueil-lien {
  margin-top: 1.5rem;
}

.bouton-lien {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--bordure);
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.bouton-lien:hover,
.bouton-lien:focus {
  background: #fff3df;
  color: var(--accent-fonce);
  text-decoration: none;
}

.pensee-du-mois {
  border-left: 5px solid var(--accent-clair);
}

.pensee-titre {
  margin-top: 1rem;
  color: var(--texte-doux);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-style: italic;
  text-align: right;
}

/* Nettoyage des anciens styles dans l'accueil */
.accueil p.titre1,
.accueil p.titre2,
.accueil p.texte,
.accueil .texte,
.accueil .entry-content {
  text-align: left;
}

/* ----------------------------------------------------------
   Correction des titres d'articles affichés dans les rubriques
   Exemple : spip.php?rubrique16
   ---------------------------------------------------------- */

.rubrique .cartouche .entry-title,
.rubrique h1.entry-title,
.rubrique #contenu h1 {
  display: block;
  margin: 0 0 1.2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.15;
  font-weight: 700;
  color: #2b2118;
}

/* Cas des titres générés dans les listes d'articles de rubrique */
.rubrique .menu.articles p.titre1left {
  margin: 0 0 1.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.2;
  font-weight: 700;
  color: #2b2118;
}

.rubrique .menu.articles p.titre1left a {
  display: block;
  margin-bottom: 0.25rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--texte-doux);
  text-decoration: none;
}

.rubrique .menu.articles p.titre1left b,
.rubrique .menu.articles p.titre1left .texte {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: inherit;
  line-height: inherit;
  font-weight: 700;
  color: #2b2118;
}

/* ----------------------------------------------------------
   Documents joints et portfolio
   ---------------------------------------------------------- */

#documents_joints,
#documents_portfolio {
  margin-top: 2rem;
  padding: 1.2rem;
  border: 1px solid var(--bordure);
  border-radius: 14px;
  background: var(--fond-accent);
}

#documents_joints ul {
  padding-left: 1.2rem;
}

#documents_joints li {
  margin-bottom: 0.8rem;
}
/* ----------------------------------------------------------
   Entête / menu du haut
   ---------------------------------------------------------- */

.entete-site {
  background: #fff8ec;
  border-bottom: 1px solid var(--bordure);
  box-shadow: 0 4px 18px rgba(80, 55, 25, 0.05);
}

.entete-site-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, auto);
  gap: 1.5rem;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.85rem 1.2rem;
}

.entete-logo {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--texte);
}

.entete-logo:hover,
.entete-logo:focus {
  color: var(--accent-fonce);
  text-decoration: none;
}

.entete-titre {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.1;
  font-weight: 700;
  color: #2b2118;
}

.entete-sous-titre {
  margin-top: 0.15rem;
  color: var(--texte-doux);
  font-size: 0.9rem;
  line-height: 1.3;
}

.entete-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.entete-navigation a {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.95rem;
  text-decoration: none;
}

.entete-navigation a:hover,
.entete-navigation a:focus {
  border-color: var(--bordure);
  background: #ffffff;
  color: var(--accent-fonce);
  text-decoration: none;
}

.entete-recherche {
  justify-self: end;
}

.entete-recherche .formulaire_recherche {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.entete-recherche .formulaire_recherche label {
  position: absolute;
  left: -9999px;
}

.entete-recherche .formulaire_recherche input.text,
.entete-recherche .formulaire_recherche input[type="search"],
.entete-recherche .formulaire_recherche input[type="text"] {
  width: 210px;
  max-width: 100%;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--bordure);
  border-radius: 999px;
  background: #ffffff;
}

.entete-recherche .formulaire_recherche input.submit,
.entete-recherche .formulaire_recherche button,
.entete-recherche .formulaire_recherche input[type="submit"] {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--bordure);
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent);
  cursor: pointer;
}

.entete-recherche .formulaire_recherche input.submit:hover,
.entete-recherche .formulaire_recherche button:hover,
.entete-recherche .formulaire_recherche input[type="submit"]:hover {
  background: #fff3df;
  color: var(--accent-fonce);
}

/* ----------------------------------------------------------
   Résumés d'articles dans les pages rubrique
   ---------------------------------------------------------- */

.resume-article {
  margin: 0 0 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--bordure);
}

.resume-article:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.resume-date {
  margin: 0 0 0.35rem;
  color: var(--texte-doux);
  font-size: 0.95rem;
}

.resume-titre {
  margin: 0 0 0.8rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.15;
  font-weight: 700;
}

.resume-titre a {
  color: #2b2118;
  text-decoration: none;
}

.resume-titre a:hover,
.resume-titre a:focus {
  color: var(--accent-fonce);
  text-decoration: underline;
}

.resume-descriptif {
  color: var(--texte);
  font-size: 1rem;
  line-height: 1.65;
}

/* ----------------------------------------------------------
   Rubriques spéciales affichant directement un article
   Exemple : rubrique-3.html
   ---------------------------------------------------------- */

.rubrique-directe #page,
.rubrique-directe #conteneur,
.rubrique-directe #contenu {
  max-width: 820px;
}

.article-direct .entry-title {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
}

.article-direct .entry-content {
  font-size: 1rem;
  line-height: 1.75;
}

.article-direct .entry-content p {
  margin-bottom: 1.15rem;
}

/* Barre admin SPIP : quand tu es connecté, elle peut rester au-dessus */
.spip-admin-bloc,
#spip-admin {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* Mobile */
@media (max-width: 900px) {
  .entete-site-inner {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    text-align: center;
  }

  .entete-logo {
    align-items: center;
  }

  .entete-navigation {
    justify-content: center;
  }

  .entete-recherche {
    justify-self: center;
    width: 100%;
  }

  .entete-recherche .formulaire_recherche {
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .entete-site-inner {
    padding: 0.8rem;
  }

  .entete-navigation {
    gap: 0.25rem;
  }

  .entete-navigation a {
    padding: 0.35rem 0.55rem;
    font-size: 0.9rem;
  }

  .entete-recherche .formulaire_recherche {
    display: block;
  }

  .entete-recherche .formulaire_recherche input.text,
  .entete-recherche .formulaire_recherche input[type="search"],
  .entete-recherche .formulaire_recherche input[type="text"] {
    width: 100%;
    margin-bottom: 0.4rem;
  }
}

/* ----------------------------------------------------------
   Forum
   ---------------------------------------------------------- */

ul.forum {
  padding-left: 0;
  list-style: none;
}

.forum-message {
  border: 1px solid var(--bordure);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--fond-accent);
}

.forum-chapo {
  margin-bottom: 0.8rem;
}

.forum-titre {
  font-family: Georgia, "Times New Roman", serif;
}


/* ----------------------------------------------------------
   Bouton retour haut
   ---------------------------------------------------------- */

a[href="#haut"] {
  display: inline-block;
  margin: 1rem 0;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--bordure);
  border-radius: 999px;
  background: var(--fond-accent);
  text-decoration: none;
}


/* ----------------------------------------------------------
   Pied de page
   ---------------------------------------------------------- */

body table:last-of-type,
body table:last-of-type td {
  font-size: 0.9rem;
  color: var(--texte-doux);
}


/* ----------------------------------------------------------
   Responsive / mobile
   ---------------------------------------------------------- */

@media (max-width: 820px) {
  .accueil-hero {
    grid-template-columns: 1fr;
  }

  .accueil-photo {
    order: -1;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: auto !important;
  }

  td[width="180"] {
    border-right: 0;
    border-bottom: 1px solid var(--bordure);
    padding: 1rem;
  }

  table[cellpadding="20"] td {
    padding: 1rem !important;
  }

  #page,
  #conteneur,
  #contenu {
    max-width: 100%;
  }

  #conteneur,
  #contenu {
    border-radius: 12px;
    padding: 1rem;
  }

  .formulaire_recherche {
    display: block;
  }

  .formulaire_recherche input.text,
  .formulaire_recherche input[type="search"],
  .formulaire_recherche input[type="text"] {
    max-width: 100%;
    width: 100%;
    margin-bottom: 0.4rem;
  }

  .menu-principal {
    padding: 0;
  }

  .accueil-message,
  .accueil-hero,
  .accueil-bloc {
    border-radius: 12px;
  }
}
/* ==========================================================
   Variante « orange chaleureux » — Bernard Defrance
   Accents inspirés de l'ancien site (#FF9933)
   Ajouter EN FIN de config.css pour conserver les styles SPIP.
   ========================================================== */

:root {
  --fond-page: #fff5e7;
  --fond-contenu: #fffdfa;
  --fond-menu: #ffecd3;
  --fond-accent: #fff0d9;
  --texte: #30251c;
  --texte-doux: #594d42;
  --accent: #a44910;
  --accent-fonce: #702d0c;
  --accent-clair: #ff9933;
  --bordure: #ebcfac;
  --ombre: 0 10px 32px rgba(115, 62, 17, 0.09);
}

body {
  background: linear-gradient(100deg, #fce8cd 0%, #fff8ef 36%, #fff6e9 100%);
  color: var(--texte);
}

/* Bandeau orange vif, mais suffisamment foncé pour lire le texte blanc */
.entete-site {
  background: linear-gradient(110deg, #a44910 0%, #be5915 100%);
  border-bottom: 4px solid #f7a13d;
  box-shadow: 0 5px 20px rgba(112, 45, 12, 0.16);
}

.entete-site-inner {
  padding-top: 1.05rem;
  padding-bottom: 1.05rem;
}

.entete-site .entete-titre {
  color: #fff;
  font-size: clamp(1.65rem, 2.8vw, 2.25rem);
  letter-spacing: -0.015em;
}

.entete-site .entete-sous-titre {
  color: #fff4e4;
}

.entete-site .entete-logo,
.entete-site .entete-logo:hover,
.entete-site .entete-logo:focus,
.entete-site .entete-navigation a,
.entete-site .entete-navigation a:link,
.entete-site .entete-navigation a:visited {
  color: #fff;
}

.entete-site .entete-navigation a {
  font-weight: 600;
}

.entete-site .entete-navigation a:hover,
.entete-site .entete-navigation a:focus {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.entete-recherche .formulaire_recherche input[type="submit"],
.entete-recherche .formulaire_recherche button,
.entete-recherche .formulaire_recherche input.submit {
  background: #fff0d9;
  border-color: #fff0d9;
  color: #77300b;
  font-weight: 700;
}

/* Menu gauche davantage présent */
td[width="180"] {
  background: linear-gradient(180deg, #ffdfb9 0%, #fff0db 100%);
  border-right: 3px solid #df8328;
}

.menu-principal {
  padding: 1.35rem 0.75rem;
}

.menu-principal > ul > li {
  margin-bottom: 0.3rem;
}

.menu-principal a,
.menu-principal a:link,
.menu-principal a:visited {
  display: block;
  padding: 0.4rem 0.55rem;
  border-left: 3px solid transparent;
  border-radius: 6px;
  color: #74320b;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
}

.menu-principal a:hover,
.menu-principal a:focus,
.menu-principal a.on,
.menu-principal a.active {
  background: #ffd39d;
  border-left-color: #c65f11;
  color: #5d270a;
  text-decoration: none;
}

.menu-principal ul ul {
  border-left-color: #eca65f;
}

.menu-principal ul ul a {
  font-weight: 500;
}

/* Cartes de contenu : touches orangées discrètes */
#conteneur,
#contenu,
.accueil-hero,
.accueil-bloc {
  border-color: var(--bordure);
  box-shadow: var(--ombre);
}

.accueil-hero {
  border-top: 5px solid #ef9130;
}

.accueil-message {
  border-left-color: #ec8522;
  background: #fff1dc;
}

.accueil-bloc h2,
.resume-titre,
.rubrique .cartouche .entry-title,
.article-direct .entry-title {
  color: #793711;
}

.accueil-bloc h2 {
  border-bottom: 2px solid #f4d8ae;
  padding-bottom: 0.55rem;
}

.pensee-du-mois {
  border-left-color: #ed8d27;
}

.bouton-lien {
  background: #aa4b11;
  border-color: #aa4b11;
  color: #fff !important;
}

.bouton-lien:hover,
.bouton-lien:focus {
  background: #79330c;
  color: #fff !important;
}

@media (max-width: 760px) {
  td[width="180"] {
    border-right: 0;
    border-bottom: 3px solid #df8328;
  }
}
