/* Thème « fractale » : chargé après toutes les feuilles du core (layout front).
   Graphisme repris de l'ancien fractale.be (rouge #b03034, gris #636466, PT Sans,
   Bebas Neue pour le menu, Shadows Into Light pour le bandeau).
   Sections du onepage stylées par leur slug (classe section-page-{slug}, core) :
   budget-publicitaire et sites-internet en gris clair, impression en gris foncé.
   Mode d'emploi : cmscore/themes/README.md */

/* ── Polices (hébergées dans le thème, pas d'appel à Google) ─────────────── */
@font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/pt-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/pt-sans-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/pt-sans-700.woff2') format('woff2'); }
@font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; font-display: swap; src: url('fonts/pt-sans-700-italic.woff2') format('woff2'); }
@font-face { font-family: 'Bebas Neue'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/bebas-neue.woff2') format('woff2'); }
@font-face { font-family: 'Shadows Into Light'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/shadows-into-light.woff2') format('woff2'); }

:root {
    /* Couleurs */
    --primary:       #b03034;
    --primary-dark:  #636466;   /* survol des boutons : gris, comme l'ancien site */
    --grey:          #636466;
    --grey-light:    #f3f3f3;

    /* Texte */
    --text:          #333335;
    --text-muted:    #636466;
    --text-light:    #999999;

    /* Surfaces */
    --bg:            #ffffff;
    --bg-alt:        #f3f3f3;
    --surface:       #ffffff;
    --border:        #e0e0e0;

    /* Variables utilisées par pages.css (autre nommage) */
    --color-primary: var(--primary);
    --color-muted:   var(--text-muted);
    --color-border:  var(--border);
    --color-text:    var(--text);

    /* Typographie */
    --font-base:     'PT Sans', system-ui, sans-serif;
    --font-nav:      'Bebas Neue', 'PT Sans', sans-serif;
    --font-script:   'Shadows Into Light', cursive;
    --font-size:     17px;
    --line-height:   1.5;

    /* Mise en page */
    --max-w:         1140px;
    --radius:        0;
    --radius-lg:     0;
    --header-h:      122px;   /* logo 300 px de large (91 px de haut) + 2 × 15 px ; sert au décalage des ancres */
    --section-pad:   clamp(3rem, 7vw, 5rem);
    --anchor-offset: calc(var(--header-h) + 1rem);
}

/* ── Titres et liens ─────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.content-body h3 {
    color: var(--primary);
    font-weight: 400;
    line-height: 1.2;
}
.content-article h1,
.section-embed-title,
.cta-headline         { font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 400; margin-bottom: 1rem; }
.content-body h2      { font-size: clamp(1.5rem, 2.8vw, 2rem); margin: 1.5em 0 .5em; }
.content-body h3      { font-size: clamp(1.35rem, 2.4vw, 1.7rem); margin: 1.2em 0 .6em; }
.content-body h4      { font-size: clamp(1.25rem, 2.2vw, 1.55rem); margin: 1.4em 0 .5em; }
.content-body h5      { font-size: clamp(1.15rem, 2vw, 1.35rem); margin: 1.4em 0 .5em; }
.content-body > :first-child { margin-top: 0; }

.content-body a       { text-decoration: none; }
.content-body a:hover { color: var(--primary); text-decoration: underline; }
.content-body ul      { margin: 1em 0 1em 1.25em; }

/* ── Boutons : carrés, rouge, gris au survol ─────────────────────────────── */
.btn,
.content-body a.button {
    display: inline-block;
    padding: .9rem 2rem;
    border-radius: 0;
    font-family: var(--font-base);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}
.btn-primary,
.content-body a.button        { background: var(--primary); color: #fff; }
.btn-primary:hover,
.content-body a.button:hover  { background: var(--grey); color: #fff; text-decoration: none; }

/* ── En-tête ─────────────────────────────────────────────────────────────── */
.site-header {
    border-bottom: 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}
.site-header .container { height: auto; padding-block: 15px; }   /* hauteur donnée par le logo, comme l'ancien site */
.site-logo { max-width: min(300px, 60vw); max-height: 200px; }
.site-brand { color: var(--primary); font-weight: 400; font-size: 1.8rem; }

.site-nav { gap: 0; }
.site-nav a {
    margin-left: 28px;
    padding: .35rem 0;
    border-radius: 0;
    font-family: var(--font-nav);
    font-size: 1.4rem;
    letter-spacing: .02em;
    line-height: 1;
    color: var(--grey);
}
.site-nav a:hover,
.site-nav a.is-current {
    background: transparent;
    color: var(--primary);
}
/* Onepage : ni « Accueil » (le logo y mène) ni « Connexion » dans le menu ;
   la connexion reste accessible par son adresse. */
.site-nav > a:first-child,
.site-nav a.btn-nav { display: none; }

.nav-toggle { color: var(--primary); font-size: 1.9rem; }

@media (max-width: 768px) {
    .site-nav { top: 100%; padding: .5rem 1.25rem 1rem; }   /* juste sous l'en-tête, quelle que soit sa hauteur */
    .site-nav a { margin-left: 0; padding: .6rem 0; font-size: 1.6rem; }
}

/* ── Diaporama d'accueil ─────────────────────────────────────────────────── */
/* Image claire, texte gris à droite ; la fin du titre (sous-titre) est écrite à la
   main et animée par theme.js (mots séparés par « | » dans l'admin). */
.home-slider { max-height: none; background: #fff; }
.slide img {
    height: clamp(300px, 36.5vw, 700px);   /* proportions de l'image d'origine (1920×700) */
    opacity: 1;
}
.slide-caption {
    align-items: flex-end;
    text-align: right;
    padding-inline: max(1.25rem, calc((100% - var(--max-w)) / 2 + 1.25rem));
    background: none;
    color: var(--grey);
}
.slide-title,
.slide-subtitle {
    max-width: none;
    margin: 0;
    text-shadow: none;
    font-weight: 400;
    line-height: 1.1;
}
.slide-title    { font-size: clamp(1.9rem, 4.6vw, 4.2rem); color: var(--grey); }
.slide-subtitle { font-family: var(--font-script); font-size: clamp(2rem, 5vw, 4.6rem); color: var(--primary); min-height: 1.1em; }
.slide-typed::after {                     /* curseur de l'effet machine à écrire */
    content: '';
    display: inline-block;
    width: 2px;
    height: .8em;
    margin-left: .08em;
    background: currentColor;
    animation: fractale-caret 1s steps(1) infinite;
}
@keyframes fractale-caret { 50% { opacity: 0; } }

/* ── Sections du onepage ─────────────────────────────────────────────────── */
/* Les fonds débordent sur toute la largeur de l'écran (ombre + découpe) sans
   sortir le contenu du conteneur. */
.site-main:has(.section-page) { padding-top: 0; }   /* les sections portent leurs propres marges ; diaporama collé à l'en-tête */
.site-main:has(.section-page > .page-section:last-child) { padding-bottom: 0; }   /* dernière section collée au pied de page */
.home-slider-bleed { margin-top: 0; margin-bottom: 0; }

.section-page > .content-article { max-width: none; padding-block: var(--section-pad); }
.article-body { font-size: 1rem; line-height: var(--line-height); }
.page-section {
    margin-top: 0;
    padding-block: var(--section-pad);
    border-top: 0;
    --section-bg: var(--bg);
    background: var(--section-bg);
    box-shadow: 0 0 0 100vmax var(--section-bg);
    clip-path: inset(0 -100vmax);
}
.section-page-budget-publicitaire,
.section-page-sites-internet    { --section-bg: var(--grey-light); }   /* contact reste blanc : se détache de Web */

.section-page-impression        { --section-bg: var(--grey); color: #fff; }
.section-page-impression :is(h2, h3, h4, h5),
.section-page-impression a      { color: #fff; }

/* Blocs de l'éditeur posés sur un fond foncé ou une photo (editor.css : fond clair) */
.section-page-impression .bloc-fond,
.page-media__box .bloc-fond     { background: rgba(255, 255, 255, .15); }
.section-page-impression .bloc-encadre,
.page-media__box .bloc-encadre  { border-color: rgba(255, 255, 255, .5); }
.section-page-impression .bloc-citation,
.page-media__box .bloc-citation { border-left-color: #fff; }

/* Illustration à côté du texte : un tiers / deux tiers, comme l'original */
@media (min-width: 768px) {
    .page-media--left  { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
    .page-media--right { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}
.page-media { gap: clamp(1.5rem, 4vw, 3.5rem); }

/* Illustration en fond (ex. « Intéressé ? ») : photo teintée de rouge, texte blanc centré */
.section-page-content--bg { padding-block: 0; }
.page-media--background .page-media__figure { background: var(--primary); }
.page-media--background .page-media__figure img { opacity: .7; }
.page-media--bleed { padding: var(--section-pad) 0; }
.page-media__box {
    max-width: 44rem;
    margin: 0 auto;
    padding: 0;
    background: none;
    text-align: center;
    color: #fff;
}
.page-media__box .section-embed-title,
.page-media__box :is(h2, h3, h4) { color: #fff; }
.page-media__box .content-body   { font-size: 1.3rem; }
.page-media__box .content-body a:not(.button) { color: #fff; text-decoration: underline; }

/* ── Contact ─────────────────────────────────────────────────────────────── */
.section-cta-contact { text-align: center; }
.cta-text { max-width: 40rem; margin: 0 auto 2.5rem; color: var(--text); }
.cta-form { max-width: var(--max-w); margin: 0 auto; text-align: left; }
.cta-form-row { gap: 2rem; margin-bottom: 1.5rem; }
.cta-form label { font-size: .9rem; font-weight: 400; color: var(--text); margin-bottom: .2rem; }
.cta-form :is(input, textarea) {
    padding: .5rem 0;
    border: 0;
    border-bottom: 1px solid #c9c9c9;
    border-radius: 0;
    background: transparent;
    font-size: 1rem;
}
.cta-form :is(input, textarea):focus {
    border-bottom-color: var(--primary);
    box-shadow: 0 1px 0 var(--primary);
}
.cta-form textarea { min-height: 80px; }
.cta-form .btn { display: block; margin: 2rem auto 0; }

/* ── Pied de page : rouge ────────────────────────────────────────────────── */
.site-footer {
    background: var(--primary);
    border-top: 0;
    padding: clamp(2.5rem, 6vw, 4rem) 0 1.5rem;
    text-align: left;
    color: #fff;
    font-size: .95rem;
}
.footer-cols { border-bottom-color: rgba(255, 255, 255, .25); gap: 2.5rem; }
@media (min-width: 900px) {
    .footer-cols { grid-template-columns: 5fr 4fr 3fr; }
}
.footer-col__title { color: #fff; font-size: 1.35rem; font-weight: 400; margin-bottom: .75rem; }
.footer-text,
.footer-contact li,
.footer-col a,
.footer-contact .ph,
.footer-bottom { color: #fff; }
.footer-text,
.footer-contact li { font-size: .95rem; }
.footer-col a { font-size: .95rem; }
.site-footer .footer-col:not(.footer-col--text):not(.footer-col--contact) a {
    font-family: var(--font-nav);
    font-size: 1.2rem;
    letter-spacing: .02em;
}
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top-color: rgba(255, 255, 255, .25); opacity: .85; }

/* Effet d'eau du diaporama (theme.js) : canvas posé sur l'image, sous la légende */
.slide-ripples {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
