/* Compléments au thème pour le site pysoft.net. */

/* Couleur de la marque : vert PySoft #008000 (charte du logo « nombre d'or »).
   Remplace le vert-jaune du thème ; texte blanc lisible dessus (contraste 5,1:1). */
:root {
    --primary-rgb: 0, 128, 0;
}

/* Charte : logo complet d'au moins 120 px de large à l'écran (ratio 480 × 228). */
.brand-main .desktop-logo {
    height: 3.75rem;
    width: auto;
}

/* En dessous, l'arbre seul (icône). */
.brand-main .mobile-logo {
    height: 2.75rem;
    width: auto;
}

/* Tableaux défilants : le texte réservé aux lecteurs d'écran (.visually-hidden, en position absolue) reste dans le
   tableau. Sans position relative, il s'en échappait et élargissait toute la page sur téléphone (801 px au lieu de
   390 sur /tarifs, 1 004 px en arabe). */
.table-responsive {
    position: relative;
}

/* Récapitulatif du simulateur : reste visible pendant le défilement sur grand écran. */
@media (min-width: 1200px) {
    .simulator-summary {
        position: sticky;
        top: 6rem;
    }
}

#simulation-result {
    transition: opacity 0.15s ease-in-out;
}

/* Les tableaux de prix restent lisibles sur mobile. */
.table caption {
    caption-side: bottom;
}

/* Animations (assets/js/animations.js) ------------------------------------------------------------------------- */

/* Bannières plus compactes que celles du thème (7rem en haut) : sur ordinateur, le menu horizontal (57 px)
   recouvre le haut de la bannière, le reste de la marge ne fait que l'aérer. */
.banner-section {
    position: relative;
    overflow: hidden;
    padding: 5.25rem 0 3rem;
}

.banner-section .content-1 {
    font-size: 44px;
}

@media (max-width: 991px) {
    .banner-section {
        padding: 3.5rem 0 2.5rem;
    }
    .banner-section .content-1 {
        font-size: 34px;
    }
}

/* Pluie de caractères : derrière le contenu de la bannière, sans capter les clics. Elle commence sous le
   menu et s'estompe derrière le texte (à gauche sur l'accueil, au centre ailleurs) pour qu'il reste lisible. */
.matrix-rain {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

@media (min-width: 992px) {
    .matrix-rain {
        top: 57px;
        height: calc(100% - 57px);
    }
}

.matrix-rain[data-matrix="hero"] {
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 50%, #000 72%);
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 50%, #000 72%);
}

.matrix-rain[data-matrix="subtle"] {
    -webkit-mask-image: linear-gradient(to right, #000 0%, rgba(0, 0, 0, 0.2) 28%, rgba(0, 0, 0, 0.2) 72%, #000 100%);
    mask-image: linear-gradient(to right, #000 0%, rgba(0, 0, 0, 0.2) 28%, rgba(0, 0, 0, 0.2) 72%, #000 100%);
}

/* En arabe, le texte de l'accueil est à droite : la pluie s'estompe de ce côté. */
[dir="rtl"] .matrix-rain[data-matrix="hero"] {
    -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 50%, #000 72%);
    mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.3) 50%, #000 72%);
}

/* Sur mobile, le texte occupe toute la largeur : la pluie reste discrète partout. */
@media (max-width: 991px) {
    .matrix-rain[data-matrix] {
        -webkit-mask-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3));
        mask-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3));
    }
}

.banner-section > .container {
    position: relative;
    z-index: 1;
}

/* Apparition au défilement : la classe anim-reveal n'est posée que par le script. */
.anim-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.anim-reveal.anim-visible {
    opacity: 1;
    transform: none;
}

/* Cartes qui se soulèvent au survol. */
main .card.border {
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.6s ease-out;
}

main .card.border:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 128, 0, 0.12);
}

/* Illustrations des pages (website/illustrations.py) : en tête d'article à droite sur grand écran, au-dessus du
   texte sur mobile ; sur la page Instances, elle accompagne les fonctionnalités pendant le défilement. */
.service-illustration {
    max-width: 320px;
    margin: 0 auto 1.5rem;
}

