/* =========================================
   1. GLOBAL & TYPOGRAPHY (ANIMATED BACKGROUND)
========================================= */

/* L'animation de mouvement */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    /* Le dégradé profond : Noir > Teal Sombre > Bleu Nuit > Noir */
    /* background: linear-gradient(-45deg, #0d1117, #0d2e2e, #163c46, #0d1117); */
    background: linear-gradient(-45deg, #050505, #163c46, #208a8b, #050505);
    background-size: 400% 400%;

    /* Animation lente */
    animation: gradientAnimation 15s ease infinite;

    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #c9d1d9; /* Texte clair par défaut partout */
    -webkit-font-smoothing: antialiased;

    min-height: 100vh; 
}

a {
  color: #38b2ac; /* Cyan clair pour ressortir sur le fond sombre */
  transition: color 0.2s ease;
}

a:hover {
  color: #ffffff;
  text-decoration: none;
}

/* =========================================
   2. NAVBAR (Navigation)
   ========================================= */
.navbar {
  background-color: #0d2e2e !important; /* Vert sombre */
  border: none;
  border-radius: 0;
  margin-bottom: 0;
  min-height: 60px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-header {
  display: flex;
  align-items: center;
  height: 60px;
}

.navbar-header > a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* Logo */
.logo-large {
  max-height: 32px;
  width: auto;
  margin-right: 15px;
}

/* Titre "Dashboard" avec séparateur */
.navbar-title {
  font-family: 'Arial', sans-serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: #e5f6f2 !important;
  border-left: 1px solid rgba(255, 255, 255, 0.2); 
  padding-left: 15px;
  height: 32px;
  line-height: 32px;
  display: inline-block;
}

.navbar-title:hover {
  color: #ffffff !important;
}

.navbar-nav > li > a {
  color: #e5f6f2 !important;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 30px;
}

.navbar-nav > li > a:hover {
  color: #fff !important;
  background-color: rgba(255,255,255,0.05) !important;
}

.user-info {
  color: #8ecbb4;
  margin-top: 20px;
  font-size: 1.3rem;
}

/* =========================================
   3. HERO SECTION (Transparent)
   ========================================= */
.jumbotron {
  background: transparent !important; /* Laisse voir le body */
  padding: 60px 0 20px 0;
  text-align: center;
  margin-bottom: 0 !important;
  border: none;
}

.jumbotron h1 {
  font-weight: 300;
  color: #ffffff;
  margin-top: 0;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Légère ombre pour lisibilité */
}

.jumbotron .lead {
  font-size: 1.8rem;
  color: #e6edf3;
  font-weight: 300;
  margin-top: 10px;
}

/* =========================================
   4. APP CARDS SECTION (Transparent Wrapper)
   ========================================= */

/* Le conteneur ne doit plus avoir de couleur de fond */
.apps-section-wrapper {
    width: 100%;
    background: transparent !important; /* IMPORTANT */
    border: none; /* Plus de bordures qui coupent l'écran */
    padding: 20px 0 60px 0;
    margin: 0;
}

#applist {
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 0 auto;
}

/* Titres en blanc */
.apps-section-wrapper h2, 
.apps-section-wrapper h4 {
    color: #ffffff !important;
    font-weight: 300;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* --- CARTES (On garde un fond sombre semi-transparent pour la lisibilité) --- */
.portfolio-item {
  display: flex;
  margin-bottom: 30px;
}

.card-box {
  width: 100%;
  /* Fond semi-transparent (Glassmorphism) */
  background: rgba(13, 46, 46, 0.2);
  backdrop-filter: blur(5px); /* Floute légèrement le fond derrière la carte */

  border: 1px solid rgba(255, 255, 255, 0.1); /* Bordure très fine */
  border-top: 4px solid #208a8b; /* L'accent reste */

  border-radius: 4px;  /* Bords arrondis */
  padding: 25px;
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: all 0.3s ease;
}

/*
rgba(13, 46, 46, 0.95);
rgba(13, 100, 98, 0.95);
rgba(32, 138, 139, 0.95);
*/

.card-box:hover {
  background: rgba(13, 46, 46, 0.8);
  transform: translateY(-5px);
  border-top-color: #CCA406 !important; 
  border-color: rgba(204, 164, 6, 0.5) !important;
  box-shadow: 0 15px 30px rgba(0,0,0,0.5), 0 0 15px rgba(255, 159, 67, 0.1);
}

/* ON CACHE LES IMAGES */
.image-box {
  display: none !important;
}

.card-box h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #f0f6fc;
  margin-top: 0;
  margin-bottom: 10px;
}
.card-box:hover h3 {
    color: #CCA406 !important;
    transition: color 0.3s ease;
}

