/*
Theme Name:  Kadence Fabien Moine
Description: Thème enfant Kadence de fabienmoine.fr : reprend le look de l'ancien site (GeneratePress + Elementor) : verts #004F3C et #1D8D72, police DM Sans, marque en Cagliostro.
Author:      Alex BOUQUARD
Template:    kadence
Version:     0.1.0
Text Domain: kadence-fabienmoine
*/

/* Polices hébergées sur le site (DM Sans variable, Cagliostro pour la marque), reprises des fichiers
   qu'Elementor servait déjà ; aucun appel à Google Fonts. */
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url('polices/dm-sans-latin-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;
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url('polices/dm-sans-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: 'DM Sans';
    font-style: italic;
    font-weight: 100 1000;
    font-display: swap;
    src: url('polices/dm-sans-italique-latin-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;
}
@font-face {
    font-family: 'DM Sans';
    font-style: italic;
    font-weight: 100 1000;
    font-display: swap;
    src: url('polices/dm-sans-italique-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: 'Cagliostro';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('polices/cagliostro-latin.woff2') format('woff2');
}

/* Police de repli sans empattements : Kadence écrit « DM Sans » seul dans ses variables ; si la police
   manque, le navigateur prendrait une police à empattements. :root:root l'emporte sur le style en ligne
   de Kadence quel que soit l'ordre de chargement. */
:root:root {
    --global-body-font-family: 'DM Sans', sans-serif;
    --global-heading-font-family: 'DM Sans', sans-serif;
}

/* Marque de l'en-tête (élément HTML de Kadence) : « Fabien Moine » en Cagliostro vert, puis deux
   lignes de présentation, comme l'ancien en-tête. */
#masthead a.fm-marque,
#masthead a.fm-marque:hover,
#mobile-header a.fm-marque,
#mobile-header a.fm-marque:hover {
    text-decoration: none;
}
.fm-marque {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.15;
    text-decoration: none;
    color: #000000;
}
.fm-marque__nom {
    font-family: 'Cagliostro', serif;
    font-size: 26px;
    color: #1D8D72;
}
.fm-marque__ligne {
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
}
.fm-marque__ligne--petite {
    font-size: 9px;
}

/* Réseaux sociaux de l'en-tête : pastilles rondes aux couleurs de chaque réseau, icône blanche,
   comme l'ancien en-tête (Instagram #800080, Telegram #0088CC, YouTube #FF0000, Odysee #F5703E). */
#masthead .header-social-wrap .social-button {
    border-radius: 50%;
    color: #ffffff;
    border: 0;
}
#masthead .header-social-wrap .social-button:hover {
    color: #ffffff;
    opacity: 0.85;
}
#masthead .header-social-wrap .social-link-instagram { background: #800080; }
#masthead .header-social-wrap .social-link-telegram { background: #0088CC; }
#masthead .header-social-wrap .social-link-youtube { background: #FF0000; }
#masthead .header-social-wrap .social-link-custom1 { background: #F5703E; }
.header-social-wrap .social-link-custom1 img,
.footer-social-wrap .social-link-custom1 img {
    filter: brightness(0) invert(1);
}

/* Réseaux sociaux du pied : icônes blanches seules, sans pastille. */
#colophon .footer-social-wrap .social-button {
    border: 0;
    background: transparent;
    width: auto;
    height: auto;
}
#colophon .footer-social-inner-wrap {
    gap: 17px;
}

/* Agenda : lien « Historique des conférences » posé par l'extrait de code « Agenda ». Repris du CSS
   additionnel de GeneratePress (rangé par thème, donc perdu au changement de thème), doublons fusionnés
   en gardant les valeurs qui s'appliquaient (les dernières). */
.agenda-history-link {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 30px auto;
    padding-left: 15px;
    text-align: center;
}
.agenda-history-link a {
    font-size: 26px;
    font-weight: 700;
    color: #1b745e;
    text-decoration: none;
}
.agenda-history-link a:hover {
    text-decoration: underline;
}

/* Pied de page : widgets posés par deploy/kadence/reglages.php (classe fm-pied), comme l'ancien pied :
   marque blanche, titres de colonnes vert clair, liens blancs sans puces, logos partenaires. */