/* Côté fin de ligne : à droite, ou à gauche en arabe. */
@media (min-width: 992px) {
    .service-illustration {
        float: inline-end;
        width: 42%;
        margin: 0 0 1rem;
        margin-inline-start: 2rem;
    }
}

.service-article > figure:not(.service-illustration) {
    clear: both;
}

.sticky-illustration {
    position: sticky;
    top: 90px;
}

/* Moins d'animations demandées par le système : rien ne bouge. */
@media (prefers-reduced-motion: reduce) {
    .anim-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    main .card.border,
    main .card.border:hover {
        transition: none;
        transform: none;
    }
}

/* Prix au mois ou à l'heure : chaque prix porte ses deux valeurs, <html data-price-period> choisit.
   Le bouton n'apparaît qu'avec JavaScript (classe posée dans le <head>) ; sans lui, prix mensuels. */
.price-toggle {
    display: none;
}

.has-price-toggle .price-toggle {
    display: inline-block;
}

.price-hour {
    display: none;
}

html[data-price-period="hour"] .price-hour {
    display: inline;
}

html[data-price-period="hour"] .price-month {
    display: none;
}

/* Tableaux de prix : en-tête au vert de la marque, même couleur de texte sur toutes les lignes. */
.price-table > thead th {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: #1f2937;
    font-weight: 600;
}

.price-table > tbody > tr > th,
.price-table > tbody > tr > td {
    color: #1f2937;
}

.price-table > tbody > tr:hover > * {
    background-color: rgba(var(--primary-rgb), 0.04);
}

/* Lien d'évitement visible au clavier. */
.visually-hidden-focusable:focus {
    position: fixed !important;
    top: 0.5rem;
    inset-inline-start: 0.5rem;
    z-index: 2000;
    padding: 0.5rem 1rem;
    background: #fff;
    border-radius: 0.25rem;
}

/* Langues ------------------------------------------------------------------------------------------------------ */

/* Les polices du thème n'ont pas l'alphabet arabe : Cairo (chargée sur les pages arabes uniquement). */
html[lang="ar"] body,
html[lang="ar"] :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .heading-title) {
    font-family: "Cairo", "Hind Siliguri", sans-serif;
}

html[lang="ar"] body {
    line-height: 1.7;
}

/* Kabyle : les lettres que Hind Siliguri et Urbanist n'ont pas (ɣ, ɛ, ṛ…) viennent de Noto Sans. */
html[lang="kab"] body {
    font-family: "Hind Siliguri", "Noto Sans", sans-serif;
}

html[lang="kab"] :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .heading-title) {
    font-family: "Urbanist", "Noto Sans", sans-serif;
}

.language-switcher .dropdown-menu {
    min-width: 9rem;
}

.language-switcher > a {
    white-space: nowrap;
}

.language-switcher .dropdown-item.active,
.language-switcher .dropdown-item:active {
    background-color: var(--primary-color);
    color: #fff;
}

/* Assistant IA (partials/assistant.html, assets/js/assistant.js) : bouton en bas de l'écran, fenêtre de discussion
   au-dessus. Propriétés logiques : en arabe, le tout passe à gauche. */
.pysoft-assistant {
    position: fixed;
    inset-inline-end: 1.25rem;
    inset-block-end: 1.25rem;
    z-index: 1050;
}

.pysoft-assistant__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.1rem;
    border: 0;
    border-radius: 2rem;
    background: rgb(var(--primary-rgb));
    color: #fff;
    font-weight: 600;
}

.pysoft-assistant__toggle .fe {
    font-size: 1.25rem;
}

.pysoft-assistant__panel {
    position: absolute;
    inset-inline-end: 0;
    inset-block-end: calc(100% + 0.75rem);
    display: flex;
    flex-direction: column;
    width: min(24rem, calc(100vw - 2.5rem));
    height: min(34rem, calc(100vh - 7rem));
    border-radius: 0.75rem;
    background: var(--custom-white, #fff);
    overflow: hidden;
}

.pysoft-assistant__panel[hidden] {
    display: none;
}

.pysoft-assistant__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgb(var(--primary-rgb));
    color: #fff;
}

