/*
Theme Name: Les avis de Camélia
Theme URI: https://www.les-avis-de-camelia.com/
Author: Les avis de Camélia
Description: Le carnet d'avis de Camélia — thème sur-mesure écrit de zéro pour ce site : ivoire poudré, framboise sourde, Lora & Mulish self-hosted. Aucun page-builder.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: camelia
*/

/* ==========================================================
   Jetons — mode clair (contrastes vérifiés ≥ 4.5:1, P-110)
   Le texte posé sur l'accent utilise TOUJOURS
   --lac-accent-contraste, jamais l'héritage.
   ========================================================== */
:root {
  --lac-fond: #fbf5f2;              /* ivoire poudré : fond neutre unique (P-116) */
  --lac-encre: #33232a;             /* encre brun-rose : 13.7:1 sur fond */
  --lac-accent: #9c3457;            /* framboise sourde : 6.4:1 sur fond */
  --lac-accent-contraste: #fbf5f2;  /* texte posé SUR l'accent : 6.4:1 */
  --lac-sourd: #6b565f;             /* texte secondaire : 6.2:1 sur fond */
  --lac-carte: #ffffff;             /* surface des fiches */
  --lac-lisere: #eadcd7;            /* filets, bordures douces */
  --lac-voile: #f4e7e4;             /* aplat discret (onglets, encarts) */
  --lac-serif: "Lora", Georgia, "Times New Roman", serif;
  --lac-sans: "Mulish", "Segoe UI", Tahoma, sans-serif;
  --lac-rond: 14px;
  --lac-pas: clamp(1rem, 2.5vw, 1.75rem);
  --lac-mesure: 44rem;
}

/* Jetons — mode sombre (contrastes vérifiés ≥ 4.5:1, P-110) */
@media (prefers-color-scheme: dark) {
  :root {
    --lac-fond: #241b20;
    --lac-encre: #f2e7ec;            /* 13.9:1 sur fond sombre */
    --lac-accent: #e79fb9;           /* rose poudré : 8.0:1 sur fond sombre */
    --lac-accent-contraste: #241b20; /* texte posé SUR l'accent : 8.0:1 */
    --lac-sourd: #c4aab6;            /* 7.8:1 sur fond sombre */
    --lac-carte: #2e2329;
    --lac-lisere: #3c2f36;
    --lac-voile: #322730;
  }
}

/* ============ Base (mobile d'abord, 390 px) ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--lac-fond);
  color: var(--lac-encre);
  font-family: var(--lac-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lac-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lac-accent); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--lac-serif); line-height: 1.22; margin: 0 0 .6em; }
h1 { font-size: clamp(1.75rem, 5vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
.cadre { width: min(100% - 2 * var(--lac-pas), 68rem); margin-inline: auto; }
.lecture { max-width: var(--lac-mesure); }
.visuel-cache {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.saut {
  position: absolute; left: -999px; top: 0; z-index: 99;
  background: var(--lac-accent); color: var(--lac-accent-contraste);
  padding: .7em 1.2em; border-radius: 0 0 var(--lac-rond) 0;
}
.saut:focus { left: 0; }

/* ============ En-tête : bandeau non collant + vague ============ */
.entete { background: var(--lac-fond); padding-top: .9rem; }
.entete .cadre {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.enseigne { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--lac-encre); }
.enseigne svg { width: 44px; height: 44px; flex: none; }
.enseigne b {
  font-family: var(--lac-serif); font-style: italic; font-weight: 700;
  font-size: 1.35rem; letter-spacing: .01em;
}
.enseigne small { display: block; font-family: var(--lac-sans); font-style: normal; font-size: .72rem; color: var(--lac-sourd); letter-spacing: .02em; }

