/* ===== VARIABLES ET BASE ===== */
:root {
    /*--primary: #1F1B6E;*/
    --primary: #F442A3;
    --green: green;
    --primary-dark: #1e40af;
    --accent: #f59e0b;
    --danger: #ef4444;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}


body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: var(--bg);
    color: var(--text-main);
    font-family: Arial, sans-serif;
    background-image: url('/biblio-app/assets/icons/background/background_1.png');
    overscroll-behavior-y: contain; /* Empêche le pull-to-refresh */
}

.container {
    width: 100%;
    height: 100%;
    padding: 7px;
    background-image: url('/biblio-app/assets/icons/background/background_1.png');
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap; /* Permet le passage à la ligne suivante */
    gap: 20px; /* Espace entre les structures */
    overflow-y: auto; /* Permet le défilement vertical */
}

.structure {
    width: 100%; /* Largeur fixe */
    height: 100%;
    padding: 2px;
    
    border: 3px dashed green;
    
    border-radius:5px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background:none;
}

.header {
    width: 100%;
    height: 60px;
    background-color: cyan;
    border-bottom: 1px solid #ccc;
    padding: 10px 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative; /* Pour le positionnement absolu si nécessaire */
}

/* Conteneur pour le logo et le nom de l'application */
.app-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    /* Pas de position absolue, le flex s'en charge */
}

/* Logo de l'application */
.app-logo {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

/* Nom de l'application */
.app-name {
    font-size: 16px;
    font-weight: bold;
    color: #F442A3;
    white-space: nowrap; /* Évite le retour à la ligne */
}

/* Sélecteur de langue - version LTR (par défaut) */
.language-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    order: 0; /* Ordre normal en LTR */
    
}

.language-dropdown {
    padding: 5px 10px;
    border: 1px solid #F442A3;
    border-radius: 15px;
    background-color: white;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    min-width: 90px; /* Largeur minimum pour éviter les changements de taille */
}

.language-dropdown:hover {
    border-color: #c03582;
}

.language-dropdown:focus {
    box-shadow: 0 0 3px #F442A3;
}

/* Placeholder pour équilibrer (optionnel) */
.placeholder {
    width: 100px; /* Ajustez selon la largeur du sélecteur */
    visibility: hidden; /* Cache mais maintient l'espace */
}

/* ===== STYLES LTR (par défaut - français, anglais) ===== */
[dir="ltr"] .language-selector {
    order: 0; /* À gauche */
    margin-right: auto; /* Pousse vers la gauche */
}

[dir="ltr"] .app-info {
    order: 0; /* Au centre */
    flex: 1; /* Prend l'espace disponible */
    text-align: center;
}

[dir="ltr"] .placeholder {
    order: 2; /* À droite */
}

/* ===== STYLES RTL (arabe) ===== */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .header {
    flex-direction: row; /* Garde la direction flex en row */
}

[dir="rtl"] .language-selector {
    order: 2; /* Passe à droite */
    margin-left: auto; /* Pousse vers la droite */
    margin-right: 0;
}

[dir="rtl"] .app-info {
    order: 0; /* Reste au centre */
    flex: 1;
}

[dir="rtl"] .placeholder {
    order: 0; /* Passe à gauche */
    visibility: hidden;
}


.footer {
    width: 100%;
    height: 60px;
    background-color: cyan;
    border-top: 1px solid #ccc;
    padding: 2px;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center; /* Centrer horizontalement */
    justify-content: center; /* Centrer verticalement */
    gap: 3px; /* Espace entre les éléments */
}

/* Icône du footer */
/* ===== FOOTER ICON CONTAINER ===== */
#footer-icon-left {
    width: calc(100% - 50px);
    display: flex;
    justify-content: space-around;
    align-items: center;
}

/* ===== BOUTONS ICONES ===== */
.footer-icon-left-btn {
    width: 50px;
    height: 50px;
    background-color: #ffffff;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.12);
    cursor: pointer;
    transition: all 0.25s ease;
}

