@import url('https://fonts.googleapis.com/css?family=Inter:400,600,800&display=swap');

.banner { padding:10px 12px; border-radius:12px; margin-bottom:12px; display:flex; gap:8px; align-items:center; }
.banner.ok { background:#e8f5e9; color:#1b5e20; border:1px solid #c8e6c9; }
.banner.alert { background:#ffebee; color:#b71c1c; border:1px solid #ffcdd2; }

.linklike { background:none; border:none; color:inherit; text-decoration:underline; cursor:pointer; margin-left:auto; }

.card { background:#fff; border-radius:12px; padding:12px; box-shadow:0 2px 10px rgba(0,0,0,.06); margin-bottom:12px; }
.card-title { font-weight:600; margin-bottom:8px; }

.mini-flag { border:none; background:transparent; cursor:pointer; color:#9e9e9e; }
.mini-flag.flagged { color:#c62828; }               /* rouge quand flaggé */
.flag-cell { width:48px; text-align:right; }

.btn-flag.flagged, .mini-flag.flagged { filter:saturate(1.4); transform: translateY(-1px); }
.flag-cell { width:48px; text-align:right; }
.mini-flag { border:none; background:transparent; cursor:pointer; }


body, html {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  height: 100%;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #eaf0fa;
}

.background {
  background: url("image.jpg") center center/cover no-repeat fixed;
  position: fixed;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  top: 0; left: 0;
  filter: blur(3px) brightness(0.88) saturate(1.01);
}

.container.glass {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: 48px auto;
  background: rgba(255,255,255,0.74);
  border-radius: 2.2em;
  box-shadow: 0 8px 36px 0 rgba(30,40,90,0.13), 0 1.5px 9px 0 rgba(70,140,220,0.09);
  padding: 2.7em 1.2em 2.5em 1.2em;
  text-align: center;
  backdrop-filter: blur(18px) saturate(1.2);
  border: 1.5px solid rgba(180,186,255,0.13);
  transition: box-shadow .18s;
}

h1 {
  font-size: 2.15rem;
  margin-bottom: 1.5em;
  font-weight: 800;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  justify-content: center;
  color: #1e376d;
  text-shadow: 0 1px #fff, 0 3px 11px #a7b9e6a4;
}

.ti { font-size: 1.45em; vertical-align: middle; color: #4c82e6; }

.drop-area {
  border: 2.5px dashed #95b8f8;
  border-radius: 1.5em;
  background: rgba(248,250,253,0.92);
  padding: 2.3em 1.2em;
  margin-bottom: 1.5em;
  transition: background .2s, border .2s;
  box-shadow: 0 2px 17px #d1e4fc2a;
}
.drop-area:hover, .drop-area:focus-within {
  background: #e3ecfa;
  border-color: #4c82e6;
}

.file-label {
  color: #4c82e6;
  text-decoration: underline;
  cursor: pointer;
  padding: .68em 1.15em;
  border-radius: 1.2em;
  background: #e7f2ff;
  border: 1.5px solid #d3e8ff;
  font-weight: 600;
  font-size: 1.14em;
  box-shadow: 0 1px 7px #c6e1fc17;
  transition: background .16s, border .14s;
}
.file-label:hover {
  background: #f0f6ff;
  border-color: #89b8fb;
}
.file-label input[type=file] {
  display: none;
}

.preview-img {
  margin: 1.3em auto 1em;
  max-width: 220px;
  max-height: 220px;
  border-radius: 1.1em;
  box-shadow: 0 6px 26px #c2e3fa53, 0 1px 8px #7daeea2a;
  border: 0.5px solid #d7e8fa;
  background: #fbfcfd;
}

#loading {
  margin-top: 2em;
}
.loader {
  border: 7px solid #e3ecfa;
  border-top: 7px solid #4c82e6;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  animation: spin 1s linear infinite;
  margin: 0 auto 0.7em auto;
}
@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}

#success-check {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2em 0 1em 0;
  flex-direction: column;
  gap: 0.5em;
}
.checkmark {
  width: 54px;
  height: 54px;
  display: block;
}
.checkmark-circle {
  stroke: #5fd379;
  stroke-width: 4;
  fill: #eafff3;
  animation: fill .4s ease-in-out .2s forwards;
}
.checkmark-check {
  stroke: #49b76d;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke .5s cubic-bezier(.65, .05, .36, 1) .6s forwards;
}
@keyframes fill { 100% { fill: #eafff3; } }
@keyframes stroke { 100% { stroke-dashoffset: 0; } }
#success-check span {
  font-size: 1.17em;
  color: #49b76d;
  font-weight: bold;
  letter-spacing: .01em;
}

.warning {
  background: #fff6e6;
  color: #d49538;
  border-left: 5px solid #e2aa4e;
  border-radius: 0.85em;
  padding: 1.1em 1.35em;
  margin: 1.7em 0 0.7em 0;
  font-size: 1.08em;
  text-align: left;
  box-shadow: 0 1px 4px #ffeac860;
}

.lavage-card {
  margin-top: 1.55em;
  background: rgba(242,247,253,0.95);
  border-left: 6px solid #63a5e9;
  border-radius: 1.1em;
  padding: 1.17em 1.25em;
  font-size: 1.16em;
  color: #356d91;
  text-align: left;
  box-shadow: 0 2px 13px #e8effc7a;
}
.lavage-title {
  font-weight: bold; 
  color: #356d91; 
  margin-bottom: 0.8em; 
  font-size: 1.07em; 
  display: flex; 
  gap: .5em; 
  align-items: center;
  letter-spacing: .01em;
}
.lavage-list { 
  list-style: none; 
  margin: 0; 
  padding: 0; 
}
.lavage-list > li {
  margin: .2em 0 .2em 0;
  padding-left: 0;
  display: flex; 
  align-items: flex-start;
  gap: .6em;
}
.lavage-list .ti { color: #4c82e6; }
.precautions {
  list-style: disc inside;
  margin: .1em 0 .1em 2em;
  padding-left: 0;
  font-size: .98em;
  color: #e26a6a;
}

.summary { margin: 1em 0 .7em 0; font-size: 1.09em; }
.summary b { color: #274fa4; }

.infos-list, .etat-list {
  text-align: left;
  margin: 0.7em 0 0 0;
  font-size: 1.04em;
  line-height: 1.7em;
  padding-left: 0.2em;
}

.hist-link {
  display: inline-block;
  margin-top: 2em;
  color: #4c82e6;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.03em;
  letter-spacing: .01em;
}

.hist-table { margin-top:1em; }
.hist-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.2em;
  background: #f7fafd;
  border-radius: 1.2em;
  box-shadow: 0 0 7px #d5e8ff40;
  padding: 10px;
  gap: 1.3em;
  transition: box-shadow .15s;
}
.hist-row.alerte { background: #fdf3f7; box-shadow: 0 0 9px #ffe4f270; }
.hist-img img {
  width: 80px; height: 80px; object-fit:cover; border-radius:1em;
  box-shadow: 0 1px 8px #e9d2e24f;
  border: 1.5px solid #e8f1ff;
  background: #fff;
}
.hist-info {
  flex: 1;
  margin-left: 0.5em;
}
.hist-date {
  color: #aaa;
  font-size: 0.95em;
  margin-left: .5em;
}
.hist-details {
  margin-top: 0.7em;
  border-top: 1px solid #eef2fa;
  padding-top: 0.4em;
  background: #fcfdff;
  border-radius: 0 0 0.9em 0.9em;
  box-shadow: 0 1px 5px #e8effc3e;
}
.hist-summary { font-size: 1.07em; }
.hist-alert { color:#e74c3c; font-size:1.3em; }
.hist-ok { color: #27ae60; font-size:1.3em;}
.hist-details-btn {
  background: #e6e9f3;
  border: none;
  border-radius: 5px;
  padding: 0.18em 0.85em;
  margin-left: 1.1em;
  cursor: pointer;
  font-size: 1.01em;
  color: #2561a6;
  transition: background .14s;
}
.hist-details-btn:hover {
  background: #dae8f9;
}

.details-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.3em;
  font-size: 0.98em;
}
.details-table td, .details-table th {
  padding: 6px 10px;
}
.details-table th {
  text-align: left;
  background: #f2f2f2;
  color: #3f5d92;
  font-size: 1em;
}
.details-table tr:nth-child(even) {
  background: #f8fbff;
}
.lavage-hist {
  margin-top: 1.1em;
  font-size: 0.98em;
  background: #f6fafd;
  border-radius: 10px;
  padding: 0.5em 0.7em;
  border-left: 4px solid #54a1f2;
  color: #267;
}

input[type="text"], input[type="number"], input[type="email"], input[type="password"] {
  border-radius:6px; 
  border:1.3px solid #a8c6f2; 
  padding: 3px 7px;
  background: #fafdff;
  font-size: 1em;
  transition: border .15s;
}
input[type="text"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="password"]:focus {
  border-color: #4c82e6;
  outline: none;
}
button { 
  cursor:pointer; 
  background: #eaf2fb;
  color: #2d68b6;
  border: 1px solid #d7e8fa;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 1em;
  transition: background .14s, border .14s;
}
button:hover {
  background: #d2e5fb;
  border-color: #8dc1fa;
}

@media (max-width: 600px) {
  .container.glass {
    max-width: 99vw;
    margin: 0;
    border-radius: 0;
    padding: 0.8em .4em 1.6em .4em;
  }
  .preview-img { max-width: 95vw; }
  .hist-img img { width: 55px; height: 55px;}
  .lavage-card, .lavage-hist { font-size: 1em; }
}

.corr-table {
  display: flex;
  flex-direction: column;
  gap: 2em;
}
.corr-row {
  display: flex;
  align-items: flex-start;
  gap: 1em;
  margin-bottom: 2em;
  border-bottom: 1px solid #eee;
  padding-bottom: 1em;
}
.corr-img img {
  width: 80px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.corr-info {
  flex: 1;
}
.corr-field {
  margin-bottom: .7em;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.corr-field label {
  min-width: 120px;
  font-weight: 500;
}
.corr-field input,
.corr-field select {
  font-size: 1em;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
}
.corr-field button {
  background: #e0e0e0;
  border: none;
  border-radius: 4px;
  padding: 0 8px;
  cursor: pointer;
  font-size: 1em;
  margin-left: 4px;
}

/* === Ajustements Responsives === */

/* TABLETTES - entre 600 et 1024px */
@media (max-width: 1024px) {
  .container.glass {
    width: 95%;
    padding: 16px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .card {
    margin-bottom: 20px;
  }

  .preview-img {
    max-width: 100%;
    height: auto;
  }

  .recap-table,
  .compare-table {
    font-size: 0.95em;
  }

  .two-col {
    grid-template-columns: 1fr; /* images entrée/sortie l'une sous l'autre */
  }

  .banner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 8px;
  }
}

/* MOBILES - en dessous de 600px */
@media (max-width: 600px) {
  h1 {
    font-size: 1.4em;
    line-height: 1.3em;
  }

  h2, .card-title {
    font-size: 1.1em;
  }

  .btn, .btn-secondary, .btn-danger {
    width: 100%;
    text-align: center;
  }

  .hist-link {
    display: flex;
    justify-content: center;
    margin-top: 16px;
    width: 100%;
  }

  table.recap-table th,
  table.recap-table td,
  table.compare-table th,
  table.compare-table td {
    padding: 6px 8px;
    font-size: 0.9em;
  }

  .compare-table thead { display: none; } /* simplifie la lecture mobile */
  .compare-table tr {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 8px;
  }
  .compare-table td:first-child { font-weight: bold; }
  .compare-table td:last-child { opacity: 0.8; }

  .banner.alert, .banner.ok {
    padding: 12px;
    font-size: 0.9em;
  }
}

/* GÉNÉRAL - images et cartes */
img.preview-img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.card {
  overflow-x: auto;
}

/* Evite le débordement sur petits écrans */
body, html {
  overflow-x: hidden;
}
