:root {
    --primary: #a3282a;
    --primary-dark: #7e1e20;
    --primary-pale: #fbeeec;
    --accent: #e87000;
    --orange: #E87000;
    --gray-900: #1f1f1f;
    --gray-700: #5a5a5a;
    --gray-600: #767676;
    --gray-300: #dddddd;
    --gray-500: #999999;
    --gray-200: #eeeeee;
    --gray-100: #f5f5f5;
    --gray-50: #fafafa;
    --white: #ffffff;
    --amber-500: #F59E0B;
    --amber-50: #FFFBEB;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.07);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --sidebar-width: 280px;
    --header-height: 76px;
    --page-gutter: var(--sidebar-width) + 15px;
    --content-max-width: 1600px;
}


* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--gray-900);
    background: var(--gray-50);
    font-family: "DM Sans", "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

h1,
h2,
h3 {
    color: var(--gray-900);
    font-family: "Fraunces", serif;
    font-weight: 600;
}




a {
    color: var(--primary);
}

/* =========================================
   Cadre général : navigation + contenu
   ========================================= */

body.app-layout {
    --sidebar-width: clamp(200px, 18vw, 280px);
    --layout-gap: clamp(16px, 2vw, 32px);

    display: grid;
    grid-template-columns:
        var(--sidebar-width) minmax(0, 1fr);
    grid-template-rows: auto 1fr;

    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    align-items: start;
}

.app-header {
    grid-column: 1 / -1;
    grid-row: 1;
    position: sticky;
    width: 100%;
    margin: 0;
    top: 0;
    z-index: 10;
    border: 1px solid var(--gray-200);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    border-radius: 12px;
}

/* Le contenu utilise uniquement la colonne de droite. */
.container {
    grid-column: 2;
    grid-row: 2;

    width: 100%;
    max-width: 1600px;
    min-width: 0;

    margin: 0 auto;
    padding: 32px var(--layout-gap) 60px;
}

.app-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: var(--header-height);
    padding: 0 16px;
}


.app-identity {
    display: flex;
    flex-direction: row;
    gap: 12px;
}
.app-identity-text {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.app-logo {
    display: block;
    max-width: 70px;
    max-height: 60px;
    width: auto;
    height: auto;
}

.app-name {
    color: var(--gray-900);
    font-family: "Fraunces", serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.app-subtitle {
    margin: 0;
    color: var(--gray-700);
    font-size: 12px;
}

.app-navigation {
    color: var(--primary);
    font-size: 18px;
    font-weight: 600;
    border: 1px solid var(--gray-300);
    padding: 5px;
    border-radius: 7px;
    background: var(--white);
}

.app-navigation:hover {
    background: var(--primary-pale);
    color: var(--primary-dark);
    background-color: var(--primary-pale);
    text-decoration: underline;
}

.app-navigation a {
    text-decoration: none;
}
.deconnexion-form {
    display: inline-flex;
    gap: 16px;
}

.deconnexion-button {
    color: var(--primary);
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--gray-300);
    padding: 5px;
    border-radius: 7px;
    background: var(--white);
}

.deconnexion-button:hover {
    background: var(--primary-pale);
    color: var(--primary-dark);
    background-color: var(--primary-pale);
    text-decoration: underline;
}




.ligne-verticale {
  border-left: 1px solid var(--gray-300); /* Épaisseur et couleur */
  height: 40px; /* Hauteur de la barre */
  margin-top:5px
}

/* Side bar (bar à gauche) */
.sidebar {
  grid-column: 1;
  grid-row: 2;
  position: sticky;
  top: 0;
  left: auto;
  top: var(--header-height); 
  left: 1px;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex; 
  flex-direction: column;
  overflow: hidden;
}





.sidebar-nav { 
    flex: 1;
    min-height: 0; 
    overflow-y: auto; 
    padding: 20px 0; 
    }
    
    
.nav-section { display: flex;
               flex-direction: column;
               margin-bottom: 24px; }
               
.nav-section-title {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--gray-500);
  padding: 0 24px; margin-bottom: 6px;
}

.nav-item {
  display: flex; 
  align-items: center; 
  gap: 12px;
  padding: 9px 24px;
  color: var(--gray-700);
  text-decoration: none;
  font-size: 13px; 
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer; 
  position: relative;
  background: none;
  border-top: none; 
  border-right: none; 
  border-bottom: none;
  width: 100%; 
  text-align: left;
  font-family: inherit;
  padding-inline: 16px;
  overflow-wrap: anywhere;
}

.nav-item:hover { background: var(--gray-50); }

.nav-item.active {
  background: linear-gradient(90deg, rgba(163, 40, 42, 0.08) 0%, transparent 100%);
  font-weight: 600;
}
.nav-item.active::after {
  content: ''; position: absolute;
  right: 16px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--primary);
}
.nav-item.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

/* Empêche les grandes zones d'imposer leur largeur. */
.app-layout .selection-card,
.app-layout .selection-results-panel,
.app-layout .echangeurs-list,
.app-layout .echangeur-card,
.app-layout .echangeur-content {
    min-width: 0;
    max-width: 100%;
}


/* Formatage du titre et description en dessous du header */

.page-title {
    margin: 0 0 8px;
    color: var(--prima);

    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.page-description {
    max-width: 1000px;
    margin: 0;
    color: var(--gray-600);
    font-size: 15px;
    line-height: 1.55;
}

/* Selection Template (pour la page SelectionHDCold.html) */

.selection-card {
    display: grid;
    grid-template-columns:repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    align-items: stretch;
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    overflow: hidden;
    background: var(--white);
    
}
 
.selection-panel {
    min-width: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-300);
}

.selection-room-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
    gap: 12px;
    margin-inline:8px;
    
}

.selection-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
}

.selection-field-input,.volume-box {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    height: auto;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid var(--gray-300);
}

.selection-card .volume-box {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
}

.selection-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    gap: 8px;
}

.selection-choice-box {
    min-width: 0;
    min-height: 54px;
    height: 100%;
    padding: 8px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: var(--white);
    color: var(--gray-700);
    cursor: pointer;
    text-align: center;
    margin-inline: 8px;
}