/* Navigation : flex, aucune puce (P-004) */
.ruban { display: flex; align-items: center; }
.ruban ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .1rem .35rem; align-items: center;
}
.ruban li { list-style: none; }
.ruban a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: .35em .75em; border-radius: 999px;
  font-weight: 700; font-size: .95rem; text-decoration: none; color: var(--lac-encre);
}
.ruban a:hover { background: var(--lac-voile); color: var(--lac-accent); }
.ruban .actif > a, .ruban .current-menu-item > a, .ruban .current_page_item > a {
  background: var(--lac-accent); color: var(--lac-accent-contraste);
}
.bascule {
  display: none; background: none; border: 1.5px solid var(--lac-lisere);
  border-radius: 999px; min-width: 44px; min-height: 44px;
  color: var(--lac-encre); font: inherit; font-weight: 700; cursor: pointer;
  padding: .3em .9em;
}
@media (max-width: 47.9rem) {
  .bascule { display: inline-flex; align-items: center; gap: .4em; }
  .ruban { display: none; width: 100%; }
  .ruban.ouvert { display: flex; }
  .ruban ul { flex-direction: column; align-items: stretch; width: 100%; padding: .5rem 0 .2rem; }
  .ruban a { width: 100%; border-radius: var(--lac-rond); }
}
/* Trait ondulé signature, sous l'en-tête */
.vague { display: block; width: 100%; height: 18px; color: var(--lac-accent); margin-top: .6rem; }

/* ============ Fil d'Ariane ============ */
.fil { font-size: .85rem; color: var(--lac-sourd); margin: 1rem 0 1.4rem; }
.fil ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3em; }
.fil li + li::before { content: "›"; margin-right: .3em; color: var(--lac-sourd); }
.fil a { color: var(--lac-sourd); }

/* ============ Accueil : le mot de Camélia ============ */
.mot { padding: clamp(1.8rem, 5vw, 3.2rem) 0 1rem; }
.mot .lecture { font-size: 1.15rem; }
.mot h1 span { color: var(--lac-accent); }
.signature {
  font-family: var(--lac-serif); font-style: italic; font-weight: 600;
  font-size: 1.5rem; color: var(--lac-accent); transform: rotate(-2deg);
  display: inline-block; margin-top: .4rem;
}

/* ============ Fiches d'avis en zigzag ============ */
.zigzag { display: grid; gap: 1.4rem; padding: 1rem 0 2rem; }
.fiche {
  background: var(--lac-carte); border: 1px solid var(--lac-lisere);
  border-radius: var(--lac-rond); overflow: hidden;
  display: grid; grid-template-rows: auto 1fr;
}
.fiche figure { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; }
.fiche figure img { width: 100%; height: 100%; object-fit: cover; }
.fiche > div { padding: 1.1rem 1.25rem 1.3rem; }
.fiche h3 { margin-bottom: .35em; }
.fiche h3 a { color: var(--lac-encre); text-decoration: none; }
.fiche h3 a:hover { color: var(--lac-accent); text-decoration: underline; }
.griffe {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--lac-accent); text-decoration: none;
  border-bottom: 2px solid var(--lac-accent); margin-bottom: .6rem;
}
.quand { font-size: .85rem; color: var(--lac-sourd); }
@media (min-width: 48rem) {
  .fiche { grid-template-columns: 5fr 7fr; grid-template-rows: none; align-items: center; }
  .fiche figure { aspect-ratio: 4 / 3; height: 100%; }
  .zigzag .fiche:nth-child(even) figure { order: 2; }
}

/* ============ Mes carnets : onglets de rubrique ============ */
.carnets { padding: .5rem 0 2.2rem; }
.onglets { display: grid; gap: .8rem; grid-template-columns: 1fr 1fr; }
.onglet {
  position: relative; display: block; text-decoration: none;
  background: var(--lac-voile); color: var(--lac-encre);
  border: 1px solid var(--lac-lisere); border-radius: 4px var(--lac-rond) var(--lac-rond) var(--lac-rond);
  padding: 1rem 1.1rem 1.1rem; min-height: 44px;
}
.onglet::before {
  content: ""; position: absolute; top: -1px; left: -1px;
  border-style: solid; border-width: 16px 16px 0 0;
  border-color: var(--lac-accent) transparent transparent transparent;
  border-radius: 4px 0 0 0;
}
.onglet b { font-family: var(--lac-serif); font-size: 1.1rem; display: block; margin-bottom: .2em; }
.onglet span { font-size: .85rem; color: var(--lac-sourd); }
.onglet:hover { border-color: var(--lac-accent); }
@media (min-width: 48rem) { .onglets { grid-template-columns: repeat(4, 1fr); } }

/* ============ Mes dernières notes : liste datée ============ */
.notes { padding-bottom: 2.2rem; }
.notes ul { list-style: none; margin: 0; padding: 0; }
.notes li {
  display: flex; gap: 1rem; align-items: baseline;
  padding: .7rem 0; border-bottom: 1px dashed var(--lac-lisere);
}
.notes time { flex: none; font-size: .82rem; color: var(--lac-sourd); min-width: 6.2rem; }
.notes a { font-weight: 700; color: var(--lac-encre); text-decoration: none; }
.notes a:hover { color: var(--lac-accent); text-decoration: underline; }

