/* Global Styles */
:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --primary-color: #B834A0;
    /* Rose Rahmat */
    --accent-color: #00AEEF;
    /* Blue Cyan */
    --accent-hover: #22B2EE;
    /* Blue Hover */
    --header-height: 80px;
    --font-primary: 'Fira Sans Condensed', sans-serif;
    --font-secondary: 'Lato', sans-serif;
    --font-arabic: 'Scheherazade New', serif;
    --border-radius-btn: 8px;
}

.font-arabic {
    font-family: var(--font-arabic);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-secondary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Verrou anti scroll horizontal : aucun élément ne peut faire dépasser le
       viewport (header, footer, contenu d'article, etc.). Important sur mobile
       où des éléments fixed/absolute peuvent provoquer un overflow latéral. */
    overflow-x: clip;
    max-width: 100vw;
}

html {
    overflow-x: clip;
    max-width: 100vw;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

/* Scroll Animations — FAIL-SAFE :
   Par défaut, sections et items sont VISIBLES sans aucune animation.
   Le JS opte EXPLICITEMENT pour l'animation en ajoutant la classe
   `.rt-pre-anim` sur chaque élément observé. Si JS plante / charge mal,
   tout reste lisible. */
section {
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    /* will-change retiré : trop coûteux en GPU pour des animations one-shot */
}
section.rt-pre-anim {
    opacity: 0;
    transform: translateY(30px);
}
section.rt-pre-anim.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.homepage-section,
.homepage-section .animate-item {
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-item {
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* will-change retiré : trop coûteux en GPU pour des animations one-shot */
}
.animate-item.rt-pre-anim {
    opacity: 0;
    transform: translateY(30px);
}
.animate-item.rt-pre-anim.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure the hero section is visible immediately to avoid flash */
section:first-of-type {
    opacity: 1;
    transform: translateY(0);
}

/* Header / Footer — styles déplacés dans /static/css/nav.css.
   Voir .rt-header / .rt-footer / .rt-burger / .rt-mobile-panel. */

/* Main Content */
main { flex: 1; }

/* Anciens styles header/footer/menu retirés — désormais dans /static/css/nav.css */

/* Garde-fou anti-débord horizontal mobile */
main { overflow-x: clip; }