.selection-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    gap: 8px;
    margin-inline: 8px;
    align-items: stretch;
}

.selection-option-box {
    position: relative;
    min-width: 0;
    min-height: 42px;
    padding: 7px 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    
    

    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: var(--white);
    font-size: 11px;
    color: var(--gray-700);
    cursor: pointer;
}

/* La dernière option occupe toute la largeur */
.selection-option-box-wide {
    grid-column: 1 / -1;
}

.selection-option-box input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}


/* Petite coche blanche */
.selection-option-box input:checked + .selection-custom-checkbox::after {
    content: "✓";
    display: block;
    color: black;
    font-size: 12px;
    font-weight: 700;
    line-height: 12px;
    text-align: center;
}

/* Ligne sélectionnée */
.selection-option-box:has(input:checked) {
    border-color: var(--primary);
    background: #fbeeee;
    color: var(--primary);
}


.selection-custom-checkbox {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    border: 1px solid var(--gray-900);
    border-radius: 2px;
    background: var(--white);
}

/* Survol de la ligne */
.selection-option-box:hover {
    border-color: var(--primary);
}


.selection-panel h2{
    font-size:12px;
    padding: 0px 7px;
    font-color:var(--gray-900);
    
}

.selection-panel-actions {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 1.5rem;
}

.register-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(251, 238, 236, 0.4);
}


.selection-volume-box {
    display: flex;
    align-items: center;

    background: rgba(163, 40, 42, 0.08);
    font-weight: 700;
}
.selection-calculate-button {
    
    padding: 10px 16px;

    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: var(--white);
    
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.selection-calculate-button:hover {
    background: var(--gray-50);
}

    
.selection-field-group-bis {
    display: flex;
    flex-direction: column;
    margin-left: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
}

.selection-choice-title {
    margin: 14px 0 6px;

    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gray-600);
}


.selection-choice-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}




.selection-choice-box strong {
    font-size: 12px;
    font-weight: 700;
}

.selection-choice-box span {
    font-size: 10px;
    color: var(--gray-600);
}

.selection-choice-box:hover {
    border-color: var(--primary);
}

