/* Révélation : compléments au theme.json */

:root {
	--rv-bleu: #0E2A55;
	--rv-rouge: #C1272D;
	--rv-nuit: #0A1F40;
	--rv-gris-clair: #F3F5F9;
	--rv-trait: #D5DCE8;
}

body { -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.rv-main { margin-block-start: 0; }
.rv-main > .wp-block-post-content:not(.rv-contenu) > * + * { margin-block-start: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
	outline: 3px solid var(--rv-rouge);
	outline-offset: 2px;
}

/* Bandeau bleu-blanc-rouge */
.rv-drapeau {
	height: 6px;
	margin: 0 !important;
	background: linear-gradient(90deg, var(--rv-bleu) 0 33.333%, #fff 33.333% 66.666%, var(--rv-rouge) 66.666%);
	border-bottom: 1px solid #E3E7EF;
}

/* En-tête */
.rv-entete { border-bottom: 1px solid #E3E7EF; padding-top: 18px; padding-bottom: 18px; background: #fff; }
.rv-entete__barre { gap: 16px 32px; }
.rv-marque { gap: 0; }
.rv-marque__nom { margin: 0 !important; line-height: 1; font-family: var(--wp--preset--font-family--titres); font-size: 30px; }
.rv-marque__nom a { text-decoration: none; color: var(--rv-bleu); display: block; }
.rv-logo { display: block; height: auto; }
.rv-marque .rv-logo--complet { width: 230px; margin: -9px; }
.rv-marque .rv-logo--court { display: none; width: 170px; margin: -7px; }
.rv-marque__sous-titre { margin: 4px 0 0 !important; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #4A5875; }
.rv-entete .wp-block-navigation a { text-decoration: none; }
.rv-entete .wp-block-navigation a:hover { color: var(--rv-rouge); }
.rv-entete .wp-block-navigation .current-menu-item > a { color: var(--rv-rouge); }
.rv-entete__action .wp-block-button__link { padding: 12px 18px; font-size: 15px; }
@media (max-width: 781px) {
	.rv-entete__action { display: none !important; }
}

/* En-tête fixe : reste visible au défilement, et se resserre un peu. */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 100; background: #fff; }
@media (min-width: 601px) {
	.admin-bar .wp-site-blocks > header.wp-block-template-part { top: var(--wp-admin--admin-bar--height, 32px); }
}
html { scroll-padding-top: 120px; }
.rv-entete { transition: padding .2s ease, box-shadow .2s ease; }
.rv-compact .rv-entete { padding-top: 8px; padding-bottom: 8px; box-shadow: 0 4px 16px rgba(14, 42, 85, .1); }
.rv-compact .rv-marque .rv-logo--complet { display: none; }
.rv-compact .rv-marque .rv-logo--court { display: block; }
@media (max-width: 600px) {
	.rv-marque .rv-logo--complet { width: 180px; margin: -7px; }
	.rv-marque .rv-logo--court { width: 140px; margin: -6px; }
}
@media (prefers-reduced-motion: reduce) {
	.rv-entete { transition: none; }
}

/* Boutons */
.wp-block-button__link { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.wp-block-button.is-style-rv-blanc .wp-block-button__link { background: #fff; color: var(--rv-bleu); }
.wp-block-button.is-style-rv-blanc .wp-block-button__link:hover { background: var(--rv-gris-clair); color: var(--rv-rouge); }
.wp-block-button.is-style-rv-bleu .wp-block-button__link { background: #2A5CB8; color: #fff; }
.wp-block-button.is-style-rv-bleu .wp-block-button__link:hover { background: var(--rv-bleu); }
.wp-block-button.is-style-rv-contour .wp-block-button__link { background: transparent; color: var(--rv-bleu); border: 1px solid var(--rv-bleu); }
.wp-block-button.is-style-rv-contour .wp-block-button__link:hover { background: var(--rv-bleu); color: #fff; }

/* Sections */
.rv-section { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--60); }
.rv-section--gris { background: var(--rv-gris-clair); }
.rv-section--bleu { background: var(--rv-bleu); color: #fff; }
.rv-section--bleu :where(h1, h2, h3, a:not(.wp-block-button__link)) { color: #fff; }
.rv-section--bleu p { color: #E4E9F3; }
.rv-section--bleu .is-style-rv-surtitre { color: #C9D3E6; }
.rv-section--serre { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--50); }
.rv-section > .wp-block-columns { gap: 32px 64px; }

.is-style-rv-surtitre {
	font-size: 13px !important;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--rv-rouge);
	margin-bottom: 8px !important;
}
.is-style-rv-citation {
	font-family: var(--wp--preset--font-family--titres);
	font-size: clamp(22px, 2.6vw, 28px) !important;
	line-height: 1.35;
	color: var(--rv-bleu);
	border-left: 4px solid var(--rv-rouge);
	padding-left: 24px;
}
.rv-section--bleu .is-style-rv-citation { color: #fff; }
.rv-signature { font-family: var(--wp--preset--font-family--titres); font-size: 28px; color: var(--rv-bleu); }

/* Accueil : visuel principal */
.rv-hero { background: var(--rv-bleu); color: #fff; padding-bottom: var(--wp--preset--spacing--60); }
.rv-hero .wp-block-image { margin: 0 !important; }
.rv-hero .wp-block-image img { display: block; width: 100%; height: auto; }
.rv-hero > .rv-hero__texte { padding-top: var(--wp--preset--spacing--50); }
.rv-hero__texte > * { max-width: none !important; margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)) !important; margin-right: 0 !important; }
.rv-hero h1 { color: #fff; font-size: clamp(34px, 4.6vw, 58px); width: min(100%, 17em); }
.rv-hero p { color: #E4E9F3; font-size: clamp(18px, 1.6vw, 21px); width: min(100%, 40em); }
.rv-hero .is-style-rv-surtitre { color: #C9D3E6; }

/* Bandeau défilant */
.rv-defile { background: var(--rv-rouge); color: #fff; overflow: hidden; padding: 14px 0 !important; margin-top: 0 !important; margin-bottom: 0 !important; }
.rv-defile p { margin: 0; white-space: nowrap; font-weight: 600; letter-spacing: .04em; color: #fff; }
.rv-defile.is-anime p { display: inline-block; animation: rv-defile 38s linear infinite; padding-right: 2em; }
.rv-defile:hover p { animation-play-state: paused; }
@keyframes rv-defile { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.rv-defile.is-anime p { animation: none; white-space: normal; }
}

/* Cartes */
.is-style-rv-carte, .is-style-rv-carte-trait { background: #fff; padding: 28px; height: 100%; box-sizing: border-box; }
.rv-section:not(.rv-section--gris):not(.rv-section--bleu) :is(.is-style-rv-carte, .is-style-rv-carte-trait) { background: var(--rv-gris-clair); }
.rv-section--bleu :is(.is-style-rv-carte, .is-style-rv-carte-trait) { background: rgba(255, 255, 255, .08); }
.is-style-rv-carte-trait { border-top: 4px solid var(--rv-rouge); }
/* Plusieurs cartes empilées dans une même colonne : chacune garde sa hauteur naturelle, sinon elles débordent sur la suite de la page. */
.wp-block-column > :is(.is-style-rv-carte, .is-style-rv-carte-trait):not(:only-child) { height: auto; }
.wp-block-column > :is(.is-style-rv-carte, .is-style-rv-carte-trait) + :is(.is-style-rv-carte, .is-style-rv-carte-trait) { margin-top: 20px; }
.is-style-rv-carte > *, .is-style-rv-carte-trait > * { margin-top: 0; }
.is-style-rv-carte > * + *, .is-style-rv-carte-trait > * + * { margin-top: 10px; }
.rv-numero { font-family: var(--wp--preset--font-family--titres); font-size: 44px !important; line-height: 1; color: var(--rv-rouge); margin-bottom: 4px !important; }
.rv-grille { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.rv-grille > * { margin: 0 !important; }
.rv-grille--5 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.rv-grille--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }

/* Frise chronologique */
.rv-frise > .wp-block-columns { border-top: 1px solid var(--rv-trait); padding: 22px 0; margin: 0 !important; gap: 8px 40px; }
.rv-frise > .wp-block-columns:last-child { border-bottom: 1px solid var(--rv-trait); }
.rv-frise .rv-frise__annee { font-family: var(--wp--preset--font-family--titres); font-size: 26px; color: var(--rv-rouge); margin: 0; }
.rv-frise h3 { margin: 0 0 4px; }
.rv-frise p { margin: 0; color: #33415C; }

/* Bandeau de titre des pages */
.rv-bandeau-titre { background: var(--rv-bleu); color: #fff; padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--50); }
.rv-bandeau-titre :where(h1, .wp-block-post-title, .wp-block-query-title) { color: #fff; margin: 0; }
.rv-bandeau-titre .wp-block-post-date, .rv-bandeau-titre .wp-block-post-terms, .rv-bandeau-titre .wp-block-post-terms a { color: #C9D3E6; }
.rv-bandeau-titre .wp-block-post-terms { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; }
.rv-article, .rv-contenu { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--60); }

/* Listes d'articles */
.rv-liste-articles .wp-block-post-template { gap: 32px; }
.rv-liste-articles .wp-block-post-title { margin: 6px 0; font-size: 21px; }
.rv-liste-articles .wp-block-post-title a { text-decoration: none; color: var(--rv-bleu); }
.rv-liste-articles .wp-block-post-title a:hover { color: var(--rv-rouge); }
.rv-liste-articles .wp-block-post-featured-image { margin-bottom: 12px; }
.rv-liste-articles .wp-block-post-featured-image img { object-fit: cover; }
.rv-liste-articles .wp-block-post-excerpt { color: #33415C; }
.rv-liste-articles .wp-block-post-excerpt__more-text { display: none; }

/* FAQ */
.wp-block-details { border-top: 1px solid var(--rv-trait); padding: 20px 0; margin-top: 0 !important; margin-bottom: 0 !important; }
.wp-block-details:last-of-type { border-bottom: 1px solid var(--rv-trait); }
.wp-block-details summary { font-weight: 700; font-size: 19px; color: var(--rv-bleu); cursor: pointer; min-height: 32px; }
.wp-block-details > :not(summary) { color: #33415C; margin-top: 12px; }

/* Ligne de communiqués */
.rv-communiques p { border-top: 1px solid var(--rv-trait); padding: 18px 0; margin: 0 !important; }
.rv-communiques p:last-child { border-bottom: 1px solid var(--rv-trait); }
.rv-communiques strong { display: inline-block; min-width: 150px; color: #4A5875; font-weight: 500; }

/* Pied de page */
.rv-pied { background: var(--rv-nuit); color: #C9D3E6; padding-top: 64px; padding-bottom: 32px; font-size: 15px; margin-top: 0 !important; }
.rv-pied a { color: #fff; }
.rv-pied a:hover { color: #fff; text-decoration-thickness: 2px; }
.rv-pied__marque { font-family: var(--wp--preset--font-family--titres); font-size: 30px; color: #fff; margin: 0; }
.rv-logo--pied { width: 240px; max-width: 100%; margin-left: -9px; }
.rv-pied__titre { font-family: var(--wp--preset--font-family--texte) !important; font-size: 13px !important; font-weight: 700 !important; letter-spacing: .2em; text-transform: uppercase; color: #C9D3E6 !important; }
.rv-pied__liens { line-height: 2.1; }
.rv-pied__bas { border-top: 1px solid rgba(201, 211, 230, .25); margin-top: 48px !important; padding-top: 24px; font-size: 14px; }
.rv-pied__bas p { margin: 0; }

/* Recherche */
.wp-block-search__input { border: 1px solid #B9C3D6; padding: 12px; font: inherit; }
.wp-block-search__button { border-radius: 0; }

/* Photos dans les colonnes */
.rv-section .wp-block-column .wp-block-image img { width: 100%; max-height: 560px; object-fit: cover; object-position: center 30%; }

/* Pages de texte (mentions légales) */
.rv-contenu h2 { font-size: clamp(26px, 3vw, 32px); margin-top: 48px; margin-bottom: 8px; }
.rv-contenu h2:first-child { margin-top: 0; }

/* Actualités : flux de titres de presse */
.rv-flux__note { font-size: 14px; color: #4A5875; }
.rv-flux__liste.wp-block-rss { list-style: none; padding: 0; margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2px; }
.rv-flux__liste .wp-block-rss__item { background: #fff; padding: 18px 22px; margin: 0; }
.rv-flux__liste .wp-block-rss__item-title a { color: var(--rv-bleu); font-weight: 600; text-decoration: none; }
.rv-flux__liste .wp-block-rss__item-title a:hover { text-decoration: underline; }
.rv-flux__liste .wp-block-rss__item-publish-date { display: block; margin-top: 6px; font-size: 13px; color: #4A5875; }

/* Espace presse : photos à télécharger (vues en entier, sans recadrage) */
.rv-grille--photos { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.rv-photo-presse .wp-block-image { margin: 0 0 10px; aspect-ratio: 1; background: #E4E9F3; }
.rv-photo-presse .wp-block-image img { width: 100%; height: 100%; object-fit: contain; }
.rv-photo-presse p { margin: 0; font-size: 15px; color: #33415C; }
.rv-photo-presse a { font-weight: 700; color: var(--rv-bleu); }

/* Vidéos (filmées au téléphone, à la verticale) */
.wp-block-video { margin-left: 0; margin-right: 0; }
.wp-block-video video { display: block; width: auto; max-width: 100%; height: auto; max-height: 80vh; margin: 0 auto; background: var(--rv-nuit); }
.wp-block-video figcaption { font-size: 14px; color: #4A5875; text-align: left; margin-top: 10px; }
.rv-grille--videos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: start; }

/* Légende sous une galerie */
.rv-legende { font-size: 14px; color: #4A5875; margin-top: 8px !important; }

/* Photo seule dans un article : une photo en hauteur ne prend jamais plus que l'écran */
.rv-article .wp-block-post-content > .wp-block-image img { display: block; width: auto; max-height: 80vh; margin-left: auto; margin-right: auto; }
.rv-article .wp-block-post-content > .wp-block-image figcaption,
.rv-article .wp-block-post-content > .wp-block-video figcaption { text-align: center; }

/* Bloc « Citation » de l'éditeur : même allure que les citations du site */
.wp-block-quote { border-left: 4px solid var(--rv-rouge); padding-left: 24px; }
.wp-block-quote p { font-family: var(--wp--preset--font-family--titres); font-size: clamp(22px, 2.6vw, 28px); line-height: 1.35; color: var(--rv-bleu); }
.wp-block-quote cite { display: block; font-size: 14px; font-style: normal; color: #4A5875; }
.rv-section--bleu .wp-block-quote p { color: #fff; }
