/* ======================================================
   main.min.css - Fichier CSS combiné pour ImprimeZen3D Calculator
   - Remplace layout.css, forms.css, buttons.css, responsive.css, typography.css
   - Inclut les styles inline précédents
   **ACTION REQUISE**: Copiez/Collez le contenu de vos anciens fichiers CSS
                     dans les sections appropriées ci-dessous.
   **ACTION REQUISE**: Minifiez ce fichier pour la production.
   ====================================================== */

/* 1. Variables Globales (:root) et Reset/Normalisation de base */
:root {
  --primary: #3a86ff;
  --primary-dark: #2667cc;
  --primary-light: #e6f0ff;
  --light: #f8f9fa;
  --dark: #212529;
  --text: #495057;
  --gray: #6c757d;
  --gray-light: #e9ecef;
  --success: #28a745;
  --warning: #ffc107;
  --border: 1px solid #dee2e6;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, .1);
}

* {
  box-sizing: border-box;
}

/* 2. Styles de Base et Typographie (body, h1-h6, p, a, etc.) */
/* (Copiez ici le contenu de typography.css et les styles body/h1/h2/h3 inline) */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  background: var(--light);
  color: var(--text);
  margin: 0; /* Assurez-vous qu'il n'y a pas de marge par défaut */
}

h1,
h2,
h3 {
  color: var(--dark);
  margin: 0 0 .5rem;
  font-weight: 800;
}
/* Ajoutez ici les styles pour h4, h5, h6, p, a, ul, ol, etc. depuis typography.css */
p { margin: 0 0 1rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }
/* ... autres styles typo ... */


/* 3. Styles de Layout (header, footer, container, hero, grid, flex...) */
/* (Copiez ici le contenu de layout.css et les styles .container/.hero inline) */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero {
  padding: 4rem 0;
  background: linear-gradient(135deg, rgba(58, 134, 255, .92), rgba(38, 103, 204, .96));
  color: #fff;
  text-align: center;
}
/* Ajoutez ici les styles pour header, footer, sections principales, etc. depuis layout.css */
/* Exemple: */
/* header { ... } */
/* footer { ... } */
/* main { ... } */


/* 4. Styles des Composants (buttons, cards, forms, modals, etc.) */

/* 4.1 Boutons (Copiez ici le contenu de buttons.css et styles .btn* inline) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 1.1rem;
  border-radius: var(--radius); /* Utilisation de variable */
  border: none;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none; /* Pour les liens stylés en boutons */
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; /* Transitions douces */
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary)); /* Effet léger au survol */
  color: #fff;
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.btn-ghost {
  background: transparent;
  border: 1px dashed #cbd5e1;
  color: #1f2a44;
}
.btn-ghost:hover {
  background: #f7f9ff; /* Léger fond au survol */
  border-color: var(--primary);
  color: var(--primary-dark);
}

.btn-group {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: center; /* Valeur par défaut */
}

/* 4.2 Cartes (Styles .card* inline) */
.card {
  background: #fff;
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.25rem;
  margin: 1.25rem 0;
}

.card-header {
  display: flex;
  align-items: center;
  gap: .8rem;
  border-bottom: var(--border);
  padding-bottom: .8rem;
  margin-bottom: .8rem;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0; /* Empêche l'icône de rétrécir */
}

/* 4.3 Formulaires (Copiez ici le contenu de forms.css et styles form* inline) */
.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem; /* Ajout marge entre les rangées */
}
.form-row:last-child {
  margin-bottom: 0; 
}

.form-group {
  flex: 1;
  min-width: 220px;
}
.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
  color: var(--dark);
}
/* Style pour les labels de radio/checkbox */
.form-group label > input[type=radio],
.form-group label > input[type=checkbox] {
  margin-right: 0.5rem;
  width: auto; /* Taille par défaut */
  vertical-align: middle;
}

