/*
Theme Name: Chess91
Theme URI: https://echecs91.fr
Description: Thème du site du Comité Départemental du Jeu d'Échecs de l'Essonne (CDJE 91). Thème « block » (Full Site Editing) autonome, éditable dans wp-admin — pensé pour la reprise en main par des bénévoles.
Author: CDJE 91
Version: 0.1.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: chess91
Tags: full-site-editing, blog, block-styles
*/

/* Fraunces — police de titre dédiée, auto-hébergée (licence OFL, variable 300–700) */
@font-face {
  font-family: 'Fraunces';
  font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('assets/fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('assets/fonts/fraunces-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Titres : Fraunces (application directe, indépendante du cache theme.json) + réglage optique */
h1, h2, h3, h4, h5, h6, .wp-block-heading {
  font-family: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  font-optical-sizing: auto;
}
.c91-hero h1 { font-variation-settings: 'opsz' 92, 'wght' 560, 'SOFT' 0, 'WONK' 0; }

/* Sécurité anti-débordement horizontal (surtout mobile) */
html, body { overflow-x: hidden; max-width: 100%; }
img, iframe, .wp-block-image img { max-width: 100%; height: auto; }
.wp-block-site-title { min-width: 0; }
.wp-block-site-title a { white-space: normal; overflow-wrap: break-word; }
.wp-block-navigation { min-width: 0; }
@media (max-width: 600px) {
  .wp-block-site-title { font-size: 0.95rem; line-height: 1.2; }
}

/* Documents & règlements — tableau */
.c91-docs-cat { font-size: 1.15rem; margin: 2rem 0 .5rem; padding-bottom: .3rem; border-bottom: 2px solid #c9820a; display: inline-block; }
.c91-docs { overflow-x: auto; margin-top: .5rem; }
.c91-docs table { width: 100%; border-collapse: collapse; }
.c91-docs th { text-align: left; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #58627a; padding: .6rem .8rem; border-bottom: 2px solid #e3e8f1; }
.c91-docs td { padding: .85rem .8rem; border-bottom: 1px solid #e3e8f1; vertical-align: middle; }
.c91-docs tr:hover td { background: #fbfcfe; }
.c91-docs .c91-doc-title { font-weight: 700; color: #14213d; min-width: 15rem; }
.c91-docs .c91-doc-desc { color: #58627a; font-size: .92rem; }
.c91-docs .c91-doc-action { text-align: right; white-space: nowrap; }
.c91-doc-btn { display: inline-block; padding: .45rem .95rem; background: #1d4ed8; color: #fff; border-radius: 8px; font-weight: 600; font-size: .85rem; text-decoration: none; }
.c91-doc-btn:hover { background: #14213d; }
@media (max-width: 660px) {
  .c91-docs .c91-doc-title { min-width: 0; }
  .c91-docs td, .c91-docs th { padding: .6rem .35rem; }
  .c91-docs .c91-doc-desc { font-size: .85rem; }
}

/* Championnat — parcours par étapes */
.c91-etapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 1.75rem 0; }
.c91-etape { background: #fff; border: 1px solid #e3e8f1; border-top: 4px solid #1d4ed8; border-radius: 12px; padding: 1.1rem 1rem 1.2rem; }
.c91-etape .n { display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: #1d4ed8; color: #fff; font-weight: 700; font-size: 1.1rem; font-family: var(--wp--preset--font-family--serif); }
.c91-etape h3 { margin: .65rem 0 .25rem; font-size: 1.05rem; color: #14213d; }
.c91-etape p { margin: 0; color: #58627a; font-size: .88rem; }
.c91-etape.final { border-top-color: #c9820a; }
.c91-etape.final .n { background: #c9820a; }

/* Logo en-tête */
.c91-logo { display: inline-flex; }
.c91-logo img { height: 74px; width: auto; display: block; }
@media (max-width: 600px) { .c91-logo img { height: 52px; } }
header .wp-block-navigation a { color: var(--wp--preset--color--contrast); font-weight: 500; }
header .wp-block-navigation a:hover { color: var(--wp--preset--color--primary); }

/* Cartes « À découvrir » et « Partenaires » */
.c91-decouvrir .wp-block-column, .c91-partenaires .wp-block-column { }
.c91-partenaire {
  display: block; height: 100%; text-decoration: none;
  border: 1px solid #e3e8f1; border-radius: 12px; padding: 1.1rem 1.2rem;
  background: #fff; transition: box-shadow .18s ease, transform .18s ease;
}
.c91-partenaire:hover { box-shadow: 0 6px 20px rgba(20,33,61,.08); transform: translateY(-2px); }
.c91-partenaire .sigle { font-weight: 700; color: #14213d; font-size: 1.05rem; }
.c91-partenaire .desc { color: #58627a; font-size: .88rem; margin-top: .2rem; }
.c91-partenaire .ext { color: #1d4ed8; font-size: .82rem; font-weight: 600; margin-top: .5rem; display: inline-block; }
/* Partenaires en groupes (instances / institutionnels) */
.c91-part-groupes { margin-top: 1rem; }
.c91-part-titre { margin: 1.5rem 0 .7rem; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8791a5; }
.c91-part-groupes > .c91-part-titre:first-child { margin-top: 0; }
.c91-part-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; align-items: stretch; }
/* height:auto (au lieu de 100%) → la grille égalise les hauteurs par étirement */
.c91-part-grid > .c91-partenaire { height: auto; }
.c91-part-aussi { margin: 1.1rem 0 0; font-size: .9rem; color: #58627a; }
.c91-part-aussi a { color: #1d4ed8; font-weight: 600; }
/* Logo du partenaire, hauteur normalisée, aligné à gauche */
.c91-part-logo { display: block; height: 46px; width: auto; max-width: 165px; object-fit: contain; margin: 0 0 .85rem; }

/* Accueil : Compétitions & tournois du département */
.c91-comp-layout { gap: 2rem; margin-top: .3rem; }
.c91-comp-cat { margin: 0 0 .55rem; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8791a5; }
.c91-comp-list { line-height: 1.7; color: #3a4257; margin: 0; padding-left: 1.1rem; }
.c91-comp-list li { margin-bottom: .35rem; }
.c91-comp-list a { color: #1d4ed8; font-weight: 600; }
.c91-competitions .c91-agenda-home { max-width: 640px; }
.c91-agenda-home { display: flex; flex-direction: column; gap: .55rem; margin-top: .3rem; }
.c91-ag-row { display: flex; align-items: center; gap: .9rem; text-decoration: none; border: 1px solid #e3e8f1; border-radius: 12px; padding: .6rem .8rem; background: #fff; transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease; }
.c91-ag-row:hover { box-shadow: 0 6px 18px rgba(20,33,61,.08); transform: translateY(-1px); border-color: #cdd6e6; }
.c91-ag-date { flex: 0 0 auto; width: 46px; text-align: center; background: #14213d; color: #fff; border-radius: 9px; padding: .35rem 0; line-height: 1.1; }
.c91-ag-date .j { display: block; font-size: 1.15rem; font-weight: 700; }
.c91-ag-date .m { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; opacity: .85; }
.c91-ag-info { flex: 1 1 auto; min-width: 0; }
.c91-ag-info .t { display: block; font-weight: 600; color: #14213d; }
.c91-ag-info .l { display: block; font-size: .85rem; color: #58627a; }
.c91-ag-fide { font-size: .66rem; font-weight: 700; color: #b8860b; border: 1px solid #e3c37a; border-radius: 5px; padding: 0 .3rem; margin-left: .35rem; }
.c91-ag-go { flex: 0 0 auto; color: #1d4ed8; font-size: 1.3rem; }
.c91-ag-empty { color: #58627a; font-size: .92rem; }

/* Clubs — bloc 2 colonnes : liste (gauche) + carte (droite) */
.c91-clubs-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.5rem; align-items: start; margin-top: 1.5rem; }
.c91-clubs-list { max-height: 72vh; overflow-y: auto; padding-right: .4rem; }
.c91-clubs-map { height: 72vh; min-height: 420px; border-radius: 14px; overflow: hidden; border: 1px solid #e3e8f1; position: sticky; top: 1rem; }
.c91-club { padding: .9rem 1rem; border: 1px solid #e3e8f1; border-radius: 12px; margin-bottom: .7rem; background: #fff; cursor: pointer; transition: box-shadow .15s ease, border-color .15s ease; }
.c91-club[data-geo]:hover { border-color: #1d4ed8; box-shadow: 0 4px 14px rgba(20,33,61,.08); }
.c91-club h3 { margin: 0 0 .25rem; font-size: 1.1rem; }
.c91-club h3 a { color: #14213d; text-decoration: none; }
.c91-club h3 a:hover { color: #1d4ed8; }
.c91-club-addr { display: block; color: #58627a; font-size: .9rem; line-height: 1.4; }
.c91-club-contacts { display: block; margin-top: .4rem; font-size: .85rem; }
.c91-club-contacts a { color: #1d4ed8; text-decoration: none; font-weight: 600; }
.c91-club-contacts a:hover { text-decoration: underline; }
@media (max-width: 800px) {
  .c91-clubs-layout { grid-template-columns: 1fr; }
  .c91-clubs-map { position: static; height: 340px; min-height: 0; order: -1; }
  .c91-clubs-list { max-height: none; overflow: visible; }
}

/* Fiche club — contacts */
.c91-fiche-contacts { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 1rem 0 1.5rem; padding: 1rem 1.25rem; background: #f3f4f6; border-radius: 12px; }
.c91-fiche-contacts .row { display: flex; gap: .5rem; font-size: .95rem; }
.c91-fiche-contacts .k { font-weight: 700; color: #14213d; }
.c91-fiche-contacts a { color: #1d4ed8; text-decoration: none; }
.c91-fiche-contacts a:hover { text-decoration: underline; }
.c91-fiche-tournoi { margin: 1rem 0 1.5rem; }
.c91-fiche-tournoi .c91-fiche-contacts { margin: .6rem 0 0; }
.c91-fiche-essonne { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: .2rem .6rem; border-radius: 999px; background: #c9820a; color: #fff; }
.c91-fiche-insc { display: inline-block; margin-top: 1rem; padding: .7rem 1.4rem; background: #1d4ed8; color: #fff; font-weight: 700; text-decoration: none; border-radius: 999px; }
.c91-fiche-insc:hover { background: #14213d; }

/* Surtitre du hero, encadré de fins filets ambre (touche éditoriale) */
.c91-hero-eyebrow {
  display: flex; align-items: center; justify-content: center; gap: .9rem;
  margin: 0 0 .55rem; color: #c9820a;
  font-size: .7rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
}
.c91-hero-eyebrow::before, .c91-hero-eyebrow::after {
  content: ""; display: block; width: 30px; height: 1px;
}
.c91-hero-eyebrow::before { background: linear-gradient(to right, transparent, #cf9a3f); }
.c91-hero-eyebrow::after  { background: linear-gradient(to right, #cf9a3f, transparent); }
/* Titre : serif resserré, élégant, sans trop pousser les actualités */
.c91-hero h1 {
  text-wrap: balance; line-height: 1.1; letter-spacing: -0.012em;
  margin: 0 0 .4rem; font-size: clamp(1.6rem, 3.05vw, 2.3rem);
}
.c91-hero p:not(.c91-hero-eyebrow) { margin: 0; }

/* Filigrane du bandeau : saut du cavalier (échecs + maths) sur trame de points.
   Très discret, estompé au centre pour ne pas gêner le titre. */
.c91-hero { position: relative; }
.c91-hero::before {
  content: ""; position: absolute; left: 50%; top: -1.4rem;
  width: 100vw; height: 340px; transform: translateX(-50%);
  z-index: -1; pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'%3E%3Cpath d='M30 122 L30 44 L92 44' fill='none' stroke='%2314213d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.42'/%3E%3Ccircle cx='30' cy='122' r='4' fill='%2314213d' opacity='0.28'/%3E%3Ccircle cx='30' cy='44' r='2.6' fill='%2314213d' opacity='0.22'/%3E%3Ccircle cx='92' cy='44' r='5' fill='%23c9820a' opacity='0.65'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'%3E%3Cpath d='M120 28 L120 106 L58 106' fill='none' stroke='%2314213d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.42'/%3E%3Ccircle cx='120' cy='28' r='4' fill='%2314213d' opacity='0.28'/%3E%3Ccircle cx='120' cy='106' r='2.6' fill='%2314213d' opacity='0.22'/%3E%3Ccircle cx='58' cy='106' r='5' fill='%23c9820a' opacity='0.65'/%3E%3C/svg%3E"),
    radial-gradient(circle, rgba(20,33,61,0.06) 1.1px, transparent 1.8px);
  background-repeat: no-repeat, no-repeat, repeat;
  background-position: left 4% top 9%, right 4% bottom 11%, center;
  background-size: 160px 160px, 160px 160px, 46px 46px;
  -webkit-mask-image: radial-gradient(122% 105% at 50% 44%, transparent 0%, transparent 39%, #000 80%);
          mask-image: radial-gradient(122% 105% at 50% 44%, transparent 0%, transparent 39%, #000 80%);
}
@media (max-width: 600px) { .c91-hero::before { display: none; } }

/* Barre d'accès rapide (pastilles affinées + action principale) */
.c91-quickbar { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: center; }
.c91-quickbar a {
  display: inline-flex; align-items: center; padding: .6rem 1.3rem; border: 1px solid #dbe1ec;
  border-radius: 999px; background: #fff; color: #14213d; text-decoration: none;
  font-weight: 600; font-size: .93rem; letter-spacing: .005em;
  transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.c91-quickbar a:hover { border-color: #14213d; color: #14213d; background: #fbf9f5; transform: translateY(-1px); }
/* Action n°1 : bouton plein bleu nuit, accord avec le titre serif */
.c91-quickbar a.primary {
  background: #14213d; border-color: #14213d; color: #fff;
  box-shadow: 0 3px 14px rgba(20,33,61,.20);
}
.c91-quickbar a.primary:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; transform: translateY(-1px); box-shadow: 0 5px 18px rgba(29,78,216,.28); }

/* Cartes d'articles « à la une » */
.c91-card {
  background: #fff; border: 1px solid #e6e9f0; border-radius: 16px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(20,33,61,.05); height: 100%; display: flex; flex-direction: column;
  transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
}
.c91-card:hover { box-shadow: 0 16px 34px rgba(20,33,61,.13); transform: translateY(-4px); border-color: #d7deec; }

/* Image de couverture : plein cadre + zoom doux au survol */
.c91-card .wp-block-post-featured-image { margin: 0; overflow: hidden; }
.c91-card .wp-block-post-featured-image img { display: block; width: 100%; border-radius: 0; transition: transform .5s cubic-bezier(.2,.7,.3,1); }
.c91-card:hover .wp-block-post-featured-image img { transform: scale(1.06); }

/* Cartes sans photo : couverture de marque (bleu nuit + cavalier) */
.c91-card:not(:has(.wp-block-post-featured-image img))::before {
  content: "\265E"; display: flex; align-items: center; justify-content: center;
  height: 108px; font-size: 2.6rem; color: rgba(255,255,255,.9);
  background:
    radial-gradient(120% 140% at 85% 15%, rgba(29,78,216,.75), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 14px, transparent 14px 28px),
    linear-gradient(135deg, #14213d, #1b2c53);
  text-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.c91-card-body { display: flex; flex-direction: column; flex: 1; }

/* Pastille de catégorie */
.c91-card-cat { margin: 0 0 .1rem; font-size: 0; }
.c91-card-cat a {
  display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; text-decoration: none; padding: .2rem .55rem; border-radius: 999px;
  background: rgba(201,130,10,.13); color: #a2680a;
}
.c91-card-cat a:hover { background: rgba(201,130,10,.22); }

.c91-card .wp-block-post-date { color: #8a93a6; font-size: .8rem; margin-top: .45rem; }
.c91-card .wp-block-post-title { margin: .3rem 0 0; line-height: 1.2; }
.c91-card .wp-block-post-title a { color: #14213d; text-decoration: none; }
.c91-card .wp-block-post-title a:hover { color: #1d4ed8; }
.c91-card .wp-block-post-title::after { content: ""; display: block; width: 40px; height: 3px; border-radius: 3px; background: #c9820a; margin: .6rem 0 .1rem; }
.c91-card .wp-block-post-excerpt { color: #58627a; font-size: .92rem; margin-top: .55rem; }
.c91-card .wp-block-post-excerpt__more-text { font-weight: 600; color: #1d4ed8; }

/* Bandeau statistiques (« Le comité en chiffres ») */
.c91-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: #e3e8f1; border: 1px solid #e3e8f1;
  border-radius: 14px; overflow: hidden;
}
.c91-stats-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.c91-stats .tile { background: #fff; padding: .85rem .8rem; text-align: center; }
.c91-stats .num {
  display: block; font-family: var(--wp--preset--font-family--serif);
  font-size: 1.55rem; font-weight: 700; line-height: 1; color: #14213d;
  font-variant-numeric: tabular-nums;
}
.c91-stats .lbl {
  display: block; margin-top: .35rem; font-size: .66rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: #58627a;
}
.c91-stats .sub { display: block; margin-top: .25rem; font-size: .72rem; font-weight: 600; color: #c9820a; }

/* ==========================================================================
   Page Tournois — « L'élégance du jeu »
   Fond décoratif : contour du département de l'Essonne, très discret
   (SVG auto-hébergé dans le thème, aucune requête externe).
   ========================================================================== */

/* Filigrane « carte de l'Essonne » : silhouette réelle du 91, faible opacité,
   ancrée en haut à droite, débordant légèrement, adoucie par un masque. */
.c91-tournois-page { position: relative; isolation: isolate; }
.c91-tournois-page::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: -0.5rem; right: -3%;
  width: min(560px, 66vw); aspect-ratio: 100 / 110.61;
  background: url('assets/essonne-carte.svg') no-repeat center / contain;
  opacity: .07;
  -webkit-mask-image: radial-gradient(120% 120% at 72% 22%, #000 30%, transparent 78%);
          mask-image: radial-gradient(120% 120% at 72% 22%, #000 30%, transparent 78%);
}
@media (max-width: 600px) {
  .c91-tournois-page::before { top: -1rem; right: -14%; width: 78vw; opacity: .05; }
}

/* En-tête de page : surtitre à filet, titre serif, chapô mesuré */
.c91-tournois-head { max-width: 46rem; margin: 0 0 1.9rem; }
.c91-tournois-eyebrow {
  display: flex; align-items: center; gap: .7rem;
  margin: 0 0 .55rem; color: #a2680a;
  font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
}
.c91-tournois-eyebrow::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px;
  background: linear-gradient(to right, #c9820a, rgba(201,130,10,.25));
}
.c91-tournois-titre { margin: 0 0 .5rem; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
.c91-tournois-chapo { margin: 0; color: #58627a; font-size: 1.05rem; line-height: 1.6; }

/* Barre de filtres — panneau de contrôle (carte surface, filet, ombre douce) */
.c91-tournois-filtres {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1.1rem 1.6rem;
  margin: 0 0 1.9rem; padding: 1.25rem 1.4rem;
  background: #fff; border: 1px solid #e3e8f1; border-radius: 16px;
  box-shadow: 0 1px 2px rgba(20,33,61,.05), 0 10px 30px rgba(20,33,61,.05);
}
.c91-horizon { display: inline-flex; flex-wrap: wrap; gap: .4rem; }
.c91-horizon button { padding: .5rem 1rem; border: 1px solid #cdd6e6; background: #fff; color: #14213d; border-radius: 999px; font-weight: 600; font-size: .9rem; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.c91-horizon button:hover { border-color: #1d4ed8; color: #1d4ed8; }
.c91-horizon button.is-active { background: #14213d; border-color: #14213d; color: #fff; }
.c91-horizon button:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 2px; }
.c91-selects { display: flex; flex-wrap: wrap; gap: 1rem; }
.c91-selects label { display: flex; flex-direction: column; gap: .3rem; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #58627a; }
.c91-selects select { padding: .55rem .7rem; border: 1px solid #cdd6e6; border-radius: 10px; font-size: 1rem; background: #fff; color: #14213d; min-width: 11rem; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.c91-selects select:hover { border-color: #b7c2d6; }
.c91-selects select:focus-visible { outline: none; border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(29,78,216,.14); }
.c91-search { display: flex; flex-direction: column; gap: .3rem; flex: 1 1 17rem; min-width: 14rem; }
.c91-search label { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #58627a; }
.c91-search input { padding: .62rem .8rem .62rem 2.2rem; border: 1px solid #cdd6e6; border-radius: 999px; font-size: 1rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2358627a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat .75rem center / 1.05rem; color: #14213d; transition: border-color .15s, box-shadow .15s; }
.c91-search input:focus { outline: none; border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(29,78,216,.14); }
.c91-reset { align-self: flex-end; padding: .55rem .9rem; border: 1px solid transparent; background: none; color: #58627a; font-weight: 600; font-size: .85rem; cursor: pointer; border-radius: 999px; }
.c91-reset:hover { color: #1d4ed8; text-decoration: underline; }
.c91-reset:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 2px; }

/* Disposition : agenda (gauche) + carte collante (droite) */
.c91-tournois-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.75rem; align-items: start; }
.c91-tournois-map { height: 62vh; min-height: 400px; border-radius: 16px; overflow: hidden; border: 1px solid #e3e8f1; box-shadow: 0 10px 30px rgba(20,33,61,.07); position: sticky; top: 1rem; }
.c91-agenda-note { margin: 1.6rem 0 0; padding: .95rem 1.15rem; background: #fbf7ef; border: 1px solid #efe2c8; border-left: 4px solid #c9820a; border-radius: 12px; color: #58627a; font-size: .9rem; line-height: 1.55; }
.c91-agenda-note strong { color: #14213d; }

/* En-tête de mois : notation « livre d'échecs » avec filet fin */
.c91-agenda-mois { display: flex; align-items: baseline; gap: .8rem; font-size: 1.15rem; margin: 1.9rem 0 .8rem; text-transform: capitalize; color: #14213d; }
.c91-agenda-mois:first-child { margin-top: .25rem; }
.c91-agenda-mois::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to right, #e3e8f1, transparent); }
.c91-agenda-group { display: flex; flex-direction: column; gap: .7rem; }

/* Carte tournoi : ligne élégante, pastille calendrier bleu nuit, survol léger */
.c91-t { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: .9rem 1.05rem; border: 1px solid #e6e9f0; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(20,33,61,.04); transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.c91-t:hover { box-shadow: 0 12px 28px rgba(20,33,61,.1); transform: translateY(-2px); border-color: #d7deec; }
.c91-t-date { text-align: center; min-width: 3.6rem; padding: .45rem .5rem; background: linear-gradient(160deg, #1b2b4d, #14213d); border-radius: 11px; line-height: 1; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.c91-t-date .d { display: block; font-family: var(--wp--preset--font-family--serif); font-size: 1.5rem; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.c91-t-date .m { display: block; font-size: .6rem; font-weight: 700; letter-spacing: .06em; color: #f4b451; margin-top: .22rem; }
.c91-t-main h4 { margin: 0 0 .22rem; font-size: 1.08rem; line-height: 1.25; }
.c91-t-main h4 a { color: #14213d; text-decoration: none; }
.c91-t-main h4 a:hover { color: #1d4ed8; }
.c91-t-lieu { display: block; color: #58627a; font-size: .88rem; }
.c91-t-lieu::before { content: "\1F4CD"; margin-right: .3rem; font-size: .82em; opacity: .7; }
.c91-t-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem; }
.c91-t-tags span { display: inline-block; font-size: .7rem; font-weight: 700; padding: .16rem .5rem; border-radius: 999px; background: rgba(29,78,216,.09); color: #1d4ed8; }
.c91-t-insc { white-space: nowrap; font-weight: 700; font-size: .85rem; color: #1d4ed8; text-decoration: none; padding: .4rem .85rem; border: 1px solid #cdd9f5; border-radius: 999px; transition: background .15s, border-color .15s, color .15s; }
.c91-t-insc:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; text-decoration: none; }
.c91-t-essonne { display: inline-block; vertical-align: middle; margin-left: .5rem; font-size: .62rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: .12rem .45rem; border-radius: 999px; background: #c9820a; color: #fff; }
.c91-t.is-essonne { border-color: #ecd6ac; box-shadow: inset 3px 0 0 #c9820a, 0 1px 2px rgba(20,33,61,.04); }
.c91-t.is-essonne:hover { box-shadow: inset 3px 0 0 #c9820a, 0 12px 28px rgba(20,33,61,.1); }
.c91-agenda-empty { color: #58627a; padding: 1.75rem 1rem; background: #fff; border: 1px dashed #d7deec; border-radius: 14px; text-align: center; }

@media (max-width: 820px) {
  .c91-tournois-layout { grid-template-columns: 1fr; }
  .c91-tournois-map { position: static; height: 340px; min-height: 0; order: -1; }
  .c91-t { grid-template-columns: auto 1fr; }
  .c91-t-insc { grid-column: 2; justify-self: start; margin-top: .3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .c91-t, .c91-horizon button, .c91-search input, .c91-selects select, .c91-t-insc { transition: none; }
  .c91-t:hover { transform: none; }
}