/* Icône */
.footer-icon-left-btn i {
    font-size: 22px;
    color: #1F1B6E;
}

/* Texte */
.footer-icon-left-btn div {
    font-size: 11px;
    font-weight: 500;
    color: #333;
}

/* Hover / Active */
.footer-icon-left-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.18);
    background-color: #f5f6ff;
}

/* Bouton actif */
.footer-icon-left-btn.active {
    background-color: #1F1B6E;
}

.footer-icon-left-btn.active i,
.footer-icon-left-btn.active div {
    color: #fff;
}
.header h1 {
    margin: 0;
    font-size: 18px;
}

.header p {
    margin: 5px 0;
    font-size: 14px;
}

.content {
    display: flex;
    width: 100%;
    background:none;
    
    height: calc(100% - 60px - 20px - 43px); /* Prend 100% de la largeur - hauteur de(header et condition d'utilisation et footer) */
}

/* Styles pour la section left */

.left {
    width: calc(100%); /* Prend 100% de la largeur moins 50px */
    background-image: url('/biblio-app/assets/icons/background/background_1.png');
    overflow: none; /* Permet le défilement vertical */
    padding: 0px; /* Espacement interne */
    box-sizing: border-box;
   
}

/* Barre de recherche */
.search-bar {
    position: relative;
    width: calc(100% -5px);
    height: 40px;
    border: 1.3mm ridge rgba(211, 220, 50, .6);
    border-radius: 5px;
    margin-bottom: 5px;
    background: rgba(220, 180, 40, 0.6);
    display: flex;
    align-items: center;
}
.search-bar .ramda-service-delegue {
    position: absolute;
    right: 0;
    width: 120px;
    height: 40px;
    background:rgba(211, 220, 50, .8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size:10px;
    flex-direction: column;
}
.search-bar .ramda-reseau {
    position: absolute;
    right: 125px;
    width: 80px;
    height: 40px;
    background:rgba(211, 220, 50, .8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size:10px;
    flex-direction: column;
}
.search-bar img {
    width: 25px;
    height: 25px;
}
.search-input {
    width: 100%;
    height: 40px;
    background: white;
    padding: 0 40px; /* Espace pour les icônes gauche et droite */
    font-size: 16px;
    border: 1.3mm ridge rgba(211, 220, 50, .6);
    border-radius: 5px;
    box-sizing: border-box;
    z-index:1;
    
}

.back-icon {
    position: absolute;
    left: 2px;
    width: 35px;
    height: 33px;
    background: rgba(211, 220, 50, .8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    z-index: 9999;
}

.filter-icon {
    position: absolute;
    right: 0;
    width: 35px;
    height: 33px;
    background: rgba(211, 220, 50, .8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    z-index:2;
    
}

.back-icon i,
.filter-icon i {
    color: white;
    font-size: 22px;
}

/* Effets au survol */
.back-icon:hover {
    background: rgba(211, 220, 50, .8);
}

.filter-icon:hover {
    background: rgba(211, 220, 50, .8);
}





/* Section des icônes */
.main-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    background:none;
    padding: 0px;
    height: calc(100% - 40px - 25px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #F442A3 #f8f8f8;
    position: relative;
       
}

/* Conteneur des boutons flottants */
.floating-actions-main {
    position: absolute;
    height:auto;
    bottom: 80px; /* Marge depuis le bas */
    left: 50%;
    transform: translateX(-50%); /* Centre horizontalement seulement */
    display: flex;
    gap: 20px;
    z-index: 5;
    background-color: rgba(255, 255, 255, 0.7); /* Fond légèrement visible */
    padding: 3px 10px;
    border-radius: 10px; /* Forme ovale */
    backdrop-filter: blur(5px); /* Effet de flou sur le fond */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Ombre subtile */
}


/* Style pour les boutons désactivés */
.element-disabled, .element-disabled * {
    pointer-events: none !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: rgba(0,0,0,0.95); !important; /* ou rgba(0, 0, 0, 0.1) */
  color: #888 !important; /* Texte aussi estompé */
}





.footer-actions {
    display: flex;
    width: calc(100% - 10px);
    height: 40px;
    justify-content: center;
    gap: 5px;
    align-items: center;
    background: rgba(220, 180, 40, 0.6);
    padding: 0 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    bottom:0px;
    overflow-x:auto;
}
.footer-actions .btn-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /*width: 75px;*/
    height: 25px;
    background-color: transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
}

.footer-actions .btn-actions:hover {
    background-color: rgba(244, 66, 163, 0.2);
}

.footer-actions .btn-actions i {
    font-size: 20px;
    color: #F442A3;
    margin-bottom: 0px;
}

.footer-actions .btn-actions .footer-actions-label {
    font-weight: 500;
    color: #555;
    font-size: 12px;
    text-align: center;
    padding:2px;
}


/* Style du conteneur fullscreen personnalisé */
.fullscreen-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index:9999;
}

.fullscreen-wrapper img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}



/* Bouton de fermeture */
.fullscreen-close {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  color: white;
  border-radius:5px;
  background-color:white;
  cursor: pointer;
  z-index: 10000;
}
.fullscreen-close i {
  font-size: 30px;
  color: #F442A3; 
}

.fullscreen-icon {
  position: absolute;
  top: 0;
  right: 0;
  width: 25px;
  height: 25px;
  background-image: url('/biblio-app/assets/icons/background/background_1.png');
  background-color: rgba(220, 180, 40, 0.6);
  color: white;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-icon i {
  font-size: 24px; 
}

.nav-arrow {
  position: absolute;
  z-index: 10001;
  color: white;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  transition: background-color 0.3s;
}

.nav-arrow:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.left-arrow { left: 10px; top: 50%; transform: translateY(-50%); }
.right-arrow { right: 10px; top: 50%; transform: translateY(-50%); }
.up-arrow { top: 10px; left: 50%; transform: translateX(-50%); }
.down-arrow { bottom: 10px; left: 50%; transform: translateX(-50%); }

.container-footer-actions-fullscreen {
    display: flex;
    flex-direction: column;
    position:absolute;
    width: 200px;
    height: 40px;
    justify-content: center;
    align-items: center;
    bottom: 80px; /* Marge depuis le bas */
    left: 50%;
    transform: translateX(-50%); /* Centre horizontalement seulement */
    gap: 20px;
    z-index: 5;
    background-image: url('/biblio-app/assets/icons/background/background_1.png');
    padding: 3px 10px;
    border-radius: 10px; /* Forme ovale */
    backdrop-filter: blur(5px); /* Effet de flou sur le fond */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Ombre subtile */
}
.footer-actions-fullscreen {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-direction: row;
    width: 100%;
    height: 100%;
    align-items: center;
    background: rgba(220, 180, 40, 0.6);
    padding: 0 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow-x:auto;
}
.footer-actions-fullscreen .image-counter {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 20px;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.8);
    border: 2px dashed #F442A3;
    border-radius: 5px;
    padding: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.footer-actions-fullscreen .btn-actions {
    display: flex;
    flex-direction: column;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.8);
    border: 2px dashed #F442A3;
    border-radius: 10px;
    padding: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.footer-actions-fullscreen .btn-actions:hover {
    background-color: rgba(244, 66, 163, 0.1);
    border-color: #d41b7a;
}

.footer-actions-fullscreen .btn-actions i {
    font-size: 20px;
    color: #F442A3;
    margin-bottom: 0px;
}

.footer-actions-fullscreen .btn-actions .footer-actions-label {
    font-weight: 500;
    color: #555;
    font-size: 12px;
    text-align: center;
    padding:2px;
}


.hidden {
    display: none;
}



/* Icône fullscreen */
.fullscreen-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a90e2;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.menu-item:hover .fullscreen-icon {
    opacity: 1;
    transform: scale(1);
}

.fullscreen-icon:hover {
    background: #4a90e2;
    color: white;
    transform: scale(1.1) rotate(90deg);
}


