:root {
  --blue: #094474;
  --blue-dark: #052d4d;
  --gold: #ba8b00;
  --cream: #f7f3ea;
  --white: #ffffff;
  --text-dark: #123047;
}

* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  color: var(--white);
  overflow: hidden;
  background: url("assets/domaine-drone.jpg") center center / cover no-repeat fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(9, 68, 116, 0.45);
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 0;

  display: flex;
  flex-direction: column;
  align-items: center;

  background: transparent !important;
}

.header,
.panel {
  position: relative;
  z-index: 2;
  max-width: 520px;
  width: 90%;
}

.header {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 28px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--blue);
  border: 3px solid var(--gold);
  margin-bottom: 22px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
}

.logo-img {
  height: 70px;
  width: auto;
}

.header h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.header p {
  margin: 6px 0 0;
  font-size: 17px;
  color: var(--gold);
  font-weight: bold;
}

.panel {
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-dark);
  border-radius: 30px;
  padding: 28px;
  margin-bottom: 20px;
  border: 3px solid rgba(186, 139, 0, 0.85);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
}

h2 {
  margin: 0 0 10px;
  font-size: 31px;
  color: var(--blue);
}

.subtitle {
  margin: 0 0 20px;
  color: #38556b;
  font-size: 19px;
  line-height: 1.35;
}

.hidden {
  display: none !important;
}

button {
  width: 100%;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.primary {
  background: var(--gold);
  color: var(--white);
}

.secondary {
  background: var(--cream);
  color: var(--blue);
  border: 2px solid var(--gold);
}

.big-btn {
  margin-top: 18px;
  border-radius: 24px;
  padding: 24px;
  font-size: 26px;
}

.back-btn {
  margin-top: 14px;
  border-radius: 22px;
  padding: 20px;
  font-size: 22px;
  font-weight: bold;
}

.frame-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.frame-card {
  background: var(--cream);
  border: 4px solid transparent;
  border-radius: 22px;
  padding: 10px;
  color: var(--blue);
  font-size: 18px;
  font-weight: bold;
}

.frame-card.active {
  border-color: var(--gold);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(186, 139, 0, 0.25);
}

.frame-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 16px;
  background: #ddd;
  margin-bottom: 8px;
}

.preview-photo,
.preview-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.preview-photo {
  object-fit: cover;
}

.preview-frame {
  object-fit: fill;
  pointer-events: none;
}

.frame-card span {
  display: block;
  padding: 8px 0 4px;
}

.camera-zone {
  position: relative;
  width: 100%;
}

video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 26px;
  border: 4px solid var(--gold);
  background: #111;
  display: block;
}

.photo-wrapper {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 26px;
  overflow: hidden;
  background: transparent;
  border: 4px solid var(--gold);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

#canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.countdown {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 140px;
  font-weight: bold;
  color: var(--white);
  background: rgba(9, 68, 116, 0.45);
  border-radius: 26px;
}

input {
  width: 100%;
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 18px;
  border: 2px solid #d8d8d8;
  font-size: 22px;
}

input:focus {
  outline: none;
  border-color: var(--gold);
}

.consent {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: flex-start;
  font-size: 17px;
  line-height: 1.35;
  margin-bottom: 18px;
}

.consent input {
  width: 28px;
  height: 28px;
  margin: 0;
}

#message {
  display: none;
  padding: 16px;
  margin-top: 16px;
  border-radius: 18px;
  text-align: center;
  font-weight: bold;
}

.success {
  display: block !important;
  background: #e3f7e7;
  color: #136b2d;
}

.error {
  display: block !important;
  background: #fde2e2;
  color: #9b1c1c;
}

.confirmation {
  text-align: center;
}

.confirmation .check {
  width: 130px;
  height: 130px;
  margin: 25px auto;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  font-size: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome {
  text-align: center;
  padding-top: 45px;
  padding-bottom: 45px;
}

.welcome h2 {
  font-size: 38px;
}

.countdown {
  animation: countdownPulse 0.8s ease-in-out infinite;
  text-shadow: 0 8px 25px rgba(0, 0, 0, 0.55);
}

@keyframes countdownPulse {
  0% {
    transform: scale(0.85);
    opacity: 0.65;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(0.85);
    opacity: 0.65;
  }
}

.flash {
  position: absolute;
  inset: 0;
  background: white;
  border-radius: 26px;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}

.flash.active {
  animation: flashEffect 0.45s ease-out;
}

@keyframes flashEffect {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}


.smile-text {
  font-size: 70px; /* ajuste si besoin */
  text-align: center;
}