/*
Theme Name: FCPER
Theme URI: https://fcper.fr
Description: Thème enfant de Twenty Twenty-Five pour FCPER.fr
Author: Assembly Conseil
Template: twentytwentyfive
Version: 1.0.0
Text Domain: fcper
*/

/* ═══════════════════════════════════════════════
   FCPER — Charte graphique
   Basé sur Twenty Twenty-Five (parent)
   Couleurs : Navy #0a1628 / Accent #1a5f9c / Fond #f5f7fa
   Typographie : Gill Sans Nova / Gill Sans MT / Gill Sans
═══════════════════════════════════════════════ */

/* ── Variables globales ── */
:root {
  --fcper-bg:          #f5f7fa;
  --fcper-bg-alt:      #eaeef5;
  --fcper-bg-card:     #ffffff;
  --fcper-ink:         #0a1628;
  --fcper-ink-mid:     #384d6e;
  --fcper-ink-light:   #6a82a0;
  --fcper-accent:      #1a5f9c;
  --fcper-accent-dark: #154e82;
  --fcper-accent-tint: #d4e8f7;
  --fcper-navy:        #0a1628;
  --fcper-navy-mid:    #1c3054;
  --fcper-border:      #dce5f0;
  --fcper-font:        'Gill Sans Nova', 'Gill Sans MT', 'Gill Sans', Optima, sans-serif;
  --fcper-nav-h:       64px;
  --fcper-radius:      6px;
  --fcper-max-w:       1120px;
  --fcper-trans:       200ms ease;
}

/* ── Reset & base ── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--fcper-font) !important;
  background-color: var(--fcper-bg) !important;
  color: var(--fcper-ink) !important;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Typographie ── */
h1, h2, h3, h4, h5, h6,
.wp-block-post-title,
.entry-title {
  font-family: var(--fcper-font) !important;
  font-weight: 400 !important;
  letter-spacing: -0.01em;
  color: var(--fcper-ink);
  line-height: 1.15;
}

h1, .wp-block-post-title.is-style-h1 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 2.5vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p {
  font-family: var(--fcper-font);
  color: var(--fcper-ink-mid);
  line-height: 1.8;
}

a {
  color: var(--fcper-accent);
  text-decoration: none;
  transition: color var(--fcper-trans);
}
a:hover { color: var(--fcper-accent-dark); }

/* ── Layout général ── */
.wp-site-blocks,
.site {
  background-color: var(--fcper-bg);
}

.wp-block-group,
.entry-content,
.wp-block-post-content {
  max-width: var(--fcper-max-w);
  margin-left: auto;
  margin-right: auto;
}

/* ── Navigation ── */
.wp-block-navigation,
header.wp-block-template-part {
  background-color: var(--fcper-bg-card) !important;
  border-bottom: 1px solid var(--fcper-border);
  min-height: var(--fcper-nav-h);
}

.wp-block-navigation a,
.wp-block-navigation__container a {
  font-family: var(--fcper-font) !important;
  font-size: 13px !important;
  font-weight: 400;
  color: var(--fcper-ink-mid) !important;
  letter-spacing: 0.01em;
  padding: 4px 13px !important;
  transition: color var(--fcper-trans);
}

.wp-block-navigation a:hover,
.wp-block-navigation__container a:hover {
  color: var(--fcper-accent) !important;
}

.wp-block-navigation a[aria-current="page"] {
  color: var(--fcper-accent) !important;
  border-bottom: 2px solid var(--fcper-accent);
}

/* Logo / titre du site dans la nav */
.wp-block-site-title a,
.wp-block-site-title {
  font-family: var(--fcper-font) !important;
  font-size: 1.25rem !important;
  font-weight: 400 !important;
  color: var(--fcper-ink) !important;
  letter-spacing: 0.01em;
}

/* Sous-menus dropdown */
.wp-block-navigation__submenu-container {
  background-color: var(--fcper-bg-card) !important;
  border: 1px solid var(--fcper-border) !important;
  box-shadow: 0 8px 24px rgba(10,22,40,0.1) !important;
  border-radius: 0 0 var(--fcper-radius) var(--fcper-radius) !important;
}

.wp-block-navigation__submenu-container a {
  font-size: 13px !important;
  padding: 10px 20px !important;
  color: var(--fcper-ink-mid) !important;
  border-left: 2px solid transparent;
}

.wp-block-navigation__submenu-container a:hover {
  color: var(--fcper-accent) !important;
  border-left-color: var(--fcper-accent);
  background-color: rgba(26,95,156,0.05) !important;
}

/* ── Contenu des pages ── */
.entry-content,
.wp-block-post-content {
  padding: clamp(32px, 4vw, 52px) clamp(32px, 5vw, 64px);
  max-width: 820px;
}

/* ── Articles (Publications + Institutionnels) ── */

