/* Déclaration de la police Amiri Quran locale */
@font-face {
    font-family: 'Amiri';
    src: url('../fonts/AmiriQuran-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ======================================================= */
/* 1. VARIABLES ET CONFIGURATION GLOBALE                   */
/* ======================================================= */
:root {
    --bg-color: #0d2a22;         /* Vert émeraude très sombre (fond principal) */
    --card-bg: #133a30;          /* Vert émeraude intermédiaire pour les cartes */
    --text-color: #ffffff;       /* Écritures blanches */
    --gold: #d4af37;             /* Or (couleur d'accentuation) */
    --sub-text: #a3b8b3;         /* Vert clair atténué pour les labels secondaires */
    --border-radius: 16px;
    --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-arabic: "Amiri", "Noto Naskh Arabic", "Traditional Arabic", "Simplified Arabic", serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-ui);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

/* Enveloppe adaptative pour s'assurer d'un rendu parfait sur Mobile et Tablette/PC */
.app-viewport-wrapper {
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.app-main-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ======================================================= */
/* 2. COMPOSANTS DE BASE ET INTERACTIFS                    */
/* ======================================================= */
.card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.15); /* Bordure dorée très subtile */
    display: flex;
    flex-direction: column;
    gap: 16px;
}

button, .btn {
    font-family: var(--font-ui);
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    text-decoration: none;
}

.btn-primary {
    background: var(--gold);
    color: #0d2a22;
}

.btn-primary:active, .btn-primary:hover {
    background: #c5a02c;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:active, .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-full-width {
    width: 100%;
}

.divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 15px 0;
    width: 100%;
}

/* ======================================================= */
/* 3. HERO ET TITRES DE VUES                               */
/* ======================================================= */
.app-hero {
    text-align: center;
    padding: 10px 0;
}

.app-main-title {
    font-size: 1.8rem;
    margin: 0;
    color: var(--gold);
    letter-spacing: 1px;
}

.app-sub-title {
    font-size: 0.95rem;
    color: var(--sub-text);
    margin: 8px 0 0 0;
}

.view-title {
    font-size: 1.2rem;
    color: var(--gold);
    margin: 0 0 4px 0;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* ======================================================= */
/* 4. CHAMPS DE FORMULAIRES HARMONISÉS                     */
/* ======================================================= */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

label.main-label {
    font-size: 1rem;
    font-weight: bold;
    color: #ffffff;
}

.help-text {
    font-size: 0.82rem;
    color: var(--sub-text);
    line-height: 1.4;
}

/* Style des champs de saisie texte (UUID) */
input[type="text"] {
    width: 100%;
    padding: 12px;
    background: #091e18; /* Vert encore plus sombre pour le contraste */
    border: 1.5px solid rgba(212, 175, 55, 0.25);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

input[type="text"]:focus {
    border-color: var(--gold);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

/* Option Radio stylisée comme des tuiles interactives de l'application */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.radio-option:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 175, 55, 0.3);
}

/* Lorsque l'option est sélectionnée, on applique le style "actif" de l'application (fond or, texte sombre) */
.radio-option.selected-active {
    background: var(--gold);
    border-color: var(--gold);
    color: #0d2a22;
}

.radio-option input[type="radio"] {
    margin-right: 12px;
    margin-top: 3px;
    accent-color: var(--gold);
}

.radio-text {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ======================================================= */
/* 5. GESTION DES NOTIFICATIONS ET ERREURS                 */
/* ======================================================= */
.alert {
    padding: 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.error-message {
    color: #f87171;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 2px;
}

/* ======================================================= */
/* 12. COMPOSANTS DE STRUCTURE : HEADER & FOOTER          */
/* ======================================================= */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
    width: 100%;
}

.header-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.header-logo {
    height: 34px;
    width: auto;
    transition: transform 0.2s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

.site-footer {
    margin-top: auto;
    padding: 24px 0 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 0.8rem;
    color: var(--sub-text);
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 4px;
}

.footer-link {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.footer-link:hover {
    color: #ffffff;
}

.footer-copyright {
    opacity: 0.7;
    line-height: 1.4;
}



/* ======================================================= */
/* 13. LANDING PAGE & ANIMATIONS STYLE APPLE              */
/* ======================================================= */

/* Conteneur large pour la page d'accueil */
.landing-viewport-wrapper {
    width: 100%;
    max-width: 1100px;
    box-sizing: border-box;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Sections de narration */
.landing-section {
    padding: 80px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.landing-section h2 {
    font-size: 2.2rem;
    color: var(--gold);
    margin-bottom: 16px;
    font-weight: 800;
}

.landing-section p.section-desc {
    font-size: 1.15rem;
    color: var(--sub-text);
    max-width: 600px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

/* Grille de fonctionnalités */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    width: 100%;
    margin-top: 20px;
}

/* Hub de Navigation / Liens */
.nav-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    width: 100%;
    margin-top: 30px;
}

.hub-card {
    background: var(--card-bg);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: var(--border-radius);
    padding: 24px;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.hub-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.15);
}

.hub-icon {
    font-size: 2.5rem;
    color: var(--gold);
}

.hub-title {
    font-size: 1.1rem;
    font-weight: bold;
}

.hub-desc {
    font-size: 0.85rem;
    color: var(--sub-text);
    line-height: 1.4;
}

/* Simulation d'écran de l'application (Minimaliste/Premium) */
.app-mockup {
    background: #091e18;
    border: 6px solid #1e293b;
    border-radius: 36px;
    width: 280px;
    height: 520px;
    padding: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-sizing: border-box;
    position: relative;
}

.app-mockup-screen {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    overflow: hidden;
}

/* Classes pour les animations au défilement */
.animate-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Transitions retardées pour des effets d'apparition séquentiels */
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }

/* Responsive tweaks */
@media (max-width: 600px) {
    .landing-section h2 {
        font-size: 1.8rem;
    }
    .landing-section {
        padding: 40px 0;
    }
}