/* =====================================================
   PISCINE AU CARRE - securite-accessoires.css
   Page Securite & Accessoires
   ===================================================== */

/* == Navbar == */
.sa-navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; transition: background .3s, box-shadow .3s, top .3s; }
.sa-navbar:not(.scrolled) { background: rgba(20,33,65,.85); backdrop-filter: blur(8px); }
.sa-navbar.scrolled { background: var(--navy); box-shadow: 0 2px 20px rgba(0,0,0,.25); }
.nav-active { color: var(--accent) !important; font-weight: 700; }
/* Decaler la navbar quand la barre admin est visible */
body.bar-open .sa-navbar { top: 48px; }

/* == Hero == */
.sa-hero {
  position: relative; min-height: 52vh; display: flex; align-items: center;
  padding: 140px 5% 90px;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, #1a3a6e 100%);
  overflow: hidden;
}
.sa-hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232196F3' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.sa-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(12,24,41,.6) 0%, transparent 70%); }
.sa-hero-content { position: relative; z-index: 2; max-width: 680px; }
.sa-hero-content h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; margin: 14px 0 18px; }
.sa-hero-content h1 span { color: var(--accent); }
.sa-hero-content p { color: rgba(255,255,255,.85); font-size: 1.1rem; line-height: 1.7; margin-bottom: 32px; }
.sa-hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-outline-white {
  display: inline-flex; align-items: center; gap: 8px;
  padding: .75rem 1.8rem; border-radius: 999px; font-family: var(--font-title);
  font-weight: 700; font-size: .9rem; transition: all .3s;
  border: 2px solid rgba(255,255,255,.6); color: #fff;
}
.btn-outline-white:hover { background: rgba(255,255,255,.15); border-color: #fff; }

/* == Container == */
.sa-container { max-width: 1200px; margin: 0 auto; }
.sa-section { padding: 90px 5%; }
.sa-section--light { background: var(--off-white); }
.sa-section--dark { background: var(--navy); }

/* == Alert legale == */
.sa-alert {
  display: flex; align-items: flex-start; gap: 18px;
  background: linear-gradient(135deg, #fff3cd, #fff8e1);
  border: 2px solid #f59e0b; border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 60px;
}
.sa-alert > i { font-size: 1.6rem; color: #d97706; margin-top: 2px; flex-shrink: 0; }
.sa-alert strong { font-family: var(--font-title); font-size: 1rem; color: #92400e; display: block; margin-bottom: 4px; }
.sa-alert p { color: #78350f; font-size: .95rem; margin: 0; }

/* == Sous-titre de section == */
.sa-sub-title {
  font-family: var(--font-title); font-size: 1.35rem; font-weight: 700;
  color: var(--navy); margin-bottom: 30px; padding-bottom: 12px;
  border-bottom: 3px solid var(--accent); display: inline-block;
}

/* == Grille des 4 dispositifs == */
.sa-devices-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px; margin-bottom: 30px;
}
.sa-device-card {
  background: #fff; border-radius: var(--radius); padding: 28px 24px;
  box-shadow: var(--shadow); border: 2px solid transparent;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  position: relative; overflow: hidden;
}
.sa-device-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--accent-light); }
.sa-device-card--featured { border-color: var(--accent); }
.sa-device-card--featured::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), #64B5F6);
}
.sa-device-icon {
  width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center;
  justify-content: center; background: rgba(33,150,243,.1); color: var(--accent);
  font-size: 1.5rem; margin-bottom: 14px;
}
.sa-device-icon--green { background: rgba(34,197,94,.1); color: #16a34a; }
.sa-device-icon--orange { background: rgba(249,115,22,.1); color: #ea580c; }
.sa-device-icon--purple { background: rgba(139,92,246,.1); color: #7c3aed; }
.sa-device-norm {
  font-family: var(--font-title); font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--mid-grey);
  margin-bottom: 8px;
}
.sa-device-card h3 { font-size: 1.15rem; color: var(--navy); margin-bottom: 10px; }
.sa-device-card p { font-size: .93rem; color: var(--text-body); margin-bottom: 16px; line-height: 1.6; }
.sa-device-list { padding: 0; }
.sa-device-list li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: .88rem; color: var(--text-body); padding: 4px 0;
}
.sa-device-list li i { color: #22c55e; font-size: .8rem; margin-top: 5px; flex-shrink: 0; }
.sa-device-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  background: linear-gradient(135deg, var(--accent), #1565C0);
  color: #fff; font-family: var(--font-title); font-size: .78rem;
  font-weight: 700; padding: .4em 1em; border-radius: 999px;
}

/* == Photos securite == */
.sa-photos-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.sa-photo-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s;
}
.sa-photo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* photo-edit-wrap integre dans la carte alarme/barriere */
.sa-photo-card .photo-edit-wrap {
  position: relative; width: 100%; height: 240px; overflow: hidden;
}
.sa-photo-card .photo-edit-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s ease;
}
.sa-photo-card img {
  width: 100%; height: 240px; object-fit: cover; display: block;
  transition: transform .4s ease;
}
.sa-photo-card:hover img { transform: scale(1.04); }

