/* ============================================
   CHAPITRE 10 : Les Bordures
   Styles spécifiques à la démonstration
   ============================================ */

/* --- Démonstration styles de bordure --- */
.demo-border-styles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
  background: var(--couleur-blanc);
  border: 1px solid var(--couleur-bordure);
  border-radius: var(--rayon);
  margin-bottom: 1.5rem;
}

.border-style-box {
  text-align: center;
}

.bs-name {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--couleur-secondaire);
  margin-bottom: 0.5rem;
  font-family: var(--police-code);
}

.bs-visual {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-width: 4px;
}

.bs-solid .bs-visual { border-style: solid; border-color: #3b82f6; }
.bs-dashed .bs-visual { border-style: dashed; border-color: #8b5cf6; }
.bs-dotted .bs-visual { border-style: dotted; border-color: #ec4899; }
.bs-double .bs-visual { border-style: double; border-color: #f59e0b; border-width: 6px; }
.bs-groove .bs-visual { border-style: groove; border-color: #10b981; border-width: 6px; }
.bs-ridge .bs-visual { border-style: ridge; border-color: #ef4444; border-width: 6px; }
.bs-inset .bs-visual { border-style: inset; border-color: #6366f1; border-width: 6px; }
.bs-outset .bs-visual { border-style: outset; border-color: #14b8a6; border-width: 6px; }
.bs-none .bs-visual { border-style: none; background: #f8fafc; }

/* --- Démonstration border-radius --- */
.demo-radius {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1.5rem;
  background: var(--couleur-blanc);
  border: 1px solid var(--couleur-bordure);
  border-radius: var(--rayon);
  margin-bottom: 1.5rem;
}

.radius-demo {
  text-align: center;
}

.radius-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--couleur-secondaire);
  font-family: var(--police-code);
}

.radius-box {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--couleur-primaire), var(--couleur-secondaire));
}

.r-8 { border-radius: 8px; }
.r-16 { border-radius: 16px; }
.r-50 { border-radius: 50%; }
.r-pill { border-radius: 9999px; width: 120px; height: 50px; }
.r-blob { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }

/* --- Démonstration outline --- */
.demo-outline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--couleur-blanc);
  border: 1px solid var(--couleur-bordure);
  border-radius: var(--rayon);
  margin-bottom: 1.5rem;
}

.outline-compare {
  text-align: center;
}

.outline-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--couleur-secondaire);
  margin-bottom: 0.5rem;
  font-family: var(--police-code);
}

.outline-box {
  padding: 1rem;
  background: #f0f9ff;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--couleur-texte);
  border-radius: 8px;
}

.o-border {
  border: 4px solid #3b82f6;
}

.o-outline {
  border: 1px solid #e2e8f0;
  outline: 4px solid #3b82f6;
}

.o-offset {
  border: 2px solid #3b82f6;
  outline: 2px dashed #8b5cf6;
  outline-offset: 6px;
}

/* --- Démonstration box-shadow --- */
.demo-shadow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  padding: 2rem 1.5rem;
  background: #f8fafc;
  border: 1px solid var(--couleur-bordure);
  border-radius: var(--rayon);
  margin-bottom: 1.5rem;
}

.shadow-demo {
  text-align: center;
}

.shadow-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--couleur-secondaire);
  margin-bottom: 0.75rem;
  font-family: var(--police-code);
}

.shadow-box {
  padding: 1.25rem;
  background: white;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--couleur-texte);
}

.s-basic {
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
}

.s-glow {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.s-inset {
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.1);
  background: #f8fafc;
}

.s-multi {
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.1),
    0 4px 8px rgba(0, 0, 0, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.06);
}

/* --- Démonstration drop-shadow --- */
.demo-dropshadow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 1.5rem;
  background: var(--couleur-blanc);
  border: 1px solid var(--couleur-bordure);
  border-radius: var(--rayon);
  margin-bottom: 1.5rem;
}

.drop-demo {
  text-align: center;
}

.drop-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--couleur-secondaire);
  margin-bottom: 0.5rem;
  font-family: var(--police-code);
}

.drop-note {
  display: block;
  font-size: 0.75rem;
  color: var(--couleur-texte-clair);
  margin-top: 0.5rem;
}

.drop-box {
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ds-shape {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  border-radius: 50%;
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.ds-shadow .ds-shape {
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.3);
}

.ds-filter .ds-shape {
  filter: drop-shadow(4px 4px 12px rgba(0, 0, 0, 0.3));
}

/* --- Démonstration border-image --- */
.demo-border-image {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--couleur-blanc);
  border: 1px solid var(--couleur-bordure);
  border-radius: var(--rayon);
  margin-bottom: 1.5rem;
}

.bi-demo {
  text-align: center;
}

.bi-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--couleur-secondaire);
  margin-bottom: 0.5rem;
  font-family: var(--police-code);
}