/* ============ Encart Camélia + capture ============ */
.qui {
  background: var(--lac-voile); border: 1px solid var(--lac-lisere);
  border-radius: var(--lac-rond); padding: 1.4rem 1.3rem; margin: 0 0 2.4rem;
  display: grid; gap: 1.2rem;
}
.qui .fleur { width: 64px; height: 64px; }
.qui h2 { margin-bottom: .3em; }
.qui p { margin: .2em 0 .8em; }
@media (min-width: 48rem) { .qui { grid-template-columns: auto 1fr auto; align-items: center; } }

.capture { display: grid; gap: .6rem; max-width: 22rem; }
.champ {
  font: inherit; padding: .65em .9em; min-height: 44px;
  border: 1.5px solid var(--lac-lisere); border-radius: 10px;
  background: var(--lac-carte); color: var(--lac-encre); width: 100%;
}
.champ:focus-visible { border-color: var(--lac-accent); }
.bouton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .6em 1.3em; border: 0; border-radius: 999px;
  background: var(--lac-accent); color: var(--lac-accent-contraste);
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
}
.bouton:hover { filter: brightness(1.08); }
.merci { background: var(--lac-carte); border: 1px solid var(--lac-accent); border-radius: 10px; padding: .8em 1em; }
.delai { font-size: .8rem; color: var(--lac-sourd); margin: 0; }

/* ============ Article ============ */
.article-tete { padding-top: .4rem; }
.article-tete .quand { display: block; margin: .4rem 0 1.2rem; }
.article-visuel { border-radius: var(--lac-rond); overflow: hidden; margin: 0 0 1.6rem; }
.prose { max-width: var(--lac-mesure); }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose img { border-radius: 10px; }
.prose blockquote {
  margin: 1.4em 0; padding: .2em 0 .2em 1.1em;
  border-left: 3px solid var(--lac-accent);
  font-family: var(--lac-serif); font-style: italic; color: var(--lac-sourd);
}
.prose a { color: var(--lac-accent); }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1.2em; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--lac-lisere); padding: .55em .7em; text-align: left; }
.prose th { background: var(--lac-voile); font-family: var(--lac-serif); }
.prose .wp-block-button__link { background: var(--lac-accent); color: var(--lac-accent-contraste); border-radius: 999px; }

/* Navigation entre billets */
.suite { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; margin: 2rem 0; font-size: .95rem; }
.suite a { max-width: 46%; }

/* ============ Archives ============ */
.archive-tete { padding: 1.2rem 0 .4rem; }
.archive-tete p { color: var(--lac-sourd); max-width: var(--lac-mesure); }
.moisson { display: grid; gap: 1.2rem; padding: 1rem 0 2rem; grid-template-columns: 1fr; }
@media (min-width: 48rem) { .moisson .fiche { grid-template-columns: 4fr 8fr; } }
.pagination { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 2.4rem; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: .3em .7em;
  border: 1.5px solid var(--lac-lisere); border-radius: 10px;
  text-decoration: none; color: var(--lac-encre);
}
.pagination .current { background: var(--lac-accent); color: var(--lac-accent-contraste); border-color: var(--lac-accent); }

/* ============ Recherche & 404 ============ */
.quete { display: flex; gap: .5rem; max-width: 26rem; }
.quete .champ { flex: 1; }
.perdu { text-align: center; padding: 3.5rem 0; }
.perdu .fleur { width: 80px; height: 80px; margin: 0 auto 1rem; }

/* ============ Pied de page ============ */
.pied { margin-top: 2rem; background: var(--lac-voile); border-top: 1px solid var(--lac-lisere); }
.pied .vague { transform: scaleY(-1); margin: 0; }
.pied .cadre { padding: 1.6rem 0 2rem; display: grid; gap: 1.2rem; }
.pied nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
.pied nav a { display: inline-flex; min-height: 44px; align-items: center; color: var(--lac-encre); text-decoration: none; font-weight: 700; font-size: .92rem; }
.pied nav a:hover { color: var(--lac-accent); text-decoration: underline; }
.pied small { color: var(--lac-sourd); display: block; }
@media (min-width: 48rem) { .pied .cadre { grid-template-columns: 1fr auto; align-items: start; } }

/* Préférence : moins d'animations */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