/* == .sa-card-price-tag supprime — les alarmes utilisent desormais .sa-robot-price-tag == */

/* == Bouton "Changer la photo" (admin uniquement) == */
.sa-upload-btn {
  display: none; /* cache par defaut */
  position: absolute; top: 10px; right: 10px;
  align-items: center; gap: 6px;
  background: rgba(20,33,65,.85); color: #fff;
  border: 1.5px solid rgba(255,255,255,.35); border-radius: 999px;
  padding: .38em .9em;
  font-family: var(--font-title); font-size: .78rem; font-weight: 700;
  cursor: pointer; z-index: 30;
  backdrop-filter: blur(4px);
  transition: background .2s, border-color .2s;
  white-space: nowrap;
}
.sa-upload-btn i { font-size: .85rem; }
body.editing .sa-upload-btn { display: flex; }
.sa-upload-btn:hover { background: var(--accent); border-color: var(--accent); }

.sa-photo-card figcaption { padding: 20px; }
.sa-photo-tag {
  display: inline-block; background: rgba(33,150,243,.12); color: var(--accent);
  font-family: var(--font-title); font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; padding: .25em .8em;
  border-radius: 999px; margin-bottom: 8px;
}
.sa-photo-card strong { display: block; color: var(--navy); font-family: var(--font-title); font-size: .95rem; margin-bottom: 6px; }
.sa-photo-card p { font-size: .88rem; color: var(--text-body); margin: 0; line-height: 1.5; }

/* == Tableau comparatif == */
.sa-table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.sa-table { width: 100%; border-collapse: collapse; background: #fff; font-size: .9rem; }
.sa-table thead { background: var(--navy); }
.sa-table thead th { color: #fff; font-family: var(--font-title); font-weight: 700; padding: 14px 16px; text-align: left; font-size: .85rem; letter-spacing: .04em; white-space: nowrap; }
.sa-table tbody tr { border-bottom: 1px solid var(--light-grey); transition: background .2s; }
.sa-table tbody tr:hover { background: rgba(33,150,243,.04); }
.sa-table tbody tr:last-child { border-bottom: none; }
.sa-table td { padding: 14px 16px; color: var(--text-body); vertical-align: middle; }
.sa-td-icon { color: var(--accent); margin-right: 6px; }
.sa-norm-badge {
  background: rgba(33,150,243,.1); color: var(--accent);
  font-family: var(--font-title); font-size: .72rem; font-weight: 700;
  padding: .25em .7em; border-radius: 999px; white-space: nowrap;
}
.sa-stars { color: #f59e0b; letter-spacing: 2px; font-size: .9rem; }

/* == CTA block == */
.sa-cta-block {
  text-align: center; margin-top: 70px; padding: 56px 40px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: var(--radius); color: #fff;
}
.sa-cta-icon { font-size: 2.8rem; color: var(--accent); margin-bottom: 18px; }
.sa-cta-block h3 { font-size: 1.6rem; color: #fff; margin-bottom: 12px; }
.sa-cta-block p { color: rgba(255,255,255,.8); font-size: 1.05rem; margin-bottom: 28px; max-width: 560px; margin-left: auto; margin-right: auto; }
.btn-lg { padding: .9rem 2.4rem; font-size: 1rem; }

/* == Robots grid == */
.sa-robots-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px; margin-bottom: 40px;
}
.sa-robot-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  position: relative;
}
.sa-robot-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 16px 48px rgba(0,0,0,.4); }
.sa-robot-badge {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  background: var(--accent); color: #fff; font-family: var(--font-title);
  font-size: .72rem; font-weight: 700; padding: .3em .9em;
  border-radius: 999px; letter-spacing: .08em; text-transform: uppercase;
}

/* == Robot image wrap — position:relative REQUIS pour le badge prix et le bouton Changer == */
.sa-robot-img-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: rgba(255,255,255,.04);
}
.sa-robot-img-wrap img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transition: transform .5s ease;
}
.sa-robot-card:hover .sa-robot-img-wrap img { transform: scale(1.04); }

.sa-robot-placeholder {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  color: rgba(255,255,255,.3);
}
.sa-robot-placeholder i { font-size: 3.5rem; }
.sa-robot-placeholder span { font-size: .85rem; text-align: center; line-height: 1.5; }

