/**
 * Thème Kaalytics 2026 : boutons en relief (demande de Mamoun du 28/11/2026 : « trop simplistes, il faut du relief,
 * du contraste, des effets, palette Kaalytics »). Ombres et dégradés fixes, peints une fois : rien d'animé au défilement.
 * Chargé après theme.css, qui posait des formes plates.
 */

:root {
    /* Choix de Mamoun (28/11, 14 h) : « métal brossé, version brique ». Studio série 2 n°01 en forme de brique :
       dégradé émeraude poli, brossage horizontal fin, biseau intérieur, tranche visible sous le bouton. */
    --relief-plein:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
        linear-gradient(180deg, #d9fbe9 0%, #8debc2 28%, #34d399 50%, #13a676 54%, #23c48a 78%, #6ee7b7 100%);
    --relief-plein-survol:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
        linear-gradient(180deg, #f0fff7 0%, #a7f3d0 28%, #4ade9f 50%, #18b07e 54%, #34d399 78%, #a7f3d0 100%);
    --relief-ombre:
        inset 0 0 0 1px rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(2, 61, 43, 0.5),
        0 4px 0 #0b5f45,
        0 5px 0 #03281d,
        0 16px 26px -12px rgba(16, 185, 129, 0.85);
    --relief-verre:
        radial-gradient(120% 90% at 50% -30%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 55%),
        linear-gradient(180deg, #10241e 0%, #07130f 100%);
    --relief-verre-ombre:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 0 0 1.5px rgba(52, 211, 153, 0.75),
        inset 0 -10px 18px -12px rgba(52, 211, 153, 0.6),
        0 4px 0 #0a1d18,
        0 5px 0 #020705,
        0 12px 26px -16px rgba(0, 0, 0, 0.9);
}

/* ---------- Bouton plein : émeraude bombée, reflet en haut, ombre portée verte ---------- */
.btn-primary, .btn-orange, .btn-purple, .btn-blue, .hero__cta-main, .navbar__mobile-actions .btn {
    background: var(--relief-plein);
    color: #03140f;
    border: 0;
    box-shadow: var(--relief-ombre);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
    font-weight: 600;
    letter-spacing: -0.005em;
}
.btn-primary:hover, .btn-orange:hover, .btn-purple:hover, .btn-blue:hover, .hero__cta-main:hover, .navbar__mobile-actions .btn:hover {
    background: var(--relief-plein-survol);
    color: #03140f;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 6px 0 #0b5f45, 0 7px 0 #03281d, 0 0 28px -6px rgba(52, 211, 153, 0.8), 0 20px 30px -12px rgba(16, 185, 129, 0.9);
    transform: translateY(-2px);
}
.btn-primary:active, .hero__cta-main:active, .navbar__mobile-actions .btn:active {
    transform: translateY(1px);
    box-shadow: inset 0 2px 6px rgba(4, 47, 35, 0.5), 0 0 0 1px rgba(6, 95, 70, 0.9);
}

/* ---------- Bouton secondaire : verre sombre, filet émeraude intérieur ---------- */
.btn-secondary, .btn-outline, .btn-ghost {
    background: var(--relief-verre);
    color: #ecfdf5;
    border: 0;
    box-shadow: var(--relief-verre-ombre);
}
.btn-secondary:hover, .btn-outline:hover, .btn-ghost:hover {
    background: radial-gradient(120% 90% at 50% -30%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #123a2e 0%, #0a1d17 100%);
    color: #ecfdf5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 0 1.5px #6ee7b7, inset 0 -10px 18px -10px rgba(52, 211, 153, 0.75), 0 6px 0 #0a1d18, 0 7px 0 #020705, 0 0 24px -6px rgba(52, 211, 153, 0.7);
    transform: translateY(-2px);
}

/* Accueil 2026 (classes .bouton de la maquette) : même relief */
.accueil .bouton { background: var(--relief-plein); color: #03140f; box-shadow: var(--relief-ombre); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25); }
.accueil .bouton:hover { background: var(--relief-plein-survol); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 6px 0 #0b5f45, 0 7px 0 #03281d, 0 0 28px -6px rgba(52, 211, 153, 0.8); }

.btn:focus-visible, .hero__cta-main:focus-visible, .accueil .bouton:focus-visible {
    outline: 2px solid #6ee7b7; outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .btn-primary:hover, .btn-secondary:hover, .hero__cta-main:hover, .navbar__mobile-actions .btn:hover { transform: none; }
}

/* ---------- Reflet qui balaie le verre (Mamoun, 28/11 : « les boutons doivent être sexy ») ----------
   Une couche de lumière en plus dans le fond du bouton : elle traverse au survol (ordinateur) ; sur écran tactile,
   elle passe une fois à l'arrivée de la page. Seule la position du fond bouge, sur le bouton seulement. */
.btn-primary, .hero__cta-main, .navbar__mobile-actions .btn, .accueil .bouton {
    background:
        linear-gradient(105deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 62%) 170% 0 / 260% 100% no-repeat,
        var(--relief-plein);
}
.btn-primary:hover, .hero__cta-main:hover, .navbar__mobile-actions .btn:hover, .accueil .bouton:hover {
    background:
        linear-gradient(105deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 62%) 170% 0 / 260% 100% no-repeat,
        var(--relief-plein-survol);
}
@media (prefers-reduced-motion: no-preference) {
    @media (hover: hover) {
        .btn-primary:hover, .hero__cta-main:hover, .navbar__mobile-actions .btn:hover, .accueil .bouton:hover {
            animation: bouton-reflet 0.9s cubic-bezier(0.4, 0, 0.2, 1) 1;
        }
    }
    @media (hover: none) {
        .btn-primary, .hero__cta-main, .accueil .bouton { animation: bouton-reflet 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.9s 1 both; }
    }
}
@keyframes bouton-reflet { from { background-position: 170% 0, 0 0; } to { background-position: -70% 0, 0 0; } }

/* Appui : la brique s'enfonce sur sa tranche */
.btn-primary:active, .hero__cta-main:active, .accueil .bouton:active, .navbar__mobile-actions .btn:active {
    transform: translateY(4px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), inset 0 2px 6px rgba(2, 61, 43, 0.45), 0 0 0 #0b5f45, 0 1px 0 #03281d;
}
.btn-secondary:active, .btn-outline:active, .btn-ghost:active {
    transform: translateY(4px);
    box-shadow: inset 0 0 0 1.5px rgba(52, 211, 153, 0.75), 0 0 0 #0a1d18, 0 1px 0 #020705;
}

/* Forme brique (Mamoun, 28/11 : « plus carré, comme les briques des modules ») */
.btn, .btn-primary, .btn-secondary, .btn-outline, .btn-ghost, .btn-orange, .btn-purple, .btn-blue,
.hero__cta-main, .hero__cta-secondary, .navbar__mobile-actions .btn, .accueil .bouton { border-radius: 6px; }

/* ---------- Brique à tenon : « Parler à un expert » (Studio bt3-04, choix de Mamoun du 28/11) ----------
   Brique de verre émeraude, tenon de métal qui dépasse à droite (le module qui se branche) ; au survol la brique
   s'allume en vert clair et le tenon s'enfonce d'un cran. La flèche est remplacée par le tenon. */
.hero .hero__cta-main, .accueil .bouton--grand {
    position: relative; overflow: visible; margin-inline: 22px; border-radius: 8px;
    color: #ffffff; text-shadow: 0 1px 0 rgba(2, 40, 30, 0.55);
    background:
        linear-gradient(105deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 62%) 170% 0 / 260% 100% no-repeat,
        radial-gradient(120% 70% at 50% 0%, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 55%),
        linear-gradient(180deg, #1f9c7b 0%, #0d6b55 55%, #12866b 100%);
    box-shadow: inset 0 0 0 1px rgba(167, 243, 208, 0.55), inset 0 -8px 14px -8px rgba(110, 231, 183, 0.7),
        0 5px 0 #0a4a3a, 0 6px 0 #021a13, 0 18px 30px -14px rgba(16, 185, 129, 0.9);
}
.hero .hero__cta-main:hover, .accueil .bouton--grand:hover {
    color: #03231a; text-shadow: none;
    background:
        linear-gradient(105deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 62%) 170% 0 / 260% 100% no-repeat,
        radial-gradient(120% 70% at 50% 0%, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, #c8f8df 0%, #86edbb 50%, #57dca1 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 7px 0 #0b5f45, 0 8px 0 #03281d, 0 0 34px -4px rgba(110, 231, 183, 0.85);
    transform: translateY(-2px);
}
.hero .hero__cta-main svg { display: none; }
/* Tenon de métal, avec sa lumière de fixation */
.hero .hero__cta-main::after, .accueil .bouton--grand::after {
    content: ''; display: block; position: absolute; top: 50%; right: -21px; width: 23px; height: 24px; margin-top: -13px;
    border-radius: 2px 4px 4px 2px;
    background: linear-gradient(#071510, #071510) 60% 50% / 8px 8px no-repeat, linear-gradient(180deg, #f1f6f4 0%, #b7c4bf 45%, #7d8b86 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 1px 2px 0 #2a3532;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero .hero__cta-main:hover::after, .accueil .bouton--grand:hover::after { transform: translateX(-4px); }
/* Logement du tenon dans la brique */
.hero .hero__cta-main::before, .accueil .bouton--grand::before {
    content: ''; display: block; position: absolute; top: 50%; right: 0; width: 7px; height: 30px; margin-top: -16px;
    border-radius: 2px 0 0 2px; background: rgba(2, 30, 22, 0.55); box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.15);
}
.hero .hero__cta-main:active, .accueil .bouton--grand:active {
    transform: translateY(4px);
    box-shadow: inset 0 0 0 1px rgba(167, 243, 208, 0.6), 0 1px 0 #0a4a3a, 0 2px 0 #021a13;
}
/* Téléphone : la brique (largeur 100 %, 320 px au plus) garde la place du tenon, centrée (capture de Mamoun, 28/11 15 h 18) */
@media (max-width: 768px) { .hero .hero__cta-main { width: 100%; max-width: min(320px, calc(100% - 44px)); } }


/* ---------- Secondaire : brique de métal sombre (Studio mb6-02 sombre, lueur dessous de mb6-03) ----------
   Graphite émeraude brossé, texte vert pâle ; au survol les arêtes s'allument et une lueur passe sous la brique. */
.btn-secondary, .btn-outline, .btn-ghost {
    color: #bff5dc;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
        linear-gradient(180deg, #2a4a40 0%, #173129 46%, #10241e 54%, #183a30 100%);
    box-shadow: inset 0 0 0 1px rgba(167, 243, 208, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 4px 0 #0a1d18, 0 5px 0 #020705, 0 12px 24px -14px rgba(0, 0, 0, 0.9);
}
.btn-secondary:hover, .btn-outline:hover, .btn-ghost:hover {
    color: #ecfdf5;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
        linear-gradient(180deg, #33594d 0%, #1c3d33 46%, #132b24 54%, #1f4a3d 100%);
    box-shadow: inset 0 0 0 1px rgba(167, 243, 208, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 6px 0 #0a1d18, 0 7px 0 #020705, 0 16px 26px -10px rgba(52, 211, 153, 0.6);
    transform: translateY(-2px);
}
