@import url('https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700');

/* ===== BASE ===== */

* {
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}




.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    display: flex;
    align-items: center;
    padding: 0 15px;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    font-size: 14px;
}


.header-right {
    flex: 1 1 0;
    min-width: 0; 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-left {
    flex: 1;
    display: flex;
    justify-content: center;   /* centre horizontalement l’ensemble */
    align-items: center;       /* centre verticalement */
    min-width: 0;
	
}


.header-left-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;   /* texte aligné à gauche */
	
}

.header-left .logo {
    height: 20px;
    margin-bottom: 2px;
}

.header-left .title {
    font-size: 13px;
    white-space: nowrap;
	
}




.header-center {
    flex: 0 0 auto;   
    text-align: center;
    white-space: nowrap;
}
.header-center button {
    margin: 0 5px;
    flex-shrink: 0;
}


.hint-text {
    font-size: 0.8em;
    font-style: italic;
    color: #4a6f8a; /* bleu/gris doux, cohérent avec ton thème */
}



body {
    margin: 0;
    background: radial-gradient(circle at top, #141a46, #0b0f2b);
    color: #ffffff;
	padding-top: 60px;
	top: 0 !important;
	
	
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("/XMLEditor/bg.jpg");
    background-size: cover;
    background-position: center;
    filter: blur(6px);
    z-index: -1;
    transform: scale(1.05); /* évite les bords visibles après flou */
}

/* Infos */

.modal-scroll {
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-content {
    overflow-y: auto;
    padding-right: 6px;
    margin-bottom: 15px;
    font-size: 0.95em;
    line-height: 1.5em;
	color: black;
}


/* ===== HEADER ===== */

header {
    background: linear-gradient(90deg, #ff4fd8, #8080ff);
    color: #0b0f2b;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

header h1 {
    margin: 0;
    font-weight: 700;
}

header p {
    margin: 5px 0 0 0;
    font-size: 0.95em;
    opacity: 0.9;
}

/* ===== CARTES PRINCIPALES ===== */

.card {
    background: #141a46;
    margin: 20px auto;
    padding: 20px;
    border-radius: 14px;
    width: 95%;
    max-width: 1200px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
}

.card h2 {
    margin-top: 0;
    color: #8080ff;
}

/* ===== FORMULAIRES ===== */


.form-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 10px;
    align-items: center;
}

.form-row label {
    width: 260px;          /* largeur fixe pour tous les labels */
    min-width: 260px;
    font-weight: 500;
    text-align: right;    /* optionnel : alignement propre */
    padding-right: 10px;
}

.form-row input,
.form-row select,
.form-row textarea {
    flex: 1;              /* tous les champs s’alignent verticalement */
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}


.form-row input::placeholder {
    color: #888;
}

.ecran-form,
.subsection form {
    background: rgba(255,255,255,0.6);
    padding: 10px;
    border-radius: 6px;
}




/* ===== TEXTAREA XML ===== */

textarea {
    width: 100%;
    height: 260px;
    font-family: monospace;
    background: #0b0f2b;
    color: #8080ff;
    border-radius: 8px;
    border: 1px solid #2a3180;
    padding: 10px;
}

/* ===== BOUTONS ===== */

button {
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #ff793e;
    color: #0b0f2b;
    font-weight: 600;
}

.btn-primary:hover {
    background: #ffa15a;
}


.btn-secondary {
    background: #da16e6;
    color: #0b0f2b;
    font-weight: 600;
}

.btn-secondary:hover {
    background: #de3fe8;
}


.btn-danger {
    background: #ff292c;
    color: white;
    padding: 4px 10px;
    font-size: 13px;
}

.btn-danger:hover {
    background: #ff4447;
}

/* ===== PAGE ===== */

.page-card {
    border: 1px solid #2a3180;
    margin: 14px 0;
    border-radius: 10px;
    background: #0b0f2b;
}

.page-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #da16e6;
    padding: 8px 12px;
    border-radius: 10px 10px 0 0;
    color: #0b0f2b;
}

.page-header h3 {
    margin: 0;
    font-weight: 600;
}

.page-name:hover {
  text-decoration: underline;
  color: #3b82f6;
}

/* ===== SOUS-SECTIONS ===== */

.subsection {
    margin: 15px 0;
    padding: 12px;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

/* ÉCRAN */
.subsection.ecran {
    background: #141a46;
    border-left: 5px solid #8080ff;
}

/* ENTRÉE */
.subsection.entree {
    background: #1a1446;
    border-left: 5px solid #ff4fd8;
}

/* ACTION */
.subsection.action {
    background: #2b1a14;
    border-left: 5px solid #ff793e;
}

.subsection h4 {
    margin-top: 0;
    font-size: 16px;
    color: #ffffff;
}

/* ===== LISTES ===== */

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #0b0f2b;
    border: 1px solid #2a3180;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.item-text {
    flex: 1;
    white-space: normal;
    color: #cfd3ff;
}

/* ===== PANNEAU AJOUT ÉCRAN ===== */

.ecran-add-panel {
    background: #141a46;
    border: 1px solid #2a3180;
    border-radius: 10px;
    padding: 10px;
    margin-top: 10px;
}

.ecran-add-panel h5 {
    margin: 0 0 8px 0;
    color: #8080ff;
}

.ecran-form {
    background: #0b0f2b;
    border: 1px solid #2a3180;
    border-radius: 8px;
    padding: 8px;
    margin-top: 8px;
}

/* ===== ERREURS ===== */

.input-error {
    border: 2px solid #ff4f4f !important;
    background: #2b1414;
}

.error-message {
    color: #ff8a8a;
    font-size: 0.85em;
}

/* ===== FOOTER ===== */

footer {
    text-align: center;
    padding: 12px;
    color: #cfd3ff;
    font-size: 0.85em;
}


.project-buttons .btn-primary {
  font-size: 1rem;
  padding: 10px 18px;
}

.custom-alert {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.custom-alert.hidden {
  display: none;
}

.custom-alert-box {
  background: white;
  padding: 20px 25px;
  border-radius: 12px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  text-align: center;
  animation: alertPop 0.2s ease-out;
}

.custom-alert-message {
  margin-bottom: 15px;
  font-size: 15px;
  color: #333;
}

@keyframes alertPop {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.custom-alert-box.error { border-left: 6px solid #dc2626; }
.custom-alert-box.success { border-left: 6px solid #10b981; }
.custom-alert-box.info { border-left: 6px solid #4a90e2; }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    width: 360px;
    max-width: 90%;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
	color: black;
}

.modal-box h3 {
    margin-top: 0;
    color: #3b82f6;
}

.modal-input {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