/* Le label placé juste après un radio coché */
.selection-choice-input:checked + .selection-choice-box {
    border-color: var(--primary);
    background: var(--primary-pale);
    color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.selection-choice-input:checked + .selection-choice-box span {
    color: var(--primary);
}

/* Accessibilité clavier */
.selection-choice-input:focus-visible + .selection-choice-box {
    outline: 3px solid rgba(163, 40, 42, 0.25);
    outline-offset: 2px;
}


/* Affichage des références optimales et possible */

.selection-results-panel {
    min-height: 320px;
    margin-top: 16px;

    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* État : aucune donnée saisie */
.selection-empty-results {
    min-height: 320px;
    padding: 32px 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.selection-empty-results-icon {
    width: 62px;
    height: 62px;
    margin-bottom: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: var(--gray-100);

    color: var(--gray-400);
    font-size: 29px;
}

.selection-empty-results h2 {
    margin: 0 0 8px;

    font-size: 16px;
    font-weight: 700;
    color: var(--gray-700);
}

.selection-empty-results p {
    max-width: 460px;
    margin: 0;

    font-size: 13px;
    line-height: 1.55;
    color: var(--gray-500);
}

/* État : échangeurs trouvés */

.results-count {
    padding: 5px 9px;

    border-radius: 999px;
    background: #fbeeee;
    color: var(--primary);

    font-size: 11px;
    font-weight: 700;
}

.echangeurs-list {
    padding: 12px;
}


.echangeur-details {
    margin: 0;
    font-size: 12px;
    color: var(--gray-500);
}

.select-echangeur-button {
    padding: 8px 12px;

    border: none;
    border-radius: 6px;
    background: var(--primary);
    color: white;

    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}


/* =========================================
   Zone de résultats : échangeurs compatibles
   ========================================= */

.selection-results-panel {
    min-height: 320px;
    margin-top: 16px;

    overflow: hidden;

    border: 1px solid var(--gray-200);
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

/* État vide : attente ou aucune solution */
.selection-empty-results {
    min-height: 320px;
    padding: 32px 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.selection-empty-results-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px dashed var(--gray-300);
    border-radius: 50%;
    background: var(--gray-50);

    color: var(--gray-600);
    font-size: 24px;
    font-weight: 700;
}

.selection-empty-results h2 {
    margin: 0 0 8px;

    color: var(--gray-700);
    font-size: 17px;
    font-weight: 700;
}

.selection-empty-results p {
    max-width: 500px;
    margin: 0;

    color: var(--gray-600);
    font-size: 13px;
    line-height: 1.55;
}

/* En-tête affiché lorsque des échangeurs sont trouvés */
.results-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 20px 12px;
}

.results-header h3 {
    margin: 0;
    order: 1;
    color: var(--gray-900);
    font-family: "Fraunces", serif;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.results-header::after {
    order: 2;
    content: "";
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.results-header span {
    display: inline-flex;
    order: 3;
    align-items: center;
    justify-content: center;

    min-width: 22px;
    height: 22px;

    border-radius: 50%;
    color: var(--gray-500);
    background: var(--gray-100);

    font-size: 10px;
    font-weight: 700;
}

.results-count {
    padding: 5px 10px;

    border-radius: 999px;
    background: var(--primary-pale);

    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* Liste des échangeurs */
.echangeurs-list {
    padding: 12px;
}

.echangeur-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;

    min-height: 132px;
    margin-bottom: 14px;
    padding: 20px 22px;

    overflow: hidden;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow-sm);

    cursor: pointer;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.echangeur-card:last-child {
    margin-bottom: 0;
}

.echangeur-card:hover {
    border-color: rgba(163, 40, 42, 0.35);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.echangeur-card:focus {
    outline: 3px solid rgba(163, 40, 42, 0.18);
    outline-offset: 2px;
}

.echangeur-quantity {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 92px;
    padding: 10px 8px;

    border-radius: 10px;
    color: var(--white);
    background:
        radial-gradient(
            circle at top right,
            rgba(232, 112, 0, 0.45) 0,
            rgba(232, 112, 0, 0.22) 24%,
            transparent 25%
        ),
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );

    text-align: center;
}

.echangeur-quantity-number {
    display: block;
    font-family: "Fraunces", serif;
    font-size: 40px;
    font-weight: 700;
    line-height: 0.92;
}

.echangeur-quantity-label {
    display: block;
    margin-top: 8px;

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.echangeur-content {
    display: flex;
    flex-direction: column;
    justify-content: center;

    min-width: 0;
    padding: 0px 0;
}

.echangeur-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0px;
}

.echangeur-reference {
    margin: 0 0 0px;
    color: var(--primary-dark);
    font-family: "Fraunces", serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}



.echangeur-model {
    margin: 0 0 10px;
    color: var(--gray-600);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
}

.echangeur-metrics {
    display: grid;
    grid-template-columns:repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    gap: 12px;
    margin-top: 18px;
}

.echangeur-metric {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.echangeur-metric-label {
    color: var(--gray-500);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.echangeur-metric-value {
    color: var(--gray-900);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}

.echangeur-metric-value span {
    margin-left: 1px;

    color: var(--gray-600);
    font-size: 10px;
    font-weight: 600;
}

.echangeur-card {
    position: relative;
    cursor: pointer;
}

.echangeur-card.is-selected {
    border-color: rgba(163, 40, 42, 0.45);
    box-shadow:
        0 0 0 3px rgba(163, 40, 42, 0.08),
        var(--shadow-md);
}

.echangeur-expanded {
    display: none;
    grid-column: 1 / -1;

    margin-top: 4px;
    padding: 18px 20px;

    border-top: 3px solid rgba(163, 40, 42, 0.16);
}

.echangeur-card.is-selected .echangeur-expanded {
    display: block;
}

.implantation-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 16px;
}

.implantation-eyebrow {
    margin: 0 0 3px;

    color: var(--gray-600);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.implantation-header h4 {
    margin: 0;

    color: var(--gray-900);
    font-family: "Fraunces", serif;
    font-size: 16px;
    font-weight: 600;
}

.echangeur-close-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    border: 1px solid var(--gray-300);
    border-radius: 6px;
    color: var(--gray-600);
    background: var(--white);

    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.echangeur-close-button:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-pale);
}

.wall-schematic {
    padding: 18px 18px 14px;

    border: 1px solid var(--gray-200);
    border-radius: 10px;
    background: var(--gray-50);
}

.wall-schematic-title {
    margin-bottom: 16px;

    color: var(--gray-600);
    font-size: 12px;
}

.wall-schematic-title strong {
    color: var(--gray-900);
}

.wall-track {
    position: relative;

    min-height: 94px;
    padding: 22px 28px 30px;
}

.wall-line {
    position: absolute;
    right: 28px;
    bottom: 20px;
    left: 28px;

    height: 3px;

    border-radius: 999px;
    background: var(--gray-700);
}

.wall-line::before,
.wall-line::after {
    position: absolute;
    bottom: -6px;

    width: 2px;
    height: 15px;

    content: "";
    background: var(--gray-700);
}

.wall-line::before {
    left: 0;
}

.wall-line::after {
    right: 0;
}

.wall-units {
    display: flex;
    align-items: flex-end;
    justify-content: space-evenly;
    gap: 12px;

    position: relative;
    z-index: 1;

    height: 46px;
}

.wall-unit {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 1 1 0;
    max-width: 220px;
    min-width: 42px;
    height: 34px;

    border-radius: 5px 5px 2px 2px;
    color: var(--white);
    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );
    box-shadow: 0 2px 4px rgba(92, 21, 23, 0.18);

    font-size: 11px;
    font-weight: 800;
}

.wall-dimensions {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;

    padding-top: 12px;
    border-top: 1px dashed var(--gray-300);

    color: var(--gray-600);
    font-size: 11px;
}

.wall-dimensions strong {
    color: var(--gray-900);
    font-weight: 800;
}

.wall-svg-container {
    width: 100%;
    overflow: hidden;
}

.wall-svg {
    display: block;
    width: 100%;
    height: auto;
}

.wall-svg-line {
    stroke: var(--gray-700);
    stroke-width: 3;
    stroke-linecap: round;
}

.wall-svg-end {
    stroke: var(--gray-700);
    stroke-width: 2;
}

.wall-svg-unit {
    fill: var(--primary);
    stroke: var(--primary-dark);
    stroke-width: 1;
}

.wall-svg-unit-label {
    fill: #ffffff;
    font-family: "DM Sans", sans-serif;
    font-size: 13px;
    font-weight: 800;
}

.wall-svg-dimension-label {
    fill: var(--gray-600);
    font-family: "DM Sans", sans-serif;
    font-size: 10px;
    font-weight: 600;
}

.wall-svg-wall-label {
    fill: var(--gray-600);
    font-family: "DM Sans", sans-serif;
    font-size: 11px;
    font-weight: 700;
}

.echangeur-expanded-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;

    margin-top: 16px;
    padding-top: 16px;

    border-top: 1px dashed var(--gray-300);
}

.echangeur-add-form {
    margin: 0;
}

.echangeur-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 38px;
    padding: 9px 14px;

    border-radius: 7px;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.echangeur-action-button:hover {
    transform: translateY(-1px);
}

.echangeur-action-button-secondary {
    border: 1px solid var(--gray-300);
    color: var(--primary);
    background: var(--white);
}

.echangeur-action-button-secondary:hover {
    border-color: var(--primary);
    background: var(--primary-pale);
}

.echangeur-action-button-primary {
    border: 1px solid var(--accent);
    color: var(--white);
    background: var(--accent);
}

.echangeur-action-button-primary:hover {
    border-color: #c85f00;
    background: #c85f00;
}

@media (max-width: 700px) {
    .echangeur-expanded-actions {
        justify-content: stretch;
    }

    .echangeur-action-button,
    .echangeur-add-form {
        width: 100%;
    }
}

.project-section {
    margin-top: 32px;
}


.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.project-title {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--gray-900);
}

.project-total {
    text-align: right;
}

.project-total-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--gray-500);
    font-weight: 700;
}