input[type=number],
input[type=email],
input[type=text],
select,
textarea {
  width: 100%;
  padding: .9rem;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  background: #f8f9fb;
  font-size: 1rem;
  line-height: inherit;
  color: var(--text);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(58, 134, 255, .2);
  background: #fff;
}
select {
  /* Apparence native améliorée */
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 16px 12px;
  padding-right: 2.5rem; /* Espace pour la flèche */
}
textarea {
  min-height: 80px; /* Hauteur minimale */
}
/* Ajoutez ici d'autres styles de formulaires (validation, états désactivés, etc.) depuis forms.css */

/* 4.4 Upload Fichiers (Styles .file-* inline) */
.file-upload {
  border: 2px dashed var(--gray-light);
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
  background: #f7f9ff;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.file-upload:hover,
.file-upload.dragover /* Classe ajoutée par JS si nécessaire */ {
  border-color: var(--primary);
  background-color: var(--primary-light);
}
.file-upload i { /* Icône upload */
    color:var(--primary); 
    margin-bottom: 1rem;
    font-size: 1.5rem; /* Ajuster si fa-2x n'est pas utilisé partout */
}
.file-name {
  margin-top: .6rem;
  font-weight: 700;
  color: var(--primary-dark);
  display: none; /* Affiché par JS */
  word-break: break-all; /* Pour les noms de fichiers longs */
}

/* 4.5 Viewer 3D (Styles #viewer*, .viewer-* inline) */
#viewer-container {
  height: 420px;
  background: #f0f2f5;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  border: var(--border); /* Ajout bordure légère */
}
#viewer {
  height: 100%;
  width: 100%;
}
#viewer p { /* Message initial */
  text-align:center; 
  padding-top: 50px; 
  color: var(--gray);
}

.viewer-controls {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  gap: .5rem;
  z-index: 10; /* Au-dessus du canvas */
}
.viewer-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e9ecef;
  background: rgba(255,255,255, 0.8); /* Fond semi-transparent */
  color: var(--dark);
  cursor: pointer; /* Curseur normal quand activé */
  display: grid;
  place-items: center;
  transition: background-color 0.2s, opacity 0.2s;
}
.viewer-btn:hover:not(:disabled) {
    background-color: #fff;
}
.viewer-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* 4.6 Info Box & Alertes (Styles .info-box* inline) */
.info-box {
  background: rgba(58, 134, 255, .08);
  border-left: 4px solid var(--primary);
  padding: 1rem;
  border-radius: 0 var(--radius) var(--radius) 0; /* Coins arrondis */
  margin: 1rem 0;
  display: flex; /* Pour aligner icône et texte */
  align-items: flex-start; /* Alignement haut */
  gap: 0.8rem;
}
.info-box i {
    margin-top: 0.1em; /* Ajustement vertical icône */
    color: var(--primary);
}
.info-box.success {
  background: rgba(40, 167, 69, .1);
  border-left-color: var(--success);
}
.info-box.success i { color: var(--success); }
.info-box.warning {
  background: rgba(255, 193, 7, .12);
  border-left-color: var(--warning);
}
.info-box.warning i { color: var(--warning); }
/* Style spécifique réassurance */
.info-box.reassurance {
    background: #f3f4f6; /* Fond neutre */
    border-left-color: var(--gray);
}
.info-box.reassurance i { color: var(--gray); }

/* 4.7 Étapes de Progression (Styles .progress-* inline) */
.progress-steps {
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  margin: 1.2rem auto 0;
  max-width: 840px;
  padding: 0;
  list-style: none; /* Pas de puces */
}
.progress-step {
  flex: 1;
  text-align: center;
  color: var(--gray);
  font-size: 0.9rem;
}
.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gray-light);
  color: var(--gray);
  margin: 0 auto .3rem;
  font-weight: 800;
  border: 2px solid var(--gray-light);
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}
.progress-step.active .step-number {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.progress-step.active div:last-child { /* Texte de l'étape active */
    color: var(--dark);
    font-weight: 600;
}
.progress-step.completed .step-number {
    background-color: var(--success);
    border-color: var(--success);
    color: #fff;
}
.progress-step.completed div:last-child {
    color: var(--text);
}


/* 4.8 Affichage Coût (Styles .cost-* inline) */
.cost-display {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  text-align: center;
  margin-top: 1rem;
}
.cost-details {
  background: #f3f4f6;
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 0.5rem;
  /* display: none; par défaut dans le head>style */
}
.cost-breakdown {
  display: flex;
  justify-content: space-between;
  margin: .35rem 0; /* Espacement ajusté */
  font-size: 0.95rem;
  line-height: 1.5;
}
.cost-breakdown span:first-child {
  color: var(--gray); /* Label en gris */
  padding-right: 1rem;
}
.cost-breakdown span:last-child {
  font-weight: 600;
  color: var(--dark);
  text-align: right;
}
/* Style pour les <details> dans l'affichage du coût */
.cost-details details {
  border-top: 1px dashed var(--gray-light);
  padding-top: .8rem;
  margin-top: .8rem;
}
.cost-details details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}
.cost-details details summary:hover {
    color: var(--primary);
}