.site-middle-footer-inner-wrap {
    padding-top: 70px;
    padding-bottom: 50px;
}
#colophon .site-bottom-footer-inner-wrap {
    min-height: 0;
    padding-top: 24px;
    padding-bottom: 24px;
}
#colophon .footer-html {
    margin: 0;
}
.site-footer .fm-pied__marque {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    margin: 0 0 21px;
}
.site-footer .fm-pied__titre {
    color: var(--global-palette7);
    font-size: 17px;
    font-weight: 500;
    line-height: 1;
    margin: 0 0 21px;
}
.site-footer .fm-pied__liens {
    list-style: none;
    margin: 0;
    padding: 0;
}
#colophon .fm-pied__liens li {
    margin: 0 0 20px;
    line-height: 17px;
}
.site-footer .fm-pied__liens a {
    color: #ffffff;
    font-size: 17px;
    font-weight: 500;
    line-height: 17px;
    text-decoration: none;
}
.site-footer .fm-pied__liens a:hover {
    color: var(--global-palette7);
}
.site-footer .fm-pied__logos {
    gap: 24px;
    align-items: center;
    margin-top: 20px;
}
.site-footer .fm-pied__logos figure {
    margin: 0;
}
/* Tailles de l'ancien pied : Hurom 135 px de large ; ÖKO 128 px, sa miniature carrée gardant des marges
   transparentes autour du logo, que les marges négatives retirent de la hauteur de la rangée. */
.site-footer .fm-pied__logos img {
    height: auto;
}
.site-footer .fm-pied__logos .wp-image-32016 {
    width: 135px;
}
.site-footer .fm-pied__logos .wp-image-32017 {
    width: 128px;
    margin: -39px 0;
}
/* Sur téléphone, l'ancien pied réduisait icônes (25 px, écart de 15 px) et logos (Hurom 52 px, ÖKO 62 px). */
@media (max-width: 767px) {
    #colophon .footer-social-wrap .social-button {
        font-size: 25px;
    }
    #colophon .footer-social-inner-wrap {
        gap: 15px;
    }
    .site-footer .fm-pied__logos .wp-image-32016 {
        width: 52px;
    }
    .site-footer .fm-pied__logos .wp-image-32017 {
        width: 62px;
        margin: -19px 0;
    }
}

/* Colonne centrée (conteneur Elementor « aligner au centre ») : les blocs y prennent la largeur de leur
   contenu. Un lecteur vidéo responsive ou un sous-groupe qui n'en contient qu'un n'en a pas et tombait à
   0 px ; dans Elementor, conteneurs enfants et widget vidéo prenaient toute la largeur. */
.wp-block-group.is-vertical > :is(.wp-block-group, .wp-block-columns, .wp-block-cover, .wp-block-embed, .wp-block-video, .wp-block-table, .wp-block-kadence-slider) {
    align-self: stretch;
}

/* Formulaire de contact (deploy/kadence/formulaires.php) : Prénom et Nom côte à côte comme dans l'ancien
   formulaire, l'un sous l'autre quand la place manque. Kadence empile les champs en colonne : ce formulaire
   passe en ligne avec retour à la ligne, chaque champ sur toute la largeur sauf les deux premiers (Kadence
   n'applique pas de classe aux champs). */
.fm-contact form.kb-advanced-form {
    flex-direction: row;
}
.fm-contact form.kb-advanced-form > .kb-adv-form-field {
    flex: 1 1 100%;
}
.fm-contact form.kb-advanced-form > .kb-adv-form-field:nth-child(-n+2) {
    flex: 1 1 calc(50% - 1rem);
    min-width: 200px;
    max-width: none;
}

/* Contenus convertis depuis Elementor (deploy/sans-elementor/convertisseur.php) : masquage par écran,
   comme les réglages « masquer sur ordinateur, tablette, mobile » d'Elementor (points de rupture 1025
   et 768 px). */
@media (min-width: 1025px) {
    .fm-cache-ordinateur { display: none !important; }
}
@media (min-width: 768px) and (max-width: 1024px) {
    .fm-cache-tablette { display: none !important; }
}
@media (max-width: 767px) {
    .fm-cache-mobile { display: none !important; }
}

/* Encadré « à refaire » posé par le convertisseur : bien visible en préprod, il ne doit plus en rester
   à la bascule (contrôlé par le script de bascule). */
.fm-a-refaire {
    border: 3px dashed #b82105;
    padding: 1em;
    background: #fff4f2;
}

/* Kadence met une bordure pleine (épaisseur par défaut) sur toute image « à bordure personnalisée » ;
   WordPress pose cette classe dès qu'une image a des coins arrondis. Sans épaisseur choisie, pas de
   bordure (sinon un cadre noir apparaît autour des photos converties). */
.wp-block-image.has-custom-border img:not([style*="border-width"]):not([style*="border-top-width"]) {
    border-width: 0;
}