.project-total-value {
    font-family: 'Fraunces', serif;
    font-size: 26px;
    font-weight: 600;
    color: var(--primary-dark);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.project-meta-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary-pale) 0%, rgba(251, 238, 236, 0.4) 100%);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
}

.compact-input-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.compact-input-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.compact-input {
    padding: 7px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 5px;
    font-family: inherit;
    font-size: 13px;
    color: var(--gray-900);
    background: var(--white);
    transition: all 0.15s ease;
    width: 100%;
    font-variant-numeric: tabular-nums;
}

.project-actions-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-orange {
    background: linear-gradient(135deg, var(--orange) 0%, #D06400 100%);
    color: var(--white);
}

.btn-white {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--gray-300);
}

.project-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.project-item-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.project-item-title {
    font-family: 'Fraunces', serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--gray-900);
    letter-spacing: -0.01em;
}

.project-item-subtitle {
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 3px;
}

.project-item-price {
    font-family: 'Fraunces', serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-dark);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}


.gamme-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.gamme-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gray-100);
}

.gamme-card-title {
    font-family: 'Fraunces', serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--gray-900);
    letter-spacing: -0.01em;
}

.gamme-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 16px;
}

.gamme-card-subtitle {
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 3px;
}

.gamme-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 24px;
}

.gamme-tab {
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.gamme-tab-active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.gamme-filters {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;

    margin-bottom: 18px;
    padding: 16px 18px;

    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.gamme-filter {
    display: flex;
    flex-direction: column;
    gap: 5px;

    min-width: 210px;
}

.gamme-filter span {
    color: var(--gray-600);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.gamme-filter select {
    min-height: 36px;
    padding: 0 10px;

    border: 1px solid var(--gray-300);
    border-radius: 6px;
    color: var(--gray-900);
    background: var(--white);

    font-family: inherit;
    font-size: 12px;
}

.gamme-filter select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(163, 40, 42, 0.10);
}

.gamme-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gamme-filter-submit {
    min-height: 36px;
    padding: 0 14px;

    border: 1px solid var(--primary);
    border-radius: 6px;
    color: var(--white);
    background: var(--primary);

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.gamme-filter-submit:hover {
    background: var(--primary-dark);
}

.gamme-filter-reset {
    color: var(--gray-600);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.gamme-filter-reset:hover {
    color: var(--primary);
    text-decoration: underline;
}

.gamme-resultats {
    margin-top: 24px;
}

.gamme-resultats h2 {
    margin: 0 0 12px;

    font-size: 17px;
}

.gamme-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(320px, 1fr)
    );
    gap: 16px;
}

.gamme-echangeur-card {
    display: flex;
    flex-direction: column;

    min-height: 275px;
}

.gamme-reference {
    margin-bottom: 4px;

    color: #8f2426;
    font-size: 16px;
    font-weight: 800;
}


.gamme-diametre {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 52px;
    min-height: 30px;

    border-radius: 999px;

    color: #8f2426;
    background: #f9e8e8;

    font-size: 11px;
    font-weight: 800;
}

.gamme-caracteristiques {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;

    padding: 18px 0;
}

.gamme-caracteristiques > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gamme-caracteristiques span {
    color: #777777;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.gamme-caracteristiques strong {
    color: #242424;

    font-size: 13px;
    line-height: 1.35;
}

.gamme-card-footer {
    display: flex;
    justify-content: center;
    margin-top: auto;
    padding-top: 14px;

    border-top: 1px solid #e5e5e5;
}

.gamme-plan-link {
    color: #8f2426;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.gamme-plan-link:hover {
    text-decoration: underline;
}

@media (max-width: 700px) {
    .gamme-grid {
        grid-template-columns: 1fr;
    }
}
/* =========================================
   Page de connexion
   ========================================= */
   
.auth-body {
    min-height: 100dvh;
    margin: 0;
    background: var(--primary-pale);
}
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100dvh;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 28px;
    text-align: center;
    border: 1px solid #dedede;
    border-radius: 12px;

    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.auth-card-header {
    margin-bottom: 24px;
}

.auth-logo {
    height: 54px;
    margin-bottom: 14px;
}

.auth-card-description {
    color: var(--gray-500);
    font-size: 13px;
    margin: 0px;
}

.auth-eyebrow {
    margin: 0 0 6px;
    text-align: center;
    color: #8f2426;

    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-card-header h2 {
    margin: 0 0 8px;
    color: #222222;
    font-size: 24px;
}


.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-600);
    text-align: left
}

.auth-field input {
    min-height: 42px;
    padding: 0 12px;

    border: 1px solid #cfcfcf;
    border-radius: 6px;

    color: #222222;
    background: #ffffff;

    font: inherit;
    font-size: 14px;
}

.auth-field input:focus {
    outline: none;

    border-color: #8f2426;
    box-shadow: 0 0 0 3px rgba(143, 36, 38, 0.12);
}

.auth-error {
    margin: 0;
    padding: 10px 12px;

    border: 1px solid #e1a5a5;
    border-radius: 6px;

    color: #8f2426;
    background: #fff1f1;

    font-size: 12px;
}

.auth-submit {
    min-height: 42px;

    border: 1px solid #8f2426;
    border-radius: 6px;

    color: #ffffff;
    background: #8f2426;

    font: inherit;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
}

.auth-submit:hover {
    border-color: #6f1b1d;
    background: #6f1b1d;
}

/* =========================================
   Page d'accueil
   ========================================= */
   

.accueil-body {
    min-height: 100dvh;
    margin: 0;

    color: var(--gray-900);
    background: var(--gray-50);
}

.accueil-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    min-height: 68px;
    padding: 0 32px;

    border-bottom: 1px solid var(--gray-200);
    background: #ffffff;
}

.accueil-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    color: var(--primary-dark);
    font-family: "Fraunces", serif;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
}

.accueil-logo {
    width: auto;
    height: 32px;

    object-fit: contain;
}

