@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary: #FFA500;
    --primary-dark: #e69500;
    --secondary: #8B4513;
    --bg-light: #f4f1ea;
    --white: #ffffff;
    --text-dark: #2d2d2d;
    --shadow: 0 10px 30px rgba(139, 69, 19, 0.10);
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* --- BARRE DE NAVIGATION (HEADER) --- */
.app-header {
    background: linear-gradient(135deg, var(--secondary) 0%, #5d2e0c 100%);
    color: white;
    padding: 10px 20px; /* Un peu moins haut pour laisser place au logo */
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-logo {
    font-size: 1.1em;
    font-weight: 700;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px; /* Espace entre logo et texte */
}

/* Nouveau : Style de l'image logo dans le header */
.header-logo-img {
    height: 40px; /* Taille contenue */
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.app-user-menu { display: flex; align-items: center; gap: 20px; }
.app-user-name { display: none; font-size: 0.9em; opacity: 0.9; }
@media (min-width: 768px) { .app-user-name { display: block; } }

.btn-logout {
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    text-decoration: none;
    color: white;
    transition: background 0.3s;
}
.btn-logout:hover { background: rgba(255,255,255,0.4); }

/* --- CONTENEUR PRINCIPAL --- */
.container {
    max-width: 900px;
    margin: 40px auto;
    background-color: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 768px) { .container { margin: 20px; padding: 20px; } }

h1, h2, h3 { color: var(--secondary); margin-top: 0; }

/* --- ACCUEIL (VITRINE) --- */
.hero-wrapper {
    background: linear-gradient(135deg, var(--secondary) 0%, #5d2e0c 100%);
    color: white;
    padding: 60px 20px 100px 20px;
    text-align: center;
    border-radius: 0 0 50% 50% / 20px;
}
.hero-content { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }

/* Nouveau : Logo sur la page d'accueil */
.hero-logo-img {
    height: 100px; /* Beaucoup plus gros */
    margin-bottom: 20px;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}

/* Correction Contraste Titre : On force le blanc pur */
.hero-content h1 { 
    color: #ffffff !important; 
    font-size: 2.5em; 
    margin-bottom: 10px; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.3); /* Ombre portée pour lisibilité */
}
.hero-content p { color: #f0f0f0; font-size: 1.2em; opacity: 1; font-weight: 300; }

.features-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; margin: -80px auto 50px auto; max-width: 1200px; padding: 0 20px; position: relative; z-index: 10; }
.feature-card { background: white; padding: 40px 30px; border-radius: 20px; flex: 1 1 300px; max-width: 350px; box-shadow: 0 15px 35px rgba(0,0,0,0.1); text-align: center; transition: transform 0.3s ease; }
.feature-card:hover { transform: translateY(-10px); }
.feature-icon { font-size: 3em; margin-bottom: 20px; display: inline-block; background: #fff3e0; width: 80px; height: 80px; line-height: 80px; border-radius: 50%; color: var(--primary); }
.cta-buttons { display: flex; flex-direction: column; gap: 15px; max-width: 450px; margin: 30px auto 0 auto; width: 100%; }
@media (min-width: 600px) { .cta-buttons { flex-direction: row; justify-content: center; } }

/* Boutons */
.btn-primary { background-color: var(--primary); color: white; text-decoration: none; padding: 15px 40px; border-radius: 50px; font-weight: 600; font-size: 1.1em; text-align: center; border: 2px solid var(--primary); display: block; }
.btn-primary:hover { background-color: var(--primary-dark); transform: scale(1.05); }
.btn-outline { background-color: transparent; border: 2px solid rgba(255,255,255,0.6); color: white; text-decoration: none; padding: 15px 40px; border-radius: 50px; font-weight: 600; font-size: 1.1em; text-align: center; display: block; }
.btn-outline:hover { background-color: white; color: var(--secondary); border-color: white; }

/* Dashboard items */
.stock-box { background-color: var(--primary); color: white; padding: 40px; border-radius: 20px; margin-bottom: 30px; box-shadow: 0 10px 20px rgba(0,0,0,0.15); text-align: center; }
.actions-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 768px) { .actions-grid { grid-template-columns: 2fr 1fr; } }
button { background-color: var(--primary); color: var(--white); border: none; padding: 20px; font-size: 18px; font-weight: 600; border-radius: 12px; cursor: pointer; transition: all 0.2s; font-family: 'Poppins', sans-serif; box-shadow: 0 4px 6px rgba(0,0,0,0.1); width: 100%; }
button:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.15); }
.btn-achat { background-color: white; color: var(--secondary); border: 2px solid var(--secondary); display: flex; justify-content: center; align-items: center; text-decoration: none; font-weight: 600; border-radius: 12px; font-size: 1.1em; transition: all 0.2s; }
.btn-achat:hover { background-color: #f9f9f9; }

/* Formulaires & Listes */
form { display: flex; flex-direction: column; gap: 20px; text-align: left; }
label { font-weight: 600; color: var(--secondary); margin-bottom: 8px; display: block; }
input { width: 100%; padding: 15px; border: 2px solid #eee; border-radius: 12px; font-size: 16px; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
input:focus { border-color: var(--primary); outline: none; }
.alert { padding: 15px; background-color: #ffeaea; color: #d63031; border-radius: 10px; margin-bottom: 20px; border-left: 5px solid #d63031; }
.history-list { list-style: none; padding: 0; }
.history-item { background: white; border: 1px solid #eee; margin-bottom: 10px; padding: 15px 20px; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; transition: transform 0.2s; }
.history-item:hover { transform: translateX(5px); border-color: var(--primary); }
.btn-delete { background: none; border: none; color: #ddd; font-size: 1.2em; padding: 0 10px; cursor: pointer; box-shadow: none; width: auto; }
.btn-delete:hover { color: #e74c3c; background: none; transform: none; box-shadow: none;}
/* --- NOUVEAU STYLE ACCUEIL V2 --- */

/* Le Mockup du Téléphone (CSS pur) */
.phone-mockup {
    width: 280px;
    height: 550px;
    background: #1a1a1a;
    border-radius: 40px;
    border: 8px solid #333;
    margin: 40px auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    overflow: hidden;
    transform: rotate(-3deg); /* Petite inclinaison stylée */
    transition: transform 0.3s ease;
}
.phone-mockup:hover { transform: rotate(0deg) scale(1.02); }

/* L'encoche (Notch) et boutons */
.phone-mockup::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 120px; height: 25px; background: #333; border-radius: 0 0 15px 15px; z-index: 2;
}

/* L'écran à l'intérieur */
.screen-content {
    background: #f4f1ea; height: 100%; width: 100%; padding-top: 40px;
    display: flex; flex-direction: column; align-items: center;
}

/* Faux éléments d'interface pour la démo */
.demo-header { width: 100%; padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; font-size: 0.8em; color: #8B4513; font-weight: bold; }
.demo-circle {
    width: 160px; height: 160px; border-radius: 50%;
    background: #27ae60; color: white; display: flex; flex-direction: column;
    justify-content: center; align-items: center; margin: 30px 0;
    box-shadow: 0 10px 20px rgba(39, 174, 96, 0.3);
}
.demo-btn { width: 80%; padding: 15px; background: #FFA500; border-radius: 12px; border: none; color: white; font-weight: bold; margin-bottom: 10px; box-shadow: 0 5px 10px rgba(255,165,0,0.2); }
.demo-list { width: 85%; background: white; border-radius: 10px; padding: 10px; margin-top: 10px; font-size: 0.7em; color: #555; }
.demo-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee; }

/* Section "Problème / Solution" */
.pain-points { padding: 60px 20px; background: white; text-align: center; }
.pain-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; max-width: 1000px; margin: 40px auto 0 auto; }
.pain-item { flex: 1 1 250px; text-align: left; }
.pain-icon { font-size: 2em; margin-bottom: 10px; display: block; }

/* Call to Action final */
.cta-section { background: var(--secondary); color: white; text-align: center; padding: 80px 20px; }
.cta-section h2 { color: white !important; }
/* --- NOTIFICATION SUCCÈS (POP-UP ÉPHÉMÈRE) --- */
.flash-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.85); /* Fond noir transparent */
    color: #FFA500; /* Orange Feu */
    padding: 30px 40px;
    border-radius: 20px;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    pointer-events: none; /* On peut cliquer au travers */
    
    /* L'animation : Apparaît, reste, puis disparaît */
    animation: fadeOutUp 2s forwards; 
}

@keyframes fadeOutUp {
    0% { opacity: 0; transform: translate(-50%, -40%) scale(0.8); }
    10% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    20% { transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; transform: translate(-50%, -50%); }
    100% { opacity: 0; transform: translate(-50%, -60%); visibility: hidden; }
}