.bi-box {
  padding: 1.5rem;
  font-weight: 600;
  color: var(--couleur-texte);
}

.bi-gradient {
  border: 4px solid transparent;
  border-image: linear-gradient(135deg, #667eea, #764ba2) 1;
}

.bi-repeat {
  border: 12px solid transparent;
  border-image: repeating-linear-gradient(
    45deg,
    #3b82f6 0px,
    #3b82f6 8px,
    #93c5fd 8px,
    #93c5fd 16px
  ) 12;
}

/* --- Démonstration badges --- */
.demo-badges {
  padding: 1.5rem;
  background: var(--couleur-blanc);
  border: 1px solid var(--couleur-bordure);
  border-radius: var(--rayon);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.badge-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.badge-group-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--couleur-texte);
}

.badge-notification-demo {
  position: relative;
  display: inline-block;
}

.notif-icon {
  width: 40px;
  height: 40px;
  background: #f1f5f9;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.notif-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #ef4444;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 9999px;
  border: 2px solid white;
  display: grid;
  place-items: center;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.badge-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* --- Démonstration avatars --- */
.demo-avatars {
  padding: 1.5rem;
  background: var(--couleur-blanc);
  border: 1px solid var(--couleur-bordure);
  border-radius: var(--rayon);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.avatar-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--couleur-texte);
  min-width: 60px;
}

.avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  background: #94a3b8;
}

.av-border {
  border: 3px solid #e2e8f0;
  background: #3b82f6;
}

.av-border2 {
  border: 3px solid #e2e8f0;
  background: #8b5cf6;
}

.av-ring-blue {
  box-shadow: 0 0 0 2px white, 0 0 0 4px #3b82f6;
  background: #3b82f6;
}

.av-ring-purple {
  box-shadow: 0 0 0 2px white, 0 0 0 4px #8b5cf6;
  background: #8b5cf6;
}

.av-status {
  background: #64748b;
}

.avatar-wrapper-demo {
  position: relative;
  display: inline-block;
}

.indicator-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid white;
}

.indicator-green { background: #22c55e; }
.indicator-red { background: #ef4444; }
.indicator-gray { background: #9ca3af; }

.avatar-group-demo {
  display: flex;
}

.av-group {
  width: 40px;
  height: 40px;
  font-size: 0.7rem;
  border: 2px solid white;
}

.av-group:not(:first-child) {
  margin-left: -10px;
}

.av-g1 { background: #3b82f6; }
.av-g2 { background: #8b5cf6; }
.av-g3 { background: #ec4899; }
.av-g4 { background: #64748b; font-size: 0.65rem; }

/* --- Démonstration cartes --- */
.demo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
  background: #f8fafc;
  border: 1px solid var(--couleur-bordure);
  border-radius: var(--rayon);
  margin-bottom: 1.5rem;
}

.carte-demo {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
}

.carte-demo:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
  border-color: #93c5fd;
}

.carte-titre {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.carte-texte {
  font-size: 0.9rem;
  color: var(--couleur-texte-clair);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.carte-actions {
  display: flex;
  gap: 0.5rem;
}

.carte-btn {
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.carte-btn-primary {
  background: #3b82f6;
  color: white;
}

.carte-btn-primary:hover {
  background: #2563eb;
}

.carte-btn-ghost {
  background: transparent;
  color: #64748b;
  border-color: #e2e8f0;
}

.carte-btn-ghost:hover {
  background: #f1f5f9;
}

.carte-border-left {
  border-left: 4px solid #3b82f6;
}

.carte-inset {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  border: none;
}

.carte-inset:hover {
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* --- Démonstration boutons --- */
.demo-buttons {
  padding: 1.5rem;
  background: var(--couleur-blanc);
  border: 1px solid var(--couleur-bordure);
  border-radius: var(--rayon);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-group-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--couleur-texte);
  min-width: 80px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
  font-size: 0.9rem;
  font-family: inherit;
}

.btn:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.btn-primary {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.btn-primary:active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: none;
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: #3b82f6;
  border-color: #3b82f6;
}

.btn-outline:hover {
  background: #3b82f6;
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-ghost {
  background: transparent;
  color: #64748b;
  border-color: transparent;
}

.btn-ghost:hover {
  background: #f1f5f9;
  color: #334155;
}

.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.7rem 1.5rem; font-size: 1rem; }

.btn-bordered {
  background: white;
  color: #334155;
  border: 2px solid #334155;
}

.btn-bordered:hover {
  background: #334155;
  color: white;
}

.btn-dashed {
  background: white;
  color: #8b5cf6;
  border: 2px dashed #8b5cf6;
}

.btn-dashed:hover {
  background: #8b5cf6;
  color: white;
  border-style: solid;
}

.btn-dotted {
  background: white;
  color: #ec4899;
  border: 2px dotted #ec4899;
}

.btn-dotted:hover {
  background: #ec4899;
  color: white;
  border-style: solid;
}