/* Liste d'articles */
.wp-block-query,
.wp-block-post-template {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wp-block-post {
  padding: 24px 0;
  border-top: 1px solid #eaeef5;
}

.wp-block-post:first-child {
  border-top: none;
}

.wp-block-post-title {
  font-size: 1.15rem !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  margin-bottom: 8px !important;
}

.wp-block-post-title a {
  color: var(--fcper-ink) !important;
  transition: color var(--fcper-trans);
}

.wp-block-post-title a:hover {
  color: var(--fcper-accent) !important;
}

.wp-block-post-date,
.wp-block-post-author {
  font-size: 11px;
  color: var(--fcper-ink-light);
  font-family: var(--fcper-font);
}

.wp-block-post-excerpt__excerpt {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--fcper-ink-mid);
}

.wp-block-post-excerpt__more-link {
  font-size: 12px;
  color: var(--fcper-accent);
  font-weight: 500;
}

/* Catégories / tags */
.wp-block-post-terms a,
.wp-block-term-description {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background-color: var(--fcper-accent);
  color: #fff !important;
  padding: 2px 9px;
  border-radius: 3px;
  text-decoration: none;
}

/* ── Page article individuel ── */
.single .entry-header {
  padding: clamp(32px,4vw,52px) clamp(32px,5vw,64px) 0;
  max-width: 820px;
  margin: 0 auto;
}

.wp-block-post-featured-image img {
  border-radius: var(--fcper-radius);
}

/* ── Boutons ── */
.wp-block-button__link,
.wp-element-button {
  font-family: var(--fcper-font) !important;
  background-color: var(--fcper-accent) !important;
  color: #fff !important;
  border-radius: var(--fcper-radius) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 10px 22px !important;
  letter-spacing: 0.02em;
  border: none !important;
  transition: background-color var(--fcper-trans) !important;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
  background-color: var(--fcper-accent-dark) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link {
  background-color: transparent !important;
  color: var(--fcper-accent) !important;
  border: 1px solid var(--fcper-accent) !important;
}

/* ── Séparateurs & règles ── */
.wp-block-separator {
  border-color: var(--fcper-border) !important;
  border-top-width: 1px !important;
}

hr {
  border: none;
  border-top: 1px solid var(--fcper-border);
  margin: 32px 0;
}

/* ── Blocs spéciaux ── */

/* Bloc citation */
.wp-block-quote {
  border-left: 3px solid var(--fcper-accent) !important;
  padding-left: 20px !important;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--fcper-ink-mid);
}

/* Bloc tableau */
.wp-block-table td,
.wp-block-table th {
  font-family: var(--fcper-font);
  font-size: 14px;
  border-color: var(--fcper-border) !important;
  padding: 10px 14px;
}

.wp-block-table th {
  background-color: var(--fcper-bg-alt);
  color: var(--fcper-ink);
  font-weight: 500;
}

/* Bloc accordéon (Otter Blocks) */
.o-accordion-item__title {
  font-family: var(--fcper-font) !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  color: var(--fcper-ink) !important;
}

.o-accordion-item__content {
  font-family: var(--fcper-font) !important;
  font-size: 14px !important;
  line-height: 1.8 !important;
  color: var(--fcper-ink-mid) !important;
}

/* Blocs colonnes */
.wp-block-columns {
  gap: 32px;
}

/* Blocs carte / groupe avec fond */
.wp-block-group.has-background {
  border-radius: var(--fcper-radius);
  padding: 20px 24px;
}

/* ── Footer ── */
footer.wp-block-template-part,
.wp-block-template-part[data-type="footer"] {
  background-color: var(--fcper-navy) !important;
  color: #a8bcd4 !important;
  padding: clamp(40px,6vw,64px) clamp(32px,5vw,64px);
}

footer a,
.wp-block-template-part[data-type="footer"] a {
  color: #a8bcd4 !important;
  transition: color var(--fcper-trans);
}

footer a:hover,
.wp-block-template-part[data-type="footer"] a:hover {
  color: var(--fcper-accent) !important;
}

footer p,
.wp-block-template-part[data-type="footer"] p {
  color: #a8bcd4;
  font-size: 13px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .entry-content,
  .wp-block-post-content {
    padding: 24px 20px;
  }

  .wp-block-navigation a {
    font-size: 14px !important;
  }
}

/* ── Utilitaires FCPER ── */

/* Label de rubrique (texte bleu majuscule au-dessus des titres) */
.fcper-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fcper-accent);
  margin-bottom: 14px;
}

/* Règle bleue sous les titres de page */
.fcper-rule {
  width: 40px;
  height: 2px;
  background-color: var(--fcper-accent);
  margin: 16px 0 24px;
  border: none;
}

/* Fiche texte réglementaire (Réglementation) */
.fcper-fiche {
  padding: 14px 18px;
  background-color: var(--fcper-bg-alt);
  border-left: 3px solid var(--fcper-accent);
  border-radius: 0 4px 4px 0;
  margin-bottom: 12px;
}

.fcper-fiche__ref {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fcper-accent);
  margin-bottom: 5px;
}

.fcper-fiche__desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--fcper-ink-mid);
}
