/* File: language.css - Vertical flag pole language selector
 * Desc: En français, dans l'architecture, je suis le style pour le sélecteur de langues vertical style "levée de drapeau"
 * Version 1.0.0 (Création initiale)
 * Author: DNAvatar.org - Arnaud Maignan
 * Date: [December 16, 2024] [02:15 UTC+1]
 * Logs:
 *   - Created vertical flag pole language selector styles
 *   - Added flag raising animation
 *   - Integrated with Anselme Lanturlu red theme
 */

/* === CONTAINER PRINCIPAL === */

/* === PÔLE EN BLANC === */
.flag-pole {
  width: 4px;
  height: calc(var(--header-height) * 0.9);
  background: linear-gradient(90deg, #FFFFFF, #F8F8F8, #FFFFFF);
  border-radius: 2px;
  position: relative;
  z-index: 1; /* Mât en arrière-plan */
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  border: 1px solid #E0E0E0;
  /* Effet de perspective : parallélogramme plus fin en haut */
  transform: skewX(-2deg);
  transform-origin: bottom center;
}

/* Pompon blanc en haut */
.flag-pole::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border: 1px solid #E0E0E0;
}

/* Effet de texture métal */
.flag-pole::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.5) 2px,
    rgba(255, 255, 255, 0.5) 4px
  );
  border-radius: 4px;
}

/* === DRAPEAUX === */
.flag {
  position: absolute;
  /* pas de height fixe — le bouton s'adapte au contenu emoji, pas de zone morte */
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}



/* Positionnement des drapeaux - SUPPRIMÉ pour éviter conflits avec JS */
/* Les positions, tailles et décalages sont maintenant gérés entièrement par le JavaScript */



/* Styles du drapeau sélectionné - SUPPRIMÉ pour éviter conflits avec JS */
/* Les tailles et décalages sont maintenant gérés entièrement par le JavaScript */

/* === CLASSES DE RANG PERSPECTIVE === */
/* Rang 0 : sélectionné — z-index le plus bas, décalé à gauche, scale géré par JS */
.flag.rank-0 {
  z-index: 1;
  margin-left: 16px; /* desktop uniquement */
}
.touch-device .flag.rank-0,
.small-screen .flag.rank-0 {
  margin-left: 0;
}
.flag.rank-0 .flag-emoji {
  font-size: 2.5em !important;
  margin-left: -13px;
}

/* Rang 1 */
.flag.rank-1 { z-index: 2; }
.flag.rank-1 .flag-emoji {
  font-size: 1.7em !important;
  margin-left: 0 !important;
}

/* Rang 2 */
.flag.rank-2 { z-index: 3; }
.flag.rank-2 .flag-emoji {
  font-size: 1.5em !important;
  margin-left: 0 !important;
}

/* Rang 3 */
.flag.rank-3 { z-index: 4; }
.flag.rank-3 .flag-emoji {
  font-size: 1.3em !important;
  margin-left: 0 !important;
}

/* Rang 4 : Drapeau le plus bas — z-index le plus haut (devant tous) */
.flag.rank-4 { z-index: 5; }
.flag.rank-4 .flag-emoji {
  font-size: 1.2em !important;
  margin-left: 0 !important;
}

/* === TOUCH PICKER === */
#lang-touch-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 20;
  padding: 0;
}

#lang-touch-sheet {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
#lang-touch-sheet.open { display: flex; }

#lang-touch-sheet .lang-sheet-inner {
  background: #1a1a2e;
  border: 2px solid #8B0000;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 200px;
}

#lang-touch-sheet .lang-sheet-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 1.8em;
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}
#lang-touch-sheet .lang-sheet-btn.selected {
  border-color: #DC143C;
  background: rgba(139,0,0,0.3);
}
#lang-touch-sheet .lang-sheet-name {
  font-size: 0.55em;
  opacity: 0.8;
}

/* Ombre nette pour le drapeau sélectionné */
.flag.selected {
  filter: drop-shadow(3px 3px 4px rgba(0, 0, 0, 0.8));
}

/* Ombre nette autour du drapeau (pas à gauche) */
.flag {
  filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.7));
}

/* Pas de transition CSS - tout géré en JavaScript */

/* === EFFETS HOVER === */
/* Effet de rollover supprimé */

/* === INDICATEUR DE SÉLECTION === */
/* Étoile retirée du drapeau sélectionné */

/* === INTÉGRATION AVEC LE THÈME ANSELME === */
.language-selector.anselme-theme {
  background: linear-gradient(135deg, #8B0000, #DC143C);
  border-color: #4A0000;
}



/* === ANIMATION D'ENTRÉE === */
/* Animation d'entrée supprimée */ 