.pysoft-assistant__close {
    border: 0;
    background: none;
    color: inherit;
    font-size: 1.1rem;
}

.pysoft-assistant__notice {
    margin: 0;
    padding: 0.5rem 1rem;
    border-block-end: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.75rem;
    color: #6c757d;
}

.pysoft-assistant__messages {
    flex: 1;
    padding: 0.75rem 1rem;
    overflow-y: auto;
}

.pysoft-assistant__message {
    max-width: 88%;
    margin-block-end: 0.6rem;
    padding: 0.55rem 0.8rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.pysoft-assistant__message p,
.pysoft-assistant__message ul {
    margin-block-end: 0.4rem;
}

.pysoft-assistant__message > :last-child {
    margin-block-end: 0;
}

.pysoft-assistant__message ul {
    padding-inline-start: 1.1rem;
}

.pysoft-assistant__message--bot {
    background: #f1f5f1;
}

.pysoft-assistant__message--user {
    margin-inline-start: auto;
    background: rgb(var(--primary-rgb));
    color: #fff;
    white-space: pre-wrap;
}

.pysoft-assistant__message--pending {
    font-style: italic;
    color: #6c757d;
}

.pysoft-assistant__message--error {
    background: #fdf1e7;
}

.pysoft-assistant__form {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-block-start: 1px solid rgba(0, 0, 0, 0.08);
}

.pysoft-assistant__form textarea {
    flex: 1;
    resize: none;
    padding: 0.4rem 0.6rem;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.pysoft-assistant__footer {
    display: flex;
    justify-content: space-between;
    padding: 0 1rem 0.6rem;
    font-size: 0.75rem;
}

.pysoft-assistant__reset {
    padding: 0;
    border: 0;
    background: none;
    color: #6c757d;
    text-decoration: underline;
}

/* Petit écran : bouton réduit à l'icône, fenêtre sur toute la largeur. */
@media (max-width: 575.98px) {
    .pysoft-assistant__toggle span {
        display: none;
    }
}

/* Services annoncés, pas encore commandables (noms de domaine, DNS, certificats SSL : 04/11/2026). */
.coming-soon-badge{white-space:nowrap}
.banner-section .coming-soon-badge{background:#fff;color:#a84f08;font-size:.85rem;padding:.4em .8em}
.cert-table td:nth-child(3),.cert-table td:nth-child(4){min-width:10.5rem}
.cert-table td:nth-child(2){min-width:9rem}
.cert-table td:nth-child(2) .d-block{white-space:normal}

/* --- Consentement à la mesure d'audience (partials/consent.html, assets/js/consent.js, 05/11/2026) --------------------
   CNIL : « Refuser » et « Accepter » ont exactement le même style, aucun n'est mis en avant. Propriétés logiques :
   le bandeau se retourne de lui-même en arabe (dir="rtl"). */
.pysoft-consent {
    position: fixed;
    z-index: 1060;
    inset-inline: 1rem;
    inset-block-end: 1rem;
    max-width: 46rem;
    margin-inline: auto;
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1.25rem;
    align-items: center;
    background: #1b2a1b;
    color: #fff;
    border: 1px solid rgba(var(--primary-rgb), 0.6);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-size: 0.92rem;
    line-height: 1.5;
}
.pysoft-consent[hidden] {
    display: none;
}
.pysoft-consent__text {
    flex: 1 1 22rem;
    margin: 0;
}
.pysoft-consent__text a {
    color: #9fe39f;
    text-decoration: underline;
}
.pysoft-consent__actions {
    display: flex;
    gap: 0.6rem;
    flex: 0 0 auto;
}
.pysoft-consent__btn {
    min-width: 7.5rem;
    padding: 0.6rem 1.1rem;
    border: 1px solid #fff;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.pysoft-consent__btn:hover,
.pysoft-consent__btn:focus-visible {
    background: #fff;
    color: #1b2a1b;
    outline: none;
}
@media (max-width: 480px) {
    .pysoft-consent__actions {
        width: 100%;
    }
    .pysoft-consent__btn {
        flex: 1;
    }
}
