/*
 * Thème RN 64 — styles complémentaires.
 * theme.json porte les couleurs, la typographie et les espacements.
 * Ce fichier ne traite que ce que theme.json ne sait pas exprimer :
 * survols, composants d'agenda, cartes d'actualité.
 */

/* ---------- navigation ---------- */
.rn-barre-principale .wp-block-navigation-item__content{
	padding-bottom:.35em;
	border-bottom:3px solid transparent;
	text-decoration:none;
	transition:border-color .18s ease, color .18s ease;
}
.rn-barre-principale .wp-block-navigation-item__content:hover{
	border-bottom-color:var(--wp--preset--color--rouge);
	color:var(--wp--preset--color--bleu);
}
.rn-barre-principale .current-menu-item > .wp-block-navigation-item__content{
	border-bottom-color:var(--wp--preset--color--bleu);
}
.wp-block-navigation__submenu-container{
	border:0 !important;
	border-top:3px solid var(--wp--preset--color--rouge) !important;
	border-radius:0 0 6px 6px;
	box-shadow:0 14px 30px -16px rgba(9,19,52,.55);
}

/* ---------- boutons ---------- */
.wp-element-button,
.wp-block-button__link{
	transition:background-color .18s ease, transform .18s ease;
	box-shadow:0 1px 2px rgba(16,24,40,.14);
}
.wp-element-button:hover,
.wp-block-button__link:hover{ transform:translateY(-1px); }

/* ---------- en-tetes de section ---------- */
.rn-tete-section{ margin-bottom:1.5rem; }
.rn-tete-section h2{ position:relative; padding-left:.9rem; }
.rn-tete-section h2::before{
	content:"";
	position:absolute; left:0; top:.15em; bottom:.15em;
	width:4px; border-radius:2px;
	background:var(--wp--preset--color--rouge);
}
.rn-tete-section a{ text-decoration:none; color:var(--wp--preset--color--bleu); }
.rn-tete-section a:hover{ color:var(--wp--preset--color--rouge); }

/* ---------- cartes d'actualite ---------- */
.rn-carte{ overflow:hidden; transition:box-shadow .2s ease, border-color .2s ease; }
.rn-carte:hover{
	box-shadow:0 10px 26px -14px rgba(16,24,40,.4);
	border-color:var(--wp--preset--color--bleu-pale) !important;
}
.rn-carte .wp-block-post-title a{ text-decoration:none; color:var(--wp--preset--color--bleu-nuit); }
.rn-carte .wp-block-post-title a:hover{ color:var(--wp--preset--color--bleu); }
.rn-carte-image img{ width:100%; height:100%; object-fit:cover; transition:transform .4s ease; }
.rn-carte:hover .rn-carte-image img{ transform:scale(1.03); }
.rn-carte .wp-block-post-excerpt__more-link{
	display:inline-block; margin-top:.5rem;
	font-weight:700; font-size:.84rem;
	color:var(--wp--preset--color--bleu); text-decoration:none;
}

/* ---------- article a la une ---------- */
.rn-une-cols{ overflow:hidden; }
.rn-une-image img{ width:100%; height:100%; object-fit:cover; }
.rn-une-cols .wp-block-post-title a{ text-decoration:none; color:var(--wp--preset--color--bleu-nuit); }
.rn-une-cols .wp-block-post-title a:hover{ color:var(--wp--preset--color--bleu); }

