/**
 * DOBBLAMA - Styles CSS
 * Refactorisé pour cohérence avec HTML et script en français
 * NOTE : Certaines classes mixtes (EN + FR) pendant transition
 */

* { box-sizing: border-box; }

@font-face {
  font-family: 'Belle Allure GS';
  src: url('fonts/BelleAllureGS-Gros.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Belle Allure Script';
  src: url('fonts/BelleAllureScript3i-Gros.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

body { 
  margin: 0; 
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif; 
  color: #0f172a; 
  background: radial-gradient(120% 120% at 10% 20%, #f3f9ff, #e7f7f1 40%, #fdf4ea 75%); 
}

/* ===== EN-TÊTE ===== */
.en_tete {
  background: linear-gradient(135deg, #0ea37a 0%, #058e9a 100%);
  color: white;
  padding: 32px clamp(18px, 4vw, 64px);
  text-align: center;
}

.en_tete__contenu { max-width: 1200px; margin: 0 auto; }

.logo_principal {
  width: 300px;
  height: auto;
  margin: 0 auto 12px;
  display: block;
  border-radius: 8px;
  background: white;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.titre_principal { margin: 0; font-size: clamp(28px, 5vw, 44px); line-height: 1.1; }
.sous_titre { margin: 8px 0 0 0; color: rgba(255,255,255,0.9); font-size: 16px; }

/* ===== PANNEAU PRINCIPAL ===== */
.panneau_principal { max-width: 1200px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 64px); }

/* ===== SECTION HERO ===== */
.hero { 
  display: block; 
  padding: 56px 0 40px 0;
}

.hero__texte { display: flex; flex-direction: column; justify-content: center; }
.hero__texte h2 { margin: 8px 0 12px; font-size: clamp(28px, 5vw, 44px); line-height: 1.1; }
.hero__texte .lede { color: #475569; line-height: 1.6; }

.hero__demo { display: flex; justify-content: center; }

.logo_demo {
  width: 240px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(14,163,122,0.25);
  object-fit: contain;
}

.etiquette { 
  letter-spacing: 0.08em; 
  font-size: 12px; 
  text-transform: uppercase; 
  color: #0ea37a; 
  margin: 0; 
  font-weight: 600; 
}

.actions { 
  display: flex; 
  gap: 12px; 
  margin-top: 18px; 
  flex-wrap: wrap;
}

.zone_import_container {
  margin-top: 20px;
  width: 100%;

.zone_textes_container {
  margin-top: 20px;
  width: 100%;
}

.controle_inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.controle_input {
  display: grid;
  gap: 8px;
}

.controle_input label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.controle_input input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 15px;
  background: #f8fafc;
  font-family: inherit;
}

.controle_select {
  display: grid;
  gap: 8px;
  min-width: 150px;
}

.controle_select label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.controle_select select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 15px;
  background: #f8fafc;
  font-family: inherit;
}

.petite_note {
  margin: 4px 0 0;
  font-size: 13px;
}

/* ===== AVERTISSEMENT CONFIGURATION ===== */
.avertissement_config {
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: 12px;
  color: #991b1b;
  font-size: 14px;
  margin: 0 0 16px 0;
  font-weight: 500;
}

.avertissement_config[hidden] { display: none; }

/* ===== BANNIÈRE NOUVEAUTÉS (inline sous le header) ===== */
.banniere_nouveautes__bouton {
  display: flex;
  justify-content: center;
  width: 100%;
  text-align: center;
  margin: 20px 0 12px 0; /* petit espace avant la bannière */
}

.banniere_nouveautes[hidden] { display: none; }
.banniere_nouveautes {
  background: #fff;
  margin: 28px 0 0 0;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 16px clamp(18px, 4vw, 48px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.banniere_nouveautes__titre {
  margin: 0 0 6px 0;
  font-size: 18px;
}

.banniere_nouveautes__message {
  color: #334155;
  line-height: 1.6;
}

.banniere_nouveautes__message p { margin: 6px 0; }
.banniere_nouveautes__message ul { margin: 8px 0 0 18px; }
.banniere_nouveautes__message li { margin: 4px 0; }

.banniere_nouveautes__actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.banniere_nouveautes__check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475569;
}

/* ===== MODALE NOUVEAUTÉS ===== */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 1000; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.45); }
.modal__dialog { 
  position: relative; 
  width: min(640px, calc(100% - 32px)); 
  margin: 10vh auto; 
  background: #fff; 
  border-radius: 16px; 
  padding: 20px 20px 16px; 
  box-shadow: 0 30px 80px rgba(15,23,42,0.35);
}
.modal__dialog h3 { margin: 0 0 8px; }
.modal__content { color: #334155; line-height: 1.6; }
.modal__content p { margin: 8px 0; }
.modal__check { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: #475569; }
.modal__actions { display: flex; justify-content: flex-end; margin-top: 12px; }
}

/* ===== BOUTONS ===== */
.bouton { 
  border: none; 
  border-radius: 999px; 
  padding: 10px 16px; 
  font-weight: 600; 
  cursor: pointer; 
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease; 
  font-size: 14px;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.bouton--principal { 
  background: #0ea37a; 
  color: #fff; 
  box-shadow: 0 10px 24px rgba(14,163,122,0.25); 
}

.bouton--principal:hover { 
  transform: translateY(-1px); 
  box-shadow: 0 14px 28px rgba(14,163,122,0.26); 
}

.bouton--secondaire { 
  background: #e2f5ed; 
  color: #0b8a64; 
}

.bouton--secondaire:hover {
  background: #d1f0e0;
}

.bouton--petit { 
  padding: 8px 12px; 
  font-size: 13px;
}

.bouton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== ZONE CONTRÔLES ===== */
.zone_controles { 
  background: #fff; 
  margin: 64px 0; 
  border: 1px solid #e2e8f0; 
  border-radius: 24px; 
  padding: 24px clamp(18px, 4vw, 48px) 32px; 
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06); 
}

.zone_controles h2 { margin: 0 0 24px 0; }

.zone_controles > * + * { margin-top: 18px; }

.zone_controles > :first-child:not(h2) {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.controle { 
  display: grid; 
  gap: 8px; 
}

.controle label { 
  display: block; 
  font-weight: 600; 
  margin-bottom: 6px; 
}

.controle select, 
.controle input[type="range"], 
.controle input[type="color"],
.controle input[type="text"] { 
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 15px;
  background: #f8fafc;
  font-family: inherit;
}

.controle input[type="color"] {
  height: 44px;
  cursor: pointer;
  padding: 4px;
}

.ligne_curseur { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
}

#taille_carte { accent-color: #0ea37a; }

.texte_aide { 
  color: #64748b; 
  margin: 4px 0 0; 
  font-size: 14px; 
}

.texte_aide.compact { 
  margin: 0; 
  font-size: 13px; 
}

/* ===== ZONE DE DÉPÔT ===== */
.zone_depot { 
  border: 1.5px dashed #94a3b8; 
  border-radius: 14px; 
  padding: 14px; 
  min-height: 72px; 
  background: #f8fafc; 
  color: #475569; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  text-align: center;
  transition: all 120ms ease;
}

.zone_depot.is-dragging { 
  background: #e2f5ed; 
  border-color: #0ea37a; 
  border-style: solid;
}

/* ===== LISTE DE FICHIERS ===== */
.liste_fichiers { 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
  margin-top: 10px; 
}

.fichier_pilule { 
  padding: 6px 10px; 
  background: #e2f5ed; 
  color: #0b8a64; 
  border-radius: 12px; 
  font-size: 13px; 
  display: inline-flex; 
  align-items: center; 
  gap: 6px; 
}

.fichier_pilule button { 
  border: none; 
  background: transparent; 
  cursor: pointer; 
  color: #0b8a64; 
  font-weight: 600; 
  padding: 0; 
  margin: 0 -4px 0 4px;
  font-size: 16px;
  line-height: 1;
}

.fichier_pilule button:hover {
  color: #058e9a;
}

/* ===== SECTION SORTIES ===== */
.section_sorties { 
  background: #fff; 
  margin: 64px 0; 
  border: 1px solid #e2e8f0; 
  border-radius: 24px; 
  padding: 24px clamp(18px, 4vw, 48px) 32px; 
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06); 
}

.en_tete_sorties { 
  display: flex; 
  justify-content: space-between; 
  align-items: flex-start; 
  gap: 12px; 
  margin-bottom: 24px; 
  flex-wrap: wrap; 
}

.en_tete_sorties h2 { margin: 0 0 8px 0; }

.actions_sorties { 
  display: flex; 
  gap: 10px; 
  flex-wrap: wrap; 
  align-items: center; 
}

.actions_sorties select { 
  padding: 8px 10px; 
  border-radius: 10px; 
  border: 1px solid #cbd5e1; 
  background: #f8fafc; 
  font-weight: 600;
  font-size: 14px;
}

/* ===== CONTENEUR CARTES ===== */
.conteneur_cartes { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
  gap: 16px; 
  margin-top: 16px; 
}

/* ===== CARTES GÉNÉRÉES ===== */
.carte { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 12px; 
  padding: 8px; 
  background: transparent; 
  box-shadow: none; 
  color: #0f172a; 
}

.carte__symboles { 
  position: relative; 
  width: 100%; 
  aspect-ratio: 1; 
  border-radius: 16px; 
  overflow: hidden; 
  background: linear-gradient(135deg, #f9fafb 0%, #eef5ff 100%); 
  border: 12px solid var(--couleur-contour, #0ea37a); 
  box-shadow: 0 16px 30px rgba(6, 95, 70, 0.12); 
}

.carte__symboles img { 
  position: absolute; 
  transform-origin: center; 
  object-fit: contain; 
  filter: drop-shadow(0 3px 6px rgba(15,23,42,0.18)); 
  z-index: 1;
}

.carte__symboles img[data-type="texte"] {
  z-index: 2;
}

.carte__badge { 
  position: absolute; 
  top: 12px; 
  left: 12px; 
  width: 54px; 
  height: 54px; 
  border-radius: 50%; 
  background: var(--couleur-contour, rgba(14,163,122,0.9)); 
  color: #fff; 
  display: grid; 
  place-items: center; 
  font-weight: 700; 
  box-shadow: 0 8px 20px rgba(14,163,122,0.28); 
  font-size: 18px;
  z-index: 10;
}

.carte__etiquette_anneau { 
  position: absolute; 
  bottom: 12px; 
  width: calc(100% - 24px); 
  left: 12px; 
  text-align: center; 
  color: rgba(0,0,0,0.55); 
  font-weight: 600; 
  font-size: 12px; 
  letter-spacing: 0.08em; 
  text-transform: uppercase; 
  pointer-events: none; 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis;
  z-index: 10;
}

.carte .bouton { 
  position: static; 
  align-self: center; 
  margin-top: 8px;
}

/* ===== PIED DE PAGE ===== */
.pied_de_page {
  background: #0f172a;
  color: #f9fafb;
  padding: 32px clamp(18px, 4vw, 64px);
  margin-top: 64px;
  border-top: 1px solid #1e293b;
}

.contenu_pied {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
}

.bloc_pied { line-height: 1.8; }
.bloc_pied p { margin: 8px 0; font-size: 14px; }
.bloc_pied a { 
  color: #0ea37a; 
  text-decoration: none;
  font-weight: 600;
}
.bloc_pied a:hover { 
  text-decoration: underline; 
}

.credit { margin: 0; }
.licence { margin: 8px 0 0 0; font-size: 13px; color: #94a3b8; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero { 
    grid-template-columns: 1fr; 
    padding-top: 28px;
    padding-bottom: 28px;
  }
  
  .hero__demo { 
    order: -1;
    margin-bottom: 24px;
  }
  
  .en_tete_sorties {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .actions_sorties {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .en_tete {
    padding: 24px 16px;
  }
  
  .panneau_principal {
    padding: 0 16px;
  }
  
  .carte_demo {
    width: 200px;
  }
  
  .actions {
    flex-direction: column;
    width: 100%;
  }
  
  .actions .bouton {
    width: 100%;
  }
  
  .zone_controles {
    grid-template-columns: 1fr;
  }
  
  .actions_sorties {
    flex-direction: column;
    width: 100%;
  }
  
  .actions_sorties .bouton {
    width: 100%;
  }
  
  .conteneur_cartes {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
  
  .contenu_pied {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