.sa-robot-body { padding: 24px; }
.sa-robot-body h3 { color: #fff; font-size: 1.35rem; margin-bottom: 10px; }
.sa-robot-num { color: var(--accent); }
.sa-robot-desc { color: rgba(255,255,255,.7); font-size: .92rem; margin-bottom: 18px; line-height: 1.6; }
.sa-robot-specs { padding: 0; margin-bottom: 22px; }
.sa-robot-specs li {
  display: flex; align-items: baseline; gap: 8px;
  color: rgba(255,255,255,.8); font-size: .88rem; padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sa-robot-specs li:last-child { border-bottom: none; }
.sa-robot-specs li i { color: var(--accent); width: 16px; flex-shrink: 0; margin-top: 2px; }
.sa-robot-specs li strong {
  color: rgba(255,255,255,.95);
  white-space: nowrap; /* empeche "Zones :" de couper */
  flex-shrink: 0;
}

/* == Actions (PDF) == */
.sa-robot-actions {
  display: flex; flex-direction: column; gap: 10px;
}
.sa-robot-pdf {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: .7rem 1.2rem; border-radius: 999px;
  border: 2px solid rgba(255,255,255,.25); background: transparent;
  color: rgba(255,255,255,.85); font-family: var(--font-title); font-weight: 700;
  font-size: .88rem; text-decoration: none; transition: all .25s;
}
.sa-robot-pdf:hover {
  background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); color: #fff;
}
.sa-robot-pdf i { color: #ef4444; }
.sa-robot-pdf--premium { border-color: rgba(245,158,11,.45); color: rgba(255,255,255,.9); }
.sa-robot-pdf--premium:hover { border-color: #f59e0b; background: rgba(245,158,11,.1); }
.sa-robot-pdf--premium i { color: #f59e0b; }

.sa-robot-cta {
  width: 100%; padding: .8rem 1.2rem; border-radius: 999px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #1565C0);
  color: #fff; font-family: var(--font-title); font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .3s, transform .2s;
}
.sa-robot-cta:hover { opacity: .92; transform: scale(1.02); }

/* == Robot brand + premium == */
.sa-robot-brand {
  font-family: var(--font-title); font-size: .75rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 4px;
}

.sa-robot-card--premium {
  border-color: rgba(33,150,243,.4);
  background: linear-gradient(160deg, rgba(33,150,243,.08) 0%, rgba(255,255,255,.05) 100%);
}
.sa-robot-card--premium:hover { border-color: var(--accent); }

.sa-robot-badge--premium {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex; align-items: center; gap: 6px;
}
.sa-robot-cta--premium {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}
.sa-robot-cta--premium:hover { opacity: .92; }

/* == Badge prix sur photo robot == */
/* z-index 25 pour etre AU-DESSUS de la toolbar photo-editor (z-index: 20) */
.sa-robot-price-tag {
  position: absolute; bottom: 12px; left: 12px;
  background: rgba(20,33,65,.88); color: #fff;
  font-family: var(--font-title); font-size: 1.15rem; font-weight: 800;
  padding: .35em .85em; border-radius: 999px;
  backdrop-filter: blur(4px);
  border: 2px solid rgba(255,255,255,.18);
  letter-spacing: .02em;
  z-index: 25;
  display: block;
  pointer-events: none; /* ne bloque pas les interactions photo-editor */
}
.sa-robot-price-tag--premium {
  background: rgba(217,119,6,.9);
  border-color: rgba(245,158,11,.6);
}

/* == Note robots == */
.sa-robots-note {
  display: flex; align-items: flex-start; gap: 14px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 18px 22px; color: rgba(255,255,255,.7); font-size: .9rem;
}
.sa-robots-note i { color: var(--accent); font-size: 1.1rem; margin-top: 3px; flex-shrink: 0; }
.sa-robots-note p { margin: 0; line-height: 1.6; }

/* == Bouton ajouter robot (admin) == */
.sa-add-robot-wrap { justify-content: center; margin-bottom: 40px; }
.sa-add-robot-btn {
  display: flex; align-items: center; gap: 10px; padding: .8rem 2rem;
  background: rgba(255,255,255,.08); border: 2px dashed rgba(255,255,255,.3);
  border-radius: var(--radius); color: rgba(255,255,255,.7);
  font-family: var(--font-title); font-weight: 700; font-size: .95rem;
  cursor: pointer; transition: all .3s;
}
.sa-add-robot-btn:hover { background: rgba(255,255,255,.14); border-color: var(--accent); color: #fff; }

/* == Modal == */
.sa-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(10,18,36,.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.sa-modal-overlay.open { opacity: 1; pointer-events: all; }
.sa-modal {
  background: #fff; border-radius: var(--radius); padding: 36px 32px;
  max-width: 520px; width: 100%; position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
  transform: translateY(20px); transition: transform .3s;
}
.sa-modal-overlay.open .sa-modal { transform: translateY(0); }
.sa-modal-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px;
  border-radius: 50%; border: none; background: var(--light-grey);
  color: var(--text-dark); cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.sa-modal-close:hover { background: #dce1ec; }
.sa-modal-header { text-align: center; margin-bottom: 28px; }
.sa-modal-header i { font-size: 2.2rem; color: var(--accent); margin-bottom: 10px; display: block; }
.sa-modal-header h3 { font-size: 1.3rem; color: var(--navy); margin-bottom: 6px; }
.sa-modal-header p { font-size: .9rem; color: var(--text-body); }
.sa-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sa-form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.sa-form-group label { font-family: var(--font-title); font-size: .82rem; font-weight: 700; color: var(--text-dark); }
.sa-form-group input, .sa-form-group textarea {
  border: 2px solid var(--light-grey); border-radius: var(--radius-sm);
  padding: .65rem .9rem; font-size: .92rem; font-family: var(--font-body);
  color: var(--text-dark); outline: none; transition: border-color .2s;
}
.sa-form-group input:focus, .sa-form-group textarea:focus { border-color: var(--accent); }
.sa-form-group textarea { resize: vertical; min-height: 80px; }
.sa-modal-submit {
  width: 100%; padding: .85rem; border-radius: 999px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #1565C0);
  color: #fff; font-family: var(--font-title); font-weight: 700; font-size: .95rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .3s; margin-top: 4px;
}
.sa-modal-submit:hover { opacity: .9; }
.sa-form-note { text-align: center; font-size: .78rem; color: var(--mid-grey); margin-top: 10px; }
.sa-modal-success { text-align: center; padding: 20px 0; }
.sa-modal-success i { font-size: 3rem; color: #22c55e; display: block; margin-bottom: 14px; }
.sa-modal-success h4 { font-size: 1.2rem; color: var(--navy); margin-bottom: 8px; }
.sa-modal-success p { font-size: .92rem; color: var(--text-body); margin-bottom: 22px; }

/* == Footer == */
#footer {
  background: var(--navy-dark); color: rgba(255,255,255,.75);
  padding: 60px 5% 0;
}
.footer-container {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px; padding-bottom: 48px;
}
.footer-brand .logo-png--footer { height: 52px; margin-bottom: 16px; }
.footer-brand p { font-size: .9rem; line-height: 1.7; color: rgba(255,255,255,.65); max-width: 240px; }
.footer-links h4, .footer-contact h4 {
  font-family: var(--font-title); font-size: .82rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.4);
  margin-bottom: 18px;
}
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: .9rem; color: rgba(255,255,255,.7); transition: color .2s; }
.footer-links a:hover { color: var(--accent); }
.footer-contact p { font-size: .9rem; color: rgba(255,255,255,.7); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.footer-contact p i { color: var(--accent); width: 16px; }
.footer-contact a { color: rgba(255,255,255,.7); transition: color .2s; }
.footer-contact a:hover { color: var(--accent); }
.footer-insta { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.7); transition: color .2s; }
.footer-insta:hover { color: #e1306c; }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 0; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: .82rem; color: rgba(255,255,255,.4);
}
.footer-legal-links { display: flex; align-items: center; gap: 12px; }
.footer-legal-links a { color: rgba(255,255,255,.4); transition: color .2s; }
.footer-legal-links a:hover { color: var(--accent); }
.footer-legal-links span { color: rgba(255,255,255,.2); }
@media (max-width: 900px) {
  .footer-container { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-container { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* == Responsive == */
@media (max-width: 768px) {
  .sa-hero { padding: 120px 5% 60px; min-height: auto; }
  .sa-hero-btns { flex-direction: column; }
  .sa-devices-grid { grid-template-columns: 1fr; }
  .sa-photos-grid { grid-template-columns: 1fr; }
  .sa-robots-grid { grid-template-columns: 1fr; }
  .sa-cta-block { padding: 36px 20px; }
  .sa-form-row { grid-template-columns: 1fr; }
  .sa-table thead th { font-size: .78rem; padding: 10px 10px; }
  .sa-table td { padding: 10px 10px; font-size: .85rem; }
}
@media (max-width: 480px) {
  .sa-alert { flex-direction: column; gap: 10px; }
  .sa-modal { padding: 24px 18px; }
}