.accueil-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.accueil-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;

    color: var(--gray-900);
    font-size: 12px;
}

.accueil-user-label {
    color: var(--gray-500);
    font-size: 10px;
}

.accueil-logout {
    padding: 7px 10px;

    border: 1px solid var(--gray-300);
    border-radius: 6px;

    color: var(--gray-700);
    background: #ffffff;

    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.accueil-logout:hover {
    border-color: #8f2426;
    color: #8f2426;
}

.home-page {
    box-sizing: border-box;
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
    padding: 48px 0 64px;
}

.home-introduction {
    margin-bottom: 42px;
}

.home-eyebrow {
    margin: 0 0 8px;

    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-introduction h1 {
    margin: 0 0 10px;

    color: var(--primary-dark);
    font-family: "Fraunces", serif;
    font-size: clamp(30px, 4vw, 40px);
    font-weight: 600;
    line-height: 1.15;
}

.home-introduction p:not(.home-eyebrow) {
    max-width: 620px;
    margin: 0;

    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.6;
}

.home-category + .home-category {
    margin-top: 42px;
}

.home-category-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;

    margin-bottom: 14px;
    padding-bottom: 12px;

    border-bottom: 1px solid var(--gray-200);
}

.home-category-header h2 {
    margin: 0;

    color: var(--primary-dark);
    font-family: "Fraunces", serif;
    font-size: 22px;
    font-weight: 600;
}

.home-category-header p {
    max-width: 430px;
    margin: 0;

    color: var(--gray-500);
    font-size: 12px;
    line-height: 1.5;
    text-align: right;
}

.home-tools-list {
    display: grid;
    gap: 14px;
}

.home-tool-card {
    display: flex;
    align-items: center;
    gap: 18px;

    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-height: 116px;
    padding: 22px 58px 22px 22px;

    border: 1px solid var(--gray-200);
    border-radius: 12px;

    color: inherit;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(18, 44, 64, 0.05);

    text-decoration: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.home-tool-card:hover {
    border-color: rgba(37, 91, 128, 0.48);
    box-shadow: 0 9px 22px rgba(18, 44, 64, 0.11);
    transform: translateY(-2px);
}

.home-tool-card:focus-visible {
    outline: 3px solid rgba(37, 91, 128, 0.35);
    outline-offset: 3px;
}

.home-tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    width: 46px;
    height: 46px;

    border-radius: 10px;

    color: var(--primary-dark);
    background: var(--primary-pale);

    font-size: 22px;
    font-weight: 700;
}

.home-tool-content {
    min-width: 0;
}

.home-tool-content h3 {
    margin: 0 0 6px;

    color: var(--primary-dark);
    font-family: "Fraunces", serif;
    font-size: 17px;
    font-weight: 600;
}

.home-tool-content p {
    max-width: 720px;
    margin: 0;

    color: var(--gray-600);
    font-size: 13px;
    line-height: 1.55;
}

.home-tool-arrow {
    position: absolute;
    top: 50%;
    right: 22px;

    color: var(--primary);
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    transform: translateY(-50%);
}

.home-tool-card-disabled {
    cursor: default;
    opacity: 0.72;
}

.home-tool-card-disabled:hover {
    border-color: var(--gray-200);
    box-shadow: 0 4px 14px rgba(18, 44, 64, 0.05);
    transform: none;
}

.home-tool-status {
    position: absolute;
    top: 50%;
    right: 22px;

    padding: 6px 9px;

    border: 1px solid var(--gray-200);
    border-radius: 999px;

    color: var(--gray-500);
    background: var(--gray-50);

    font-size: 10px;
    font-weight: 700;
    transform: translateY(-50%);
}

@media (max-width: 720px) {
    .home-page {
        width: min(100% - 32px, 1120px);
        padding: 34px 0 48px;
    }

    .home-introduction {
        margin-bottom: 32px;
    }

    .home-category + .home-category {
        margin-top: 32px;
    }

    .home-category-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .home-category-header p {
        max-width: none;
        text-align: left;
    }

    .home-tool-card {
        align-items: flex-start;
        min-height: 125px;
        padding: 18px 48px 18px 18px;
    }

    .home-tool-icon {
        width: 40px;
        height: 40px;

        font-size: 19px;
    }

    .home-tool-content h3 {
        font-size: 16px;
    }

    .home-tool-arrow,
    .home-tool-status {
        right: 16px;
    }
}

/* =========================================
   Catalogue produit HDCold(r)
   ========================================= */

.cat-price-info{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--amber-50);
    border-left: 3px solid var(--amber-500);
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    margin-top: 32px;
    font-size: 12.5px;
    color: #92400E;
}

.cat-search-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--white);
    padding: 14px 0 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--gray-200);
}

.catalogue-search-form {
    display: flex;
    align-items: flex-end;
    gap: 9px;
}

.catalogue-search-label {
    position: absolute;

    width: 1px;
    height: 1px;
    overflow: hidden;

    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.catalogue-search-form input[type="search"] {
    width: min(460px, 100%);
    min-height: 40px;
    padding: 0 12px;

    border: 1px solid var(--gray-300);
    border-radius: 7px;

    color: var(--gray-900);
    background: #ffffff;

    font: inherit;
    font-size: 13px;
}

.catalogue-search-form input[type="search"]:focus {
    outline: none;

    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 91, 128, 0.12);
}