/* ---------- etiquettes de categorie ---------- */
.rn-etiquette-rouge a,
.rn-banniere .wp-block-post-terms a{
	display:inline-block;
	background:var(--wp--preset--color--rouge);
	color:#fff; text-decoration:none;
	font-weight:700; text-transform:uppercase; letter-spacing:.06em;
	padding:.32rem .7rem; border-radius:3px;
}
.rn-etiquette-rouge a:hover,
.rn-banniere .wp-block-post-terms a:hover{ background:var(--wp--preset--color--rouge-action); color:#fff; }

/* ---------- chiffres cles ---------- */
.rn-chiffre{
	font-size:2.1rem; font-weight:800; line-height:1.05;
	color:var(--wp--preset--color--bleu);
	letter-spacing:-.03em; font-variant-numeric:tabular-nums;
	margin-bottom:.15rem;
}

/* ---------- agenda ---------- */
.rn-agenda .rn-evt + .rn-evt{ border-top:1px solid var(--wp--preset--color--bord); }
.rn-evt{ transition:background-color .18s ease; }
.rn-evt:hover{ background:#f1f8fe; }
.rn-evt-date{
	flex:0 0 auto; min-width:64px; text-align:center;
	background:var(--wp--preset--color--bleu-pale);
	border-radius:6px; padding:.5rem .4rem;
}
.rn-evt-jour{
	font-size:1.35rem; font-weight:800; line-height:1;
	color:var(--wp--preset--color--bleu);
	font-variant-numeric:tabular-nums; margin:0;
}
.rn-evt-mois{
	font-size:.7rem; font-weight:700; text-transform:uppercase;
	letter-spacing:.06em; color:var(--wp--preset--color--bleu); margin:.1rem 0 0;
}
.rn-evt-corps{ flex:1 1 260px; }
.rn-evt-titre{ font-weight:700; margin:0; color:var(--wp--preset--color--bleu-nuit); }
.rn-evt-tag{
	margin:0; flex:0 0 auto;
	font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em;
	color:var(--wp--preset--color--bleu);
	background:#f1f8fe; border:1px solid var(--wp--preset--color--bleu-pale);
	padding:.3rem .65rem; border-radius:3px;
}

/* ---------- corps d'article ---------- */
.rn-chapo{
	font-weight:500;
	color:var(--wp--preset--color--bleu-nuit);
	border-left:4px solid var(--wp--preset--color--rouge);
	padding-left:1.1rem;
}
.rn-signature{
	font-weight:700;
	color:var(--wp--preset--color--bleu);
	border-top:1px solid var(--wp--preset--color--bord);
	padding-top:1rem; margin-top:2rem;
}
.wp-block-post-content a{ text-underline-offset:.15em; }

/* ---------- pied de page ---------- */
.liste-pied{ list-style:none; padding-left:0; }
.liste-pied li{ margin-bottom:.5rem; }
.liste-pied a{ text-decoration:none; color:inherit; }
.liste-pied a:hover{ color:#fff; }

/* ---------- pagination ---------- */
.wp-block-query-pagination a{ text-decoration:none; font-weight:700; }
.wp-block-query-pagination .page-numbers{
	padding:.35rem .7rem; border-radius:6px;
	border:1px solid var(--wp--preset--color--bord); background:#fff;
}
.wp-block-query-pagination .page-numbers.current{
	background:var(--wp--preset--color--bleu); color:#fff;
	border-color:var(--wp--preset--color--bleu);
}

/* ---------- accessibilite ---------- */
:where(a, button, input, select, textarea):focus-visible{
	outline:3px solid var(--wp--preset--color--bleu-vif);
	outline-offset:2px;
}
@media (prefers-reduced-motion: reduce){
	*{ animation-duration:.01ms !important; transition-duration:.01ms !important; }
	.wp-element-button:hover,
	.rn-carte:hover .rn-carte-image img{ transform:none !important; }
}

/* ---------- petits ecrans ---------- */
@media (max-width: 781px){
	.rn-une-cols{ flex-wrap:wrap; }
	.rn-chiffres .wp-block-columns{ flex-wrap:wrap !important; gap:1.2rem; }
	.rn-chiffres .wp-block-column{ flex-basis:45% !important; }
	.rn-evt-tag{ margin-left:auto; }
}

/* ================= fiches de membres (Bureau, Élus) ================= */
.rn-membres,.rn-circos,.rn-cantons,.rn-communes{ margin-top:1.2rem; }
.rn-membre{ overflow:hidden; transition:box-shadow .2s ease, border-color .2s ease; }
.rn-membre:hover{
	box-shadow:0 10px 26px -14px rgba(16,24,40,.35);
	border-color:var(--wp--preset--color--bleu-pale) !important;
}
.rn-portrait{ margin:0 !important; }
.rn-portrait img{ width:100%; aspect-ratio:1; object-fit:cover; object-position:center 18%; display:block; }
.rn-portrait-vide{
	position:relative; aspect-ratio:1; display:grid; place-items:center;
	background:linear-gradient(145deg,var(--wp--preset--color--bleu-fonce),var(--wp--preset--color--bleu));
}
.rn-initiales{ font-size:2.2rem; font-weight:800; color:rgba(255,255,255,.34); margin:0; }
.rn-photo-manquante{
	position:absolute; left:0; right:0; bottom:0;
	background:var(--wp--preset--color--rouge-action); color:#fff;
	font-size:.62rem; font-weight:700; text-transform:uppercase; letter-spacing:.08em;
	padding:.32rem; text-align:center;
}
.rn-membre-nom{ font-weight:800; font-size:.99rem; color:var(--wp--preset--color--bleu-nuit); margin:0; }
.rn-membre-role{ color:var(--wp--preset--color--gris); line-height:1.45; margin:0; }
.rn-membre-role strong{ color:var(--wp--preset--color--bleu); }
.rn-membre-vacant{ background:var(--wp--preset--color--gris-clair) !important; border-style:dashed !important; }
.rn-membre-vacant .rn-portrait-vide{ background:none; }
.rn-membre-vacant .rn-initiales{ color:#c9ced8; font-size:1.9rem; }
.rn-etiq-vacant{
	font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:.09em;
	color:var(--wp--preset--color--rouge-action); margin:0;
}

/* ================= circonscriptions ================= */
.rn-circo{
	background:#fff; border:1px solid var(--wp--preset--color--bord);
	border-left:4px solid var(--wp--preset--color--bleu);
	border-radius:6px; padding:.9rem 1rem;
}
.rn-circo-libre{ border-left-color:var(--wp--preset--color--bord); background:var(--wp--preset--color--gris-clair); }
.rn-circo-num{
	font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em;
	color:var(--wp--preset--color--gris); margin:0;
}
.rn-circo-qui{ font-weight:800; font-size:.97rem; margin:.3rem 0 0; color:var(--wp--preset--color--bleu-nuit); }
.rn-circo-libre .rn-circo-qui{ color:#9aa3b2; font-weight:600; }

/* ================= cantons ================= */
.rn-canton{
	display:flex; align-items:baseline; gap:.6rem; margin:0;
	padding:.55rem .75rem; background:#fff;
	border:1px solid var(--wp--preset--color--bord); border-radius:6px; font-size:.85rem;
}
.rn-canton-no{ font-weight:800; font-size:.74rem; color:var(--wp--preset--color--bleu); min-width:1.5rem; font-variant-numeric:tabular-nums; }
.rn-canton-lieu{ flex:1; line-height:1.3; }
.rn-canton-qui{ font-weight:700; font-size:.76rem; color:var(--wp--preset--color--bleu-nuit); }
.rn-canton-libre{ background:var(--wp--preset--color--gris-clair); color:var(--wp--preset--color--gris); }
.rn-canton-libre .rn-canton-no{ color:#9aa3b2; }

/* ================= communes (page Élus) ================= */
.rn-commune{ overflow:hidden; }
.rn-commune-haut{
	display:flex; align-items:baseline; gap:.6rem; margin:0;
	background:var(--wp--preset--color--bleu); color:#fff; padding:.9rem 1.1rem;
}
.rn-commune-nom{ font-size:1.1rem; font-weight:800; }
.rn-commune-pct{ margin-left:auto; font-weight:800; font-variant-numeric:tabular-nums; }
.rn-sieges{ display:flex; gap:.6rem; flex-wrap:wrap; margin:0; }
.rn-siege{
	flex:1; min-width:104px; text-align:center;
	background:#f1f8fe; border:1px solid var(--wp--preset--color--bleu-pale);
	border-radius:6px; padding:.6rem .7rem;
	font-size:.7rem; color:var(--wp--preset--color--gris); font-weight:600; line-height:1.25;
}
.rn-siege b{
	display:block; font-size:1.45rem; font-weight:800;
	color:var(--wp--preset--color--bleu); line-height:1.1; font-variant-numeric:tabular-nums;
}
.rn-siege-zero{ background:var(--wp--preset--color--gris-clair); border-color:var(--wp--preset--color--bord); }
.rn-siege-zero b{ color:#9aa3b2; }

/* ================= signalement de conversion ================= */
.rn-a-refaire{
	background:#fff4f4; border-left:4px solid var(--wp--preset--color--rouge-action);
	padding:.9rem 1.1rem; font-weight:700; color:var(--wp--preset--color--rouge-action);
}

/* ================= formulaire de contact ================= */
.rn-contact{ max-width:760px; }
.rn-contact-succes,.rn-contact-alerte{
	padding:1rem 1.2rem; border-radius:6px; margin-bottom:1.5rem; font-weight:600;
}
.rn-contact-succes{ background:#eaf7ee; border:1px solid #b7e1c3; color:#14532d; }
.rn-contact-alerte{ background:#fff4f4; border:1px solid #f3c1c1; color:var(--wp--preset--color--rouge-action); }
.rn-contact-form .rn-champ{ margin:0 0 1.1rem; }
.rn-contact-form label{ display:block; font-weight:600; font-size:.92rem; margin-bottom:.35rem; color:var(--wp--preset--color--bleu-nuit); }
.rn-contact-form input[type="text"],
.rn-contact-form input[type="tel"],
.rn-contact-form input[type="email"],
.rn-contact-form select,
.rn-contact-form textarea{
	width:100%; box-sizing:border-box; font:inherit;
	padding:.7rem .9rem; background:#fff;
	border:1px solid var(--wp--preset--color--bord); border-radius:6px;
	transition:border-color .18s ease, box-shadow .18s ease;
}
.rn-contact-form input:focus,
.rn-contact-form select:focus,
.rn-contact-form textarea:focus{
	outline:none; border-color:var(--wp--preset--color--bleu-vif);
	box-shadow:0 0 0 3px var(--wp--preset--color--bleu-pale);
}
.rn-champ-erreur input,.rn-champ-erreur select,.rn-champ-erreur textarea{ border-color:var(--wp--preset--color--rouge-action); }
.rn-champ-erreur > label{ color:var(--wp--preset--color--rouge-action); }
.rn-deux-colonnes{ display:grid; grid-template-columns:1fr 1fr; gap:0 1.2rem; }
@media (max-width:600px){ .rn-deux-colonnes{ grid-template-columns:1fr; } }
.rn-cases{ border:1px solid var(--wp--preset--color--bord); border-radius:6px; padding:1rem 1.2rem 1.1rem; }
.rn-cases legend{ font-weight:700; font-size:.92rem; padding:0 .4rem; color:var(--wp--preset--color--bleu-nuit); }
.rn-cases label,.rn-consentement label{ display:flex; gap:.6rem; align-items:flex-start; font-weight:500; margin:.35rem 0; }
.rn-cases input,.rn-consentement input{ margin-top:.25rem; flex:none; accent-color:var(--wp--preset--color--bleu); }
.rn-consentement label{ font-size:.88rem; color:var(--wp--preset--color--gris); }
.rn-consentement.rn-champ-erreur label{ color:var(--wp--preset--color--rouge-action); }
.rn-envoi{ display:flex; align-items:center; gap:1rem; flex-wrap:wrap; margin-top:1.4rem; }
.rn-obligatoire{ font-size:.8rem; color:var(--wp--preset--color--gris); }
.rn-piege{ position:absolute !important; left:-10000px; width:1px; height:1px; overflow:hidden; }

/* ================= corrections issues du tour visuel du 16/09 ================= */

/* WordPress impose padding:1.25em 2.375em a tout groupe avec fond : nos cartes n'en veulent pas */
.rn-carte.has-background,
.rn-membre.has-background,
.rn-commune.has-background,
.rn-agenda.has-background,
.rn-une-cols.has-background,
.rn-hero-slide.has-background{ padding:0 !important; }

/* cartes de meme hauteur, lien "lire la suite" cale en bas */
.rn-grille > .rn-carte{ height:100%; display:flex; flex-direction:column; }
.rn-carte > .wp-block-group{ flex:1; display:flex; flex-direction:column; }
.rn-carte .wp-block-post-excerpt{ display:flex; flex-direction:column; flex:1; }
.rn-carte .wp-block-post-excerpt__more-text{ margin-top:auto; }

/* navigation principale : pas de soulignement, survol par filet rouge */
.wp-block-navigation a:where(:not(.wp-element-button)),
.wp-block-navigation a:where(:not(.wp-element-button)):hover{ text-decoration:none; }
.rn-barre-principale .wp-block-navigation-item__content{
	display:inline-block; padding:.2rem 0 .35rem; line-height:1.3;
	border-bottom:3px solid transparent; color:var(--wp--preset--color--bleu-nuit);
	transition:border-color .18s ease, color .18s ease;
}
.rn-barre-principale .wp-block-navigation-item:hover > .wp-block-navigation-item__content,
.rn-barre-principale .wp-block-navigation-item__content:focus-visible{
	color:var(--wp--preset--color--bleu); border-bottom-color:var(--wp--preset--color--rouge);
}
.rn-barre-principale .current-menu-item > .wp-block-navigation-item__content{ border-bottom-color:var(--wp--preset--color--bleu); }
.rn-barre-principale .wp-block-navigation__submenu-icon{ margin-left:.25rem; }
.wp-block-navigation__submenu-container .wp-block-navigation-item__content{
	border-bottom:0 !important; color:#fff !important; padding:.45rem .9rem !important;
}
.wp-block-navigation__submenu-container .wp-block-navigation-item:hover > .wp-block-navigation-item__content{ background:rgba(255,255,255,.12); }

/* barre haute : menu secondaire discret, blanc au survol */
.rn-barre-haute-droite{ margin-left:auto; }
.rn-menu-secondaire .wp-block-navigation-item__content{ color:var(--wp--preset--color--bleu-pale); font-weight:600; transition:color .18s ease; }
.rn-menu-secondaire .wp-block-navigation-item__content:hover{ color:#fff; }
@media (max-width:781px){ .rn-menu-secondaire{ display:none; } }

/* separateurs pleine largeur et discrets */
.wp-block-separator:not(.is-style-dots){ width:100%; max-width:none; border:0; height:1px; background:var(--wp--preset--color--bord); opacity:1; }

/* pied : titre du site sans soulignement */
.wp-block-site-title a{ text-decoration:none; }
.wp-block-site-title a:hover{ color:#fff; }

/* respiration plus juste autour du bloc soutien */
.rn-soutien{ margin-top:2.5rem !important; }
footer.wp-block-group{ margin-top:0 !important; }

/* partage natif en fin d'article */
.rn-partage{ display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; margin-top:2rem; }
.rn-partage span{ font-weight:700; font-size:.85rem; color:var(--wp--preset--color--gris); margin-right:.3rem; }
.rn-partage a{
	display:inline-flex; align-items:center; gap:.45rem; text-decoration:none;
	font-size:.82rem; font-weight:700; padding:.5rem .85rem; border-radius:6px;
	background:#fff; border:1px solid var(--wp--preset--color--bord); color:var(--wp--preset--color--bleu-nuit);
	transition:border-color .18s ease, color .18s ease, background .18s ease;
}
.rn-partage a:hover{ border-color:var(--wp--preset--color--bleu); color:var(--wp--preset--color--bleu); background:var(--wp--preset--color--bleu-pale); }
.rn-partage svg{ width:15px; height:15px; fill:currentColor; }

/* ================= hero carrousel ================= */
.rn-hero-slides{ list-style:none; margin:0; padding:0; position:relative; }
.rn-hero-slides > li{ margin:0; }
.rn-hero-pret .rn-hero-slides > li{ display:none; }
.rn-hero-pret .rn-hero-slides > li.est-active{ display:block; animation:rn-fondu .45s ease; }
@keyframes rn-fondu{ from{ opacity:0; transform:translateY(6px);} to{ opacity:1; transform:none;} }
.rn-hero-slide{ display:flex; gap:2.6rem; align-items:center; }
.rn-hero-texte{ flex:1 1 440px; min-width:0; }
.rn-hero-image{ flex:1 1 380px; max-width:520px; margin:0 !important; }
.rn-hero-image img{ width:100%; height:100%; object-fit:cover; border-radius:6px; display:block; }
.rn-hero-titre a{ color:var(--wp--preset--color--bleu-nuit); text-decoration:none; }
.rn-hero-titre a:hover{ color:var(--wp--preset--color--bleu); }
.rn-hero-extrait{ color:var(--wp--preset--color--gris); max-width:56ch; }
.rn-hero-extrait .wp-block-post-excerpt__more-text{ display:none; }
.rn-hero-bouton{ text-decoration:none !important; }
.rn-hero-ctrl{ display:flex; align-items:center; gap:1rem; margin-top:1.6rem; }
.rn-hero-fleche{
	width:40px; height:40px; border-radius:6px; border:1px solid var(--wp--preset--color--bord);
	background:#fff; color:var(--wp--preset--color--bleu-nuit); cursor:pointer; display:grid; place-items:center;
	transition:border-color .18s ease, color .18s ease, background .18s ease;
}
.rn-hero-fleche svg{ width:20px; height:20px; }
.rn-hero-fleche:hover{ border-color:var(--wp--preset--color--bleu); color:var(--wp--preset--color--bleu); background:var(--wp--preset--color--bleu-pale); }
.rn-hero-points{ display:flex; gap:.5rem; }
.rn-hero-point{
	width:10px; height:10px; border-radius:50%; border:0; padding:0; cursor:pointer;
	background:var(--wp--preset--color--bord); transition:background .18s ease, transform .18s ease;
}
.rn-hero-point.est-actif{ background:var(--wp--preset--color--rouge); transform:scale(1.25); }
.rn-hero-point:hover{ background:var(--wp--preset--color--bleu); }
@media (max-width:900px){
	.rn-hero-slide{ flex-direction:column-reverse; align-items:stretch; gap:1.4rem; }
	.rn-hero-image{ max-width:none; }
	.rn-hero-titre{ font-size:1.7rem !important; }
}
@media (prefers-reduced-motion:reduce){ .rn-hero-pret .rn-hero-slides > li.est-active{ animation:none; } }