/* 4.9 Modales (Styles .modal* inline) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 10000;
  display: none; /* Affiché par JS */
  align-items: center;
  justify-content: center;
  padding: 1rem; /* Pour petits écrans */
}
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  width: 95%; /* Légèrement plus large sur mobile */
  padding: 1.5rem;
  position: relative;
  max-height: 90vh; /* Empêche dépassement vertical */
  overflow-y: auto; /* Scroll si contenu trop long */
}
.modal .close-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  font-size: 1.5rem; /* Plus visible */
  color: var(--gray);
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}
.modal h2 {
    margin-top: 0; /* Pas de marge haute sur le titre */
}

/* 4.10 Tutoriel (Styles .tutorial-* inline) */
.tutorial-slide { display: none; }
.tutorial-slide.active { display: block; }
.tutorial-slide h3 { margin-top: 1rem; margin-bottom: 0.5rem; }
.tutorial-nav { display: flex; justify-content: space-between; margin-top: 1.5rem; }

/* 4.11 Spinner (Styles .spinner inline) */
.spinner {
  border: 3px solid #f3f3f3; /* Gris clair */
  border-top: 3px solid var(--primary); /* Bleu */
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 1rem auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 4.12 FAQ (Styles .faq-* inline) */
.faq-item { margin-bottom: 1rem; border-bottom: var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-question { 
  cursor: pointer; 
  padding: 0.75rem 0; 
  font-weight: 700; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}
.faq-question i { 
  transition: transform 0.2s ease; 
  color: var(--primary);
}
.faq-item.active .faq-question i { 
  transform: rotate(90deg); 
}
.faq-answer { 
  display: none; 
  padding: 0 0 1rem; 
  color: var(--text);
  line-height: 1.6;
}
.faq-item.active .faq-answer { display: block; }

/* 4.13 Styles spécifiques au calculateur (mode, dimensions...) */
/* Correction CLS / Performance : déjà dans <style> inline */
/* #file-mode, #manual-mode { display: none; } */
/* #beginner-mode { display: block; } */

.dimensions-display {
  margin-top: 1rem;
  background-color: #f9fafb;
  padding: 1rem;
  border-radius: var(--radius);
  border: var(--border);
}
.dimensions-display h4 { margin-bottom: 0.8rem; }
.dimensions-display input[readonly] { background-color: #e9ecef; cursor: not-allowed; }

/* 5. Utilitaires (small, etc.) */
.small { font-size: 0.875rem; color: var(--gray); }
/* Ajoutez d'autres classes utilitaires si nécessaire */


/* 6. Styles Responsives (@media queries) */
/* (Copiez ici le contenu de responsive.css) */
/* Exemple: */
@media (max-width: 768px) {
  .hero { padding: 3rem 0; }
  h1 { font-size: 1.8rem; }
  .form-row { flex-direction: column; gap: 0; }
  .form-row .form-group { margin-bottom: 1rem; min-width: 100%; }
  .modal { width: 95%; padding: 1rem; }
  .progress-steps { display: none; } /* Cacher étapes sur mobile ? */
}
@media (max-width: 480px) {
    .btn-group { flex-direction: column; gap: 0.5rem; align-items: stretch; }
    .btn { justify-content: center; } /* Centrer texte/icône */
    .hero { padding: 2rem 0; }
    h1 { font-size: 1.5rem; }
}
/* ... autres breakpoints ... */