.catalogue-search-submit {
    min-height: 40px;
    padding: 0 14px;

    border: 1px solid var(--primary);
    border-radius: 7px;

    color: #ffffff;
    background: var(--primary);

    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.catalogue-search-submit:hover {
    background: var(--primary-dark);
}

.catalogue-count {
    margin: 12px 0 10px;

    color: var(--gray-500);
    font-size: 11px;
    }
    
.catalogue-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.catalogue-category {
    display: inline-flex;
    align-items: center;

    min-height: 32px;
    padding: 0 12px;

    border: 1px solid var(--gray-300);
    border-radius: 999px;

    color: var(--gray-700);
    background: #ffffff;

    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.catalogue-category:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.catalogue-category.is-active {
    border-color: var(--primary);
    color: #ffffff;
    background: var(--primary);
}

.catalogue-empty {
    padding: 34px 20px;

    border: 1px dashed var(--gray-300);
    border-radius: 10px;

    color: var(--gray-600);
    background: #ffffff;

    font-size: 13px;
    text-align: center;
}

.catalogue-liste {
    margin-bottom: 36px;
    scroll-margin-top: 90px;
}



.catalogue-famille-title {
    margin: 30px 0 10px;
    padding-bottom: 10px;

    border-bottom: 2px solid var(--primary);

    color: var(--primary-dark);
    font-family: "Fraunces", serif;
    font-size: 19px;
    font-weight: 600;
}

.catalogue-table-wrapper {
    overflow-x: auto;

    border: 1px solid var(--gray-200);
    border-radius: 10px;

    background: #ffffff;
}

.catalogue-table {
    width: 100%;
    min-width: 760px;

    border-collapse: collapse;
}

.catalogue-table th {
    padding: 11px 14px;

    border-bottom: 1px solid var(--gray-200);

    color: var(--gray-500);
    background: var(--gray-50);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-align: left;
    text-transform: uppercase;
}

.catalogue-table td {
    padding: 12px 14px;

    border-bottom: 1px solid var(--gray-100);

    color: var(--gray-700);
    font-size: 12px;
    line-height: 1.45;
}

.catalogue-table tbody tr:last-child td {
    border-bottom: 0;
}

.catalogue-table tbody tr:hover {
    background: #fbfdff;
}

.catalogue-price-column {
    width: 125px;
    text-align: right !important;
}

.visually-hidden {
    position: absolute;

    width: 1px;
    height: 1px;
    overflow: hidden;

    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.catalogue-reference {
    width: 168px;

    color: var(--primary-dark) !important;
    font-weight: 800;
    white-space: nowrap;
}

.catalogue-price-column {
    width: 125px;
    text-align: right !important;
}

.catalogue-prix {
    width: 125px;

    color: var(--primary-dark) !important;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.catalogue-action {
    width: 110px;
    text-align: right;
}

.catalogue-add-button {
    min-height: 30px;
    padding: 0 10px;

    border: 0;
    border-radius: 6px;

    color: #ffffff;
    background: #e57f16;

    font: inherit;
    font-size: 11px;
    font-weight: 800;
}

.catalogue-add-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.catalogue-unite {
    display: inline-block;

    margin-left: 7px;
    padding: 2px 5px;

    border-radius: 999px;

    color: var(--gray-600);
    background: var(--gray-100);

    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.catalogue-empty {
    padding: 34px 20px;

    border: 1px dashed var(--gray-300);
    border-radius: 10px;

    color: var(--gray-600);
    background: #ffffff;

    font-size: 13px;
    text-align: center;
}


@media (max-width: 720px) {
    .catalogue-page {
        width: min(100% - 32px, 1320px);
        padding: 30px 0 48px;
    }

    .catalogue-controls {
        padding: 14px;
    }

    .catalogue-search-form {
        align-items: stretch;
        flex-direction: column;
    }

    .catalogue-search-form input[type="search"] {
        width: 100%;
    }

    .catalogue-search-submit {
        width: 100%;
    }
}

.catalogue-add-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.catalogue-chambre-select {
    width: 145px;
    min-width: 0;
    min-height: 32px;
    padding: 0 7px;

    border: 1px solid var(--gray-300);
    border-radius: 6px;

    color: var(--gray-700);
    background: #ffffff;

    font: inherit;
    font-size: 11px;
}

.catalogue-quantite-input {
    width: 48px;
    min-height: 32px;
    padding: 0 5px;

    border: 1px solid var(--gray-300);
    border-radius: 6px;

    color: var(--gray-700);
    background: #ffffff;

    font: inherit;
    font-size: 11px;
    text-align: center;
}

.catalogue-chambre-select:focus,
.catalogue-quantite-input:focus {
    border-color: var(--primary);
    outline: 2px solid rgba(37, 91, 128, 0.15);
    outline-offset: 1px;
}

.catalogue-add-button {
    min-height: 32px;
    padding: 0 9px;

    border: 1px solid var(--primary);
    border-radius: 6px;

    color: #ffffff;
    background: var(--primary);

    font: inherit;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.catalogue-add-button:hover {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
}

.catalogue-no-room {
    display: inline-block;

    max-width: 115px;

    color: var(--gray-500);
    font-size: 10px;
    line-height: 1.35;
    text-align: right;
}


/* =========================================
   Ajout echnageur au chiffrage
   ========================================= */

.chiffrage-nouvelle-chambre {
    display: flex;
    flex-direction: column;
    gap: 5px;

    margin: 12px 0;
}

.chiffrage-nouvelle-chambre label {
    color: var(--gray-600);

    font-size: 11px;
    font-weight: 800;
}

.chiffrage-nouvelle-chambre input {
    box-sizing: border-box;
    width: 100%;
    min-height: 36px;
    padding: 0 10px;

    border: 1px solid var(--gray-300);
    border-radius: 6px;

    color: var(--gray-900);
    background: #ffffff;

    font: inherit;
    font-size: 12px;
}

.chiffrage-nouvelle-chambre input:focus {
    outline: none;

    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 91, 128, 0.12);
}

/* ============================================================
   PAGE : CHIFFRAGE PROJET
   ============================================================ */

.chiffrage-projet-page {
    width: 100%;
    margin: 0 auto;
    padding: 8px 0 42px;
}

.chiffrage-projet-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    
    
}



.chiffrage-ajouter-link,
.chiffrage-catalogue-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 36px;
    padding: 0 13px;

    
    border-radius: 7px;

    color: #ffffff;
    background: linear-gradient(135deg, var(--orange) 0%, #D06400 100%);
    

    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.chiffrage-ajouter-link:hover {
    transform: translateY(-1px); 
    
}


.chiffrage-catalogue-link {
    border-color: var(--gray-300);

    color: var(--primary-dark);
    background: #ffffff;
}

.chiffrage-catalogue-link:hover {
    transform: translateY(-1px); 
    border-color: var(--primary);
    color: var(--primary);
}

.chiffrage-save-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.chiffrage-meta-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary-pale) 0%, rgba(251, 238, 236, 0.4) 100%);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
}

.chiffrage-save-form input {
    width: 300px;
    min-height: 36px;
    padding: 0 10px;

    border: 1px solid var(--gray-300);
    border-radius: 7px;

    color: var(--gray-800);
    background: #ffffff;

    font: inherit;
    font-size: 12px;
}

.chiffrage-save-form input:focus {
    border-color: var(--primary);
    outline: 2px solid rgba(37, 91, 128, 0.15);
    outline-offset: 1px;
}

.chiffrage-save-button {
    min-height: 36px;
    border: 1px solid var(--primary);
    border-radius: 7px;

    color: #ffffff;
    background: var(--primary);

    font: inherit;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}



.chiffrage-save-button:hover:not(:disabled) {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
}

.chiffrage-save-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-remove-project {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--gray-300);
}


.btn-remove-project:disabled{
    opacity: 0;
    cursor: not-allowed;
}
/* Messages après ajout ou erreur */

.chiffrage-message,
.chiffrage-erreur {
    margin-bottom: 16px;
    padding: 12px 14px;

    border-radius: 8px;

    font-size: 12px;
    line-height: 1.45;
}

.chiffrage-message {
    border: 1px solid #b7ddc2;

    color: #1d6334;
    background: #effaf2;
}

.chiffrage-erreur {
    border: 1px solid #e5b4b4;

    color: #8f2426;
    background: #fff2f2;
}

/* Une chambre */

.chiffrage-chambre {
    margin-bottom: 22px;

    border: 1px solid var(--gray-200);
    border-radius: 12px;

    background: #ffffff;
    box-shadow: 0 4px 14px rgba(18, 44, 64, 0.05);
    overflow: hidden;
}

.chiffrage-chambre-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding: 18px 20px;

    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.chiffrage-chambre-label {
    margin: 0 0 3px;

    color: var(--primary);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.chiffrage-chambre-header h3 {
    margin: 0 0 5px;

    color: var(--primary-dark);
    font-family: "Fraunces", serif;
    font-size: 19px;
    font-weight: 600;
}

.chiffrage-chambre-details {
    margin: 0;

    color: var(--gray-600);
    font-size: 12px;
}

.chiffrage-chambre-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;

    flex-shrink: 0;
}

.chiffrage-chambre-total span {
    color: var(--gray-500);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.chiffrage-chambre-total strong {
    color: var(--primary-dark);
    font-family: "Fraunces", serif;
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
}

/* Tableau des lignes dans une chambre */

.chiffrage-table-wrapper {
    overflow-x: auto;
}

.chiffrage-table {
    width: 100%;
    min-width: 760px;

    border-collapse: collapse;
}

.chiffrage-table th {
    padding: 11px 14px;

    border-bottom: 1px solid var(--gray-200);

    color: var(--gray-500);
    background: #ffffff;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-align: left;
    text-transform: uppercase;
}

.chiffrage-table td {
    padding: 13px 14px;

    border-bottom: 1px solid var(--gray-100);

    color: var(--gray-700);
    font-size: 12px;
    line-height: 1.45;
}

.chiffrage-table tbody tr:last-child td {
    border-bottom: 0;
}

.chiffrage-table tbody tr:hover {
    background: #fbfdff;
}

.chiffrage-reference {
    width: 175px;

    color: var(--primary-dark) !important;
    font-weight: 800;
    white-space: nowrap;
}

.chiffrage-quantite-column,
.chiffrage-quantite {
    width: 60px;
    text-align: center !important;
}

.chiffrage-prix-column,
.chiffrage-prix {
    width: 132px;
    text-align: right !important;
}

.chiffrage-prix {
    color: var(--primary-dark) !important;
    font-weight: 800;
    white-space: nowrap;
}

.chiffrage-unite {
    display: inline-block;

    margin-left: 7px;
    padding: 2px 6px;

    border-radius: 999px;

    color: var(--gray-600);
    background: var(--gray-100);

    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.chiffrage-chambre-vide {
    margin: 0;
    padding: 20px;

    color: var(--gray-500);
    font-size: 12px;
    font-style: italic;
}

/* Total de tout le projet */

.chiffrage-total-projet {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-top: 28px;
    padding: 20px 22px;

    border: 1px solid var(--primary);
    border-radius: 12px;

    color: #ffffff;
    background: var(--primary);
}

.chiffrage-total-projet span {
    font-size: 13px;
    font-weight: 700;
}

.chiffrage-total-projet strong {
    font-family: "Fraunces", serif;
    font-size: 28px;
    font-weight: 700;
    white-space: nowrap;
}

/* État vide */

.chiffrage-projet-vide {
    padding: 48px 24px;

    border: 1px dashed var(--gray-300);
    border-radius: 12px;

    background: #ffffff;
    text-align: center;
}

.chiffrage-projet-vide h2 {
    margin: 0 0 8px;

    color: var(--primary-dark);
    font-family: "Fraunces", serif;
    font-size: 22px;
    font-weight: 600;
}

.chiffrage-projet-vide p {
    max-width: 520px;
    margin: 0 auto 22px;

    color: var(--gray-600);
    font-size: 13px;
    line-height: 1.6;
}

.chiffrage-projet-vide-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Version mobile */

@media (max-width: 720px) {
    .chiffrage-projet-page {
        padding-bottom: 28px;
    }

    .chiffrage-projet-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .chiffrage-chambre-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .chiffrage-chambre-total {
        align-items: flex-start;
    }

    .chiffrage-total-projet {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .chiffrage-total-projet strong {
        font-size: 25px;
    }
}

.accessoires-modal[hidden] {
    display: none;
}

.accessoires-modal {
    position: fixed;
    z-index: 1000;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.accessoires-modal-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(12, 31, 46, 0.52);
}

.accessoires-modal-dialog {
    position: relative;
    z-index: 1;

    width: min(100%, 560px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;

    border-radius: 14px;

    color: var(--gray-900);
    background: #ffffff;
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.25);
}

.accessoires-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    padding: 22px 24px 18px;

    border-bottom: 1px solid var(--gray-200);
}

.accessoires-modal-eyebrow {
    margin: 0 0 5px;

    color: var(--primary);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.accessoires-modal-header h3 {
    margin: 0 0 5px;

    color: var(--primary-dark);
    font-family: "Fraunces", serif;
    font-size: 20px;
    font-weight: 600;
}

.accessoires-modal-header p:last-child {
    max-width: 430px;
    margin: 0;

    color: var(--gray-600);
    font-size: 12px;
    line-height: 1.5;
}

.accessoires-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    width: 32px;
    height: 32px;

    border: 1px solid var(--gray-200);
    border-radius: 7px;

    color: var(--gray-600);
    background: #ffffff;

    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.accessoires-modal-close:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.accessoires-modal-content {
    display: grid;
    gap: 10px;

    padding: 20px 24px;
}

.accessoires-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    position: relative;
    padding: 14px;

    border: 1px solid var(--gray-200);
    border-radius: 9px;

    cursor: pointer;
}

.accessoires-option:hover {
    border-color: rgba(37, 91, 128, 0.5);
    background: #fbfdff;
}

.accessoires-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.accessoires-option-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    width: 19px;
    height: 19px;

    border: 1px solid var(--gray-300);
    border-radius: 5px;

    color: transparent;
    background: #ffffff;

    font-size: 12px;
    font-weight: 800;
}

.accessoires-option input:checked
    + .accessoires-option-check {
    border-color: var(--primary);
    color: #ffffff;
    background: var(--primary);
}

.accessoires-option-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.accessoires-option-content strong {
    color: var(--primary-dark);
    font-size: 13px;
}

.accessoires-option-content small {
    color: var(--gray-600);
    font-size: 11px;
    line-height: 1.45;
}

.accessoires-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;

    padding: 16px 24px 20px;

    border-top: 1px solid var(--gray-200);
}

.accessoires-modal-cancel,
.accessoires-modal-confirm {
    min-height: 36px;
    padding: 0 13px;

    border-radius: 7px;

    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.accessoires-modal-cancel {
    border: 1px solid var(--gray-300);

    color: var(--gray-700);
    background: #ffffff;
}

.accessoires-modal-cancel:hover {
    border-color: var(--gray-500);
}

.accessoires-modal-confirm {
    border: 1px solid var(--primary);

    color: #ffffff;
    background: var(--primary);
}

.accessoires-modal-confirm:hover {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
}

@media (max-width: 600px) {
    .accessoires-modal {
        align-items: flex-end;
        padding: 0;
    }

    .accessoires-modal-dialog {
        width: 100%;
        max-height: min(88dvh, 720px);

        border-radius: 14px 14px 0 0;
    }

    .accessoires-modal-header,
    .accessoires-modal-content,
    .accessoires-modal-footer {
        padding-right: 18px;
        padding-left: 18px;
    }
}

/* ============================================================
   PAGE : MES PROJETS
   ============================================================ */

.mes-projets-page {
    width: 100%;
    margin: 0 auto;
    padding: 8px 0 42px;
}

.mes-projets-list {
    display: grid;
    gap: 12px;
}

.mes-projets-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 19px 20px;

    border: 1px solid var(--gray-200);
    border-radius: 12px;

    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.mes-projets-card:hover {
    border-color: rgba(163, 40, 42, 0.45);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.mes-projets-reference {
    margin: 0 0 5px;

    color: var(--primary);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.mes-projets-card h2 {
    margin: 0 0 5px;

    color: var(--gray-900);
    font-family: "Fraunces", serif;
    font-size: 19px;
    font-weight: 600;
}

.mes-projets-date {
    margin: 0;
    color: var(--gray-600);
    font-size: 12px;
    line-height: 1.45;
}

.mes-projets-open-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    min-height: 36px;
    padding: 0 13px;

    border: 1px solid var(--primary);
    border-radius: 7px;

    color: var(--white);
    background: var(--primary);

    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.mes-projets-open-button:hover {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
    text-decoration: none;
}

@media (max-width: 620px) {
    .mes-projets-page {
        padding-bottom: 28px;
    }

    .mes-projets-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .mes-projets-open-button {
        width: 100%;
    }
}

.chiffrage-pdf-action {
    display: flex;
    justify-content: center;

    margin-top: 22px;
    padding-bottom: 18px;
}

.chiffrage-pdf-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 42px;
    padding: 0 18px;

    border: 1px solid var(--primary);
    border-radius: 8px;

    color: var(--white);
    background: var(--primary);

    font-size: 13px;
    font-weight: 800;
    text-decoration: none;

    box-shadow: var(--shadow-sm);
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.chiffrage-pdf-button:hover {
    border-color: var(--primary-dark);
    background: var(--primary-dark);

    color: var(--white);
    text-decoration: none;

    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.chiffrage-pdf-button:focus-visible {
    outline: 3px solid rgba(163, 40, 42, 0.22);
    outline-offset: 3px;
}

.chiffrage-pdf-button svg {
    flex: 0 0 auto;
}

.chiffrage-save-form input[readonly] {
    cursor: default;
    color: var(--gray-600);
    background: var(--gray-100);
    border-color: var(--gray-200);
}



.mes-projets-open-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 36px;
    padding: 0 13px;

    border: 1px solid var(--primary);
    border-radius: 7px;

    color: var(--white);
    background: var(--primary);

    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.mes-projets-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;
    padding: 0;

    border: 1px solid #dc2626;
    border-radius: 7px;

    color: #dc2626;
    background: var(--white);

    cursor: pointer;
    transition:
        color 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease;
}

.mes-projets-delete-button:hover {
    border-color: #b91c1c;
    color: var(--white);
    background: #dc2626;
}

.mes-projets-delete-button svg {
    width: 15px;
    height: 15px;
}

.mes-projets-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 10px;
}

.supprimer-chambre {
    display: inline-flex;
    align-items: center;
    justify-content: center;


    border: 1px solid var(--gray-300);
    border-radius: 6px;
    color: var(--primary);
    background: var(--white);

    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}