.card-box p {
  font-size: 1.4rem;
  color: #8ecbb4;
  line-height: 1.5;
  margin-bottom: 25px;
  flex-grow: 1;
}

/* Bouton adapté au fond animé */
.card-box .btn {
  margin-top: auto;
  /* background-color: transparent !important; */
  background-color: rgba(56, 178, 172, 0.2) !important; /* Fond Cyan très transparent */
  border: 1px solid #38b2ac !important;
  color: #e6edf3 !important;
  font-weight: 500;
  border-radius: 4px;
  padding: 8px 12px;
  transition: all 0.2s;
  text-transform: uppercase;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

.card-box .btn:hover {
  background-color: #CCA406 !important; /* Fond Orange */
  color: #fff !important; /* Texte Blanc */
  border-color: #CCA406 !important;
  box-shadow: 0 0 15px rgba(204, 164, 6, 0.6); /* Glow Orange intense */
}

/* =========================================
   5. ALERTS & PANELS
========================================= */

/*
.alert-info {
  background-color: rgba(240, 240, 248, 0.8) !important;
  border: 1px solid rgba(188, 232, 241, 0.8) !important;
  border-left: 4px solid #31708f;
  color: #31708f;
  border-radius: 4px;
  padding: 15px 20px;
  font-size: 1.4rem;
}

.alert-link {
  font-weight: 600;
  text-decoration: underline;
  color: #208a8b;
}
*/

/* Intégration de l'alerte au thème sombre */
.alert-info {
    background-color: rgba(32, 138, 139, 0.6); /* Teal très transparent */
    border-color: #208a8b;
    color: #bce8f1; /* Texte bleu clair */
}

.alert-info strong {
    color: #ff9f43; /* Mettre "Current Plan: Free" en orange/jaune */
}

.alert-link {
    color: #ffffff !important;
}


/* === ACCORDÉON (PANEL) STYLISÉ === */
.panel-group .panel {
    background-color: rgba(21, 27, 35, 0.8) !important;
    border-radius: 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin-bottom: 15px !important;
    overflow: hidden; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.panel-heading {
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-title {
    margin: 0 !important;
}

/* --- LE TITRE ET L'ANGLE --- */
.panel-title a {
    display: block;
    padding: 20px 10px 5px 40px;
    background-color: transparent !important;
    font-size: 2.0rem;
    color: #e6edf3 !important;
    text-decoration: none;
    position: relative;
    /* La bordure est là, invisible, donc elle prend de la place */
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.panel-default > .panel-heading {
    background-color: transparent !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

/* --- ETAT SURVOL (HOVER) --- */
.panel-title a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #CCA406 !important;
    /* On change juste la couleur, le texte ne bouge pas */
    border-left-color: #CCA406; 
}

/* --- ETAT OUVERT (CLICK) --- */
.panel-title a[aria-expanded="true"] {
    background-color: rgba(204, 164, 6, 0.1); /* Version très transparente du jaune */
    color: #CCA406 !important;
    border-left-color: #CCA406;
    font-weight: 500;
}

/* --- LA FLÈCHE (CHEVRON) --- */
.panel-title a::before {
    font-family: 'Glyphicons Halflings';
    content: "\e080"; 
    position: absolute;
    left: 15px; 
    top: 24px;
    font-size: 1.2rem;
    color: #6e7681; 
    transition: all 0.3s ease;
}

.panel-title a:hover::before {
    color: #CCA406; 
}

.panel-title a[aria-expanded="true"]::before {
    transform: rotate(90deg);
    color: #CCA406;
}

/* --- DESCRIPTION ET FUSION --- */
.panel-description {
    padding: 0 30px 20px 40px; 
    border-left: 4px solid transparent; 
    transition: all 0.3s ease;
    margin-top: 0;
}

.panel-description p {
    color: #bce8f1 !important; 
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
    margin: 0;
    line-height: 1.5;
}

/* EFFET DE GROUPE (SURVOL) */
.panel-heading:hover .panel-title a,
.panel-heading:hover .panel-description {
    color: #CCA406 !important;
    border-left-color: #CCA406;
}
.panel-heading:hover .panel-title a {
    background-color: rgba(255, 255, 255, 0.02);
}

/* EFFET DE GROUPE (OUVERT) */
.panel-heading:has(.panel-title a[aria-expanded="true"]) .panel-description {
    border-left-color: #CCA406;
}

.panel-body {
  border-top: none !important;
  padding-top: 15px;
  /* background: transparent; */
  background-color: rgba(21, 27, 35, 0.7);
}

/* =========================================
   6. MISC & FOOTER
   ========================================= */
/* Loading Image 
.loading-img {
    background-image: url('../img/loading.gif');
    background-repeat: no-repeat;
    background-position: center;
    text-indent: -9999px;
    font-size: 0;
    width: 60px;
    height: 60px;
    margin: 40px auto;
    opacity: 0.6;
}

.loading-txt {
  text-align: center;
  font-size: 1.6rem;
  color: #555;
  margin-bottom: 20px;
}
  */
/* === CUSTOM LOADING SCREEN === */
.loading {
    background-color: transparent !important; /* On laisse l'app respirer */
    box-shadow: none !important;

    position: absolute !important; /* Absolute au lieu de Fixed évite le crash */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;

    text-align: center;
    width: auto;
    height: auto;
}

.loading-txt {
    color: #e6edf3 !important;
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-top: 30px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Ombre pour lisibilité sur fond coloré */
    margin-bottom: 0;
    display: block;
}

/* 3. LE SPINNER CARRÉ */
.loading-img {
    background-image: none !important;
    border: none !important;
    display: inline-block;
    margin: 0 auto;
    border-radius: 0 !important;

    width: 50px;
    height: 50px;

    background-color: #208a8b; /* Départ Teal */

    animation: rotateplane 1.2s infinite ease-in-out;
}

/* Nettoyage complet des anciens styles */
.loading-img::before, .loading-img::after {
    display: none !important;
    content: none !important;
}

/* ANIMATION */
@keyframes rotateplane {
    0% {
        transform: perspective(120px) rotateX(0deg) rotateY(0deg);
        background-color: #208a8b;
    }
    50% {
        transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
        background-color: #CCA406; /* Milieu Or */
    }
    100% {
        transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
        background-color: #208a8b; 
    }
}
/* =========================================
   7. BOUTONS & FOOTER
   ========================================= */

.btn-primary {
  background-color: #208a8b !important;
  border-color: #208a8b !important;
}

.btn-primary:hover {
  background-color: #135568 !important;
  border-color: #135568 !important;
}

.btn-danger {
  background-color: #fff !important;
  color: #d9534f !important;
  border: 1px solid #d9534f !important;
}

.btn-danger:hover {
  background-color: #d9534f !important;
  color: #fff !important;
}

.footer {
  background-color: rgba(0,0,0,0.2); 
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 30px 0;
  margin-top: 0;
  font-size: 1.3rem;
  color: #b5b7b9;
}

.footer a {
  color: #b5b7b9;
  margin: 0 10px;
}

.footer a:hover {
  color: #ffffff;
}