/*
Theme Name: Voilerie Air Terre Mer
Template: twentytwentyfive
Description: Thème enfant de Twenty Twenty-Five pour voilerie.ca : couleurs du logo, aucun titre de page ou d'article, aucune date, pied de page sans mention de WordPress.
Version: 2.9
Author: Gil Bourhis
Text Domain: voilerie
License: GNU General Public License v2 or later
*/

/* En-tête : filet marine sous la bande blanche */
.entete-voilerie { border-bottom: 3px solid var(--wp--preset--color--accent-1); }
.entete-voilerie .wp-block-site-title a { text-decoration: none; }
.entete-voilerie .devise-entete { letter-spacing: .08em; text-transform: uppercase; }
/* Logo : ne jamais le comprimer quand le titre manque de place (téléphone) */
.entete-voilerie .wp-block-image { flex-shrink: 0; }
.entete-voilerie .wp-block-image img { object-fit: contain; }

/* Menu : soulignement ocre au survol et sur la page courante */
.entete-voilerie .wp-block-navigation-item__content { border-bottom: 2px solid transparent; padding-bottom: 2px; }
.entete-voilerie .wp-block-navigation-item__content:hover,
.entete-voilerie .current-menu-item > .wp-block-navigation-item__content,
.entete-voilerie [aria-current="page"] { border-bottom-color: var(--wp--preset--color--accent-2); text-decoration: none; }

/* Liste des nouvelles : l'une sous l'autre, en entier, séparées par un filet */
.nouvelles-voilerie .wp-block-post + .wp-block-post .nouvelle-voilerie { border-top: 1px solid var(--wp--preset--color--accent-6); }

/* Accueil : texte de la grande photo aligné sur la largeur du site, pas collé au bord */
.wp-block-cover.has-custom-content-position .wp-block-cover__inner-container { width: 100%; max-width: var(--wp--style--global--wide-size); margin-inline: auto !important; }  /* le cœur de WP met margin: 0 */
/* L'accueil commence juste sous l'en-tête */
.home main > .wp-block-post-content > .wp-block-cover:first-child { margin-top: 0; }

/* Avis de l'accueil : paragraphes serrés */
.avis-voilerie p { margin-block: .4em; }

/* Pied de page */
.pied-voilerie a { color: #fff; }
.pied-voilerie .bas-voilerie { border-top: 1px solid rgba(255,255,255,.15); }

/* Photos des textes importés : arrondies, jamais plus larges que la colonne */
.entry-content img, .wp-block-post-content img { border-radius: 4px; height: auto; max-width: 100%; }

/* Nouvelles et pages : toutes les images centrées (sauf la petite icône de sextant dans le texte GPS de Contact). Les vieux articles les mettaient à gauche, à droite
   ou sans alignement ; sur le site, on les veut au milieu, et sans texte qui les contourne. */
:is(.blog, .single-post, .archive, .page) .wp-block-post-content img:not([src*="45_30"]) {
	float: none; display: block; margin-left: auto; margin-right: auto; margin-bottom: 1.25rem;
}
/* Dans les cartes de Liens et partenaires, le nom suit déjà le logo de près */
.carte-lien img { margin-bottom: 0 !important; }
:is(.blog, .single-post, .archive, .page) .wp-block-post-content :is(.wp-caption, figure.alignleft, figure.alignright, figure.aligncenter, .wp-block-image:not(.alignwide):not(.alignfull)) {
	float: none; margin-left: auto; margin-right: auto; text-align: center;
}
:is(.blog, .single-post, .archive, .page) .wp-block-post-content .wp-block-image :is(img, a) { margin-left: auto; margin-right: auto; }
/* Deux photos dans le même paragraphe (« avant / après ») : côte à côte, ensemble au milieu */
:is(.blog, .single-post, .archive, .page) .wp-block-post-content p:has(img ~ img, a ~ a > img) { text-align: center; }
:is(.blog, .single-post, .archive, .page) .wp-block-post-content p:has(img ~ img, a ~ a > img) img { display: inline-block; vertical-align: top; margin: 0 .5rem 1.25rem; }
