/*
 * Fils électriques aux couleurs conventionnelles
 * ----------------------------------------------
 * Rouge (phase), bleu (neutre), vert/jaune (terre) : le motif qui signe le
 * site. Cette feuille est chargée sur toutes les pages et ajoute :
 *
 *   1. sous les titres de section, trois bouts de fil dénudés à la place du
 *      trait rouge ;
 *   2. sous la barre de navigation, un fil fin qui se charge en rouge à
 *      mesure que l'on descend dans la page (js/fil-progression.js).
 *
 * Les dessins sont des SVG intégrés : aucune image à charger.
 * Pour retirer le motif d'une page, il suffit d'enlever le lien vers ce fichier.
 */

/* ----- 1. Titres de section ----- */
h2::after {
    width: 104px;
    height: 20px;
    border-radius: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 104 20'%3E%3Cdefs%3E%3Cpattern id='t' width='9' height='9' patternUnits='userSpaceOnUse' patternTransform='rotate(-55)'%3E%3Crect width='9' height='9' fill='%232e9e44'/%3E%3Crect width='9' height='3.6' fill='%23f4c400'/%3E%3C/pattern%3E%3C/defs%3E%3Crect x='5' y='2' width='94' height='2' rx='1' fill='%23c8782f'/%3E%3Crect x='11' y='1' width='82' height='4' rx='2' fill='%23e62222'/%3E%3Crect x='12' y='1.6' width='80' height='1' rx='0.5' fill='%23fff' fill-opacity='0.3'/%3E%3Crect x='1' y='9' width='102' height='2' rx='1' fill='%23c8782f'/%3E%3Crect x='7' y='8' width='90' height='4' rx='2' fill='%231f6fe0'/%3E%3Crect x='8' y='8.6' width='88' height='1' rx='0.5' fill='%23fff' fill-opacity='0.3'/%3E%3Crect x='7' y='16' width='90' height='2' rx='1' fill='%23c8782f'/%3E%3Crect x='13' y='15' width='78' height='4' rx='2' fill='url(%23t)'/%3E%3Crect x='14' y='15.6' width='76' height='1' rx='0.5' fill='%23fff' fill-opacity='0.3'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    box-shadow: none;
}

/* Sur les bandeaux d'appel à l'action (fond rouge ou sombre), le trait
   d'origine est conservé : les fils n'y seraient pas lisibles. */
.contact-cta h2::after,
.cta-section h2::after,
.video-section h2::after {
    width: 80px;
    height: 4px;
}

/* ----- 2. Fil de progression sous le menu (js/fil-progression.js) -----
   Un fil fin accroché sous la barre de navigation : il se « charge » en rouge
   à mesure que le visiteur descend dans la page. */
.fil-progression {
    position: absolute;
    right: 0;
    bottom: -4px;
    left: 0;
    height: 4px;
    background: #3a3d42;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    pointer-events: none;
}

.fil-progression-courant {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #c40000 0, #ff3333 80%, #ffb3b3 100%);
    box-shadow: 0 0 8px rgba(255, 51, 51, 0.9);
    transform: scaleX(0);
    transform-origin: 0 50%;
    will-change: transform;
}

@media (max-width: 768px) {
    h2::after {
        width: 88px;
        height: 17px;
    }

    .contact-cta h2::after,
    .cta-section h2::after,
    .video-section h2::after {
        width: 80px;
        height: 4px;
    }
